MC Lab Manual Cbcs 2021
MC Lab Manual Cbcs 2021
LABORATORY MANUAL
MICROCONTROLLER LABORATORY
IPCC Course Code 21EE43
INSTITUTE VISION
INSTITUTE MISSION
Impart quality education through flexible and innovative teaching learning process.
Enable and Ignite young minds to excel in their career and life with entrepreneurial
spirit, professional ethics and human values.
Facilitate invention based research and collaborate with industries to address societal
needs.
DEPARTMENT VISION
DEPARTMENT MISSION
M1. Strive to deliver quality technical education through continuous teaching and learning
process.
M2. Incorporating emerging technologies in the core and related areas of Electrical
Engineering combined with professional ethics and managerial skills for the students to excel
in their career.
M3. Encouraging students to take up need based project / research for the societal needs.
PEO1: Graduates of the Program will acquire Professional and Academic excellence in the
field of Electrical & Electronics Engineering and Associated fields.
PEO2: Graduates of the Program will apply their Knowledge in the Operation, Control and
Maintenance of Power sector and related industries.
PEO3: Graduates of the Program will acquire Multi-disciplinary Knowledge and Skills to
Development of solutions for Societal and Industrial needs.
PSO2: Use the fundamentals of Electrical Machines, Power electronics and Control systems
in solving Real-time problems of industry.
PSO3: Explore the Opportunities in Energy Conservation and Use of Renewable Energy for
Societal needs.
COURSE OUTCOMES
CO- PO Mapping:
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
3 - - - 2 - - - 2 - - -
2 - 3 - 2 - - - 2 - - -
2 - 3 - 3 - - - 2 - - -
3 - 3 - 3 - - - 2 - - -
2.5 - 3 - 2.5 - - - 2 - - -
2 - -
- 2 -
2 - -
2 2
INDEX
Dept. of EEE, JNNCE Page 7
SL. PAGE
TITLE OF THE EXPERIMENT
NO. NO.
10
11
12
13
14
15
Microcontrollers are used in a variety of applications. Most of the modern day devices
cannot work without a microcontroller. These single chip devices are multifunctional
and have high bit handling capabilities.
The most widely used uC’s are the 80xx series and the MSP series.
Start
Initialize value to A
register
End
It is assumed that location X & Y starts from RAM location 30H & 40H respectively.
It is assumed that location X & Y starts from RAM location 30H & 40H respectively.
Org 0000
Cjne a,b,loop2 Compare A[first data] with B[largest num], if not equal jump
to label loop2 location
loop2: Jc loop3 If A < B, c =1, then jump to label Loop3
Org 0000H
Mov r6,#04h
Mov a,#25h
load 25H into acc
Mov b,#12h Load 12h into b reg
Org 0000h
LJMP 8000H
ORG 8000H
MOV A,#99H
ADD A,#99H
DA A
JNZ BACK
DJNZ R3,$
DJNZ R2,DECR
DJNZ R1,DECR1
RET
END
Note: view - watch window - watch1 and watch2, to edit name press F2 key on watch
window and value will change in real time.
IF X=0; THEN NUM1 (AND) NUM2, IF X=1; THEN NUM1 (OR) NUM2,
IF X=2; THEN NUMI1 (XOR) NUM2, ELSE RES =00, RES IS 23H LOCATION
Using logical instructions in byte level
Start
Block Diagram:
Start
Block Diagram:
{
while(1) // Executes for infinites times
{
Start
Block Diagram:
P0=0xff;
P0=0x21;
delay(50); //offtime
P2=0xff;
P0=0xff;
P0=0x21;
delay(50); //ontime
}
}
while(!TF0);
TF0=0;
}
TR0=0; // Stop timer
}
Start
Block Diagram:
sbit P21=P2^1;
sbit P22=P2^2;
sbit P23=P2^3;
sbit P24=P2^4;
sbit P25=P2^5;
sbit P26=P2^6;
sbit P27=P2^7;
sbit P30=P3^0;
sbit P31=P3^1;
sbit P32=P3^2;
sbit P33=P3^3;
sbit P34=P3^4;
sbit P35=P3^5;
sbit P36=P3^6;
sbit P37=P3^7;
unsigned int i;
P3=pattern;
P20=P37;
P21=P36;
P22=P35;
P23=P34;
P24=P33;
P25=P32;
P26=P31;
P27=P30;
P0=0xff;
P0=0x21;
pattern++;
if(pattern==0xff)
pattern=0x00;
unsigned int x;
for(x=0;x<=i;x++)
while(!TF0)
TF0=0;
TR0=0;
Start
End
is lcdbusy
while
(flag)
Declare variable d to
receive passed data
is lcdbusy
lcd command
Declare variable c to
receive passed value
is lcdbusy
Block Diagram: