Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views33 pages

Microcontrollers Lab Manual

The document outlines the Microcontrollers Lab course (BECL456A) at RNS Institute of Technology, detailing its vision, mission, course outcomes, and evaluation criteria. It includes a list of assembly language and C programming tasks for students to complete, along with a grading rubric for lab performance. The document serves as a guide for students to develop skills in microcontroller programming and hardware interfacing.

Uploaded by

eshwarivakki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views33 pages

Microcontrollers Lab Manual

The document outlines the Microcontrollers Lab course (BECL456A) at RNS Institute of Technology, detailing its vision, mission, course outcomes, and evaluation criteria. It includes a list of assembly language and C programming tasks for students to complete, along with a grading rubric for lab performance. The document serves as a guide for students to develop skills in microcontroller programming and hardware interfacing.

Uploaded by

eshwarivakki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

RN SHETTY TRUST®

RNS INSTITUTE OF TECHNOLOGY


Autonomous Institution, Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

MICROCONTROLLERS LAB
(BECL456A)
(As per Visvesvaraya Technological University Course type- ABE)

Compiled by

DEPARTMENT OF ECE
R N S Institute of Technology
Bengaluru-98

Name:

USN:
RN SHETTY TRUST®

RNS INSTITUTE OF TECHNOLOGY


Autonomous Institution, Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Vision of the Department

Conquering technical frontiers in the field of Electronics and


Communications

Mission of the Department

The Department of Electronics and communication Engineering promotes


an intellectual and ethical environment in which the strengths and skills
of Electronics Professionals will flourish by:

1. Achieving and fostering excellence in core Electronics and


Communication engineering with focus on hardware, simulation
and design.
2. Pursuing Research, development and consultancy to achieve
self-sustenance.
3. Preparing industry ready graduates by providing skill
training and nurturing innovation and creativity.
Disclaimer

The information contained in this document is the proprietary and exclusive property of
RNS Institute except as otherwise indicated. No part of this document, in whole or in part,
may be reproduced, stored, transmitted, or used for course material development purposes
without the prior written permission of RNS Institute of Technology.

The information contained in this document is subject to change without notice. The
information in this document is provided for informational purposes only.

Trademark

Edition: 2024- 25

Document Owner
The primary contact for questions regarding this document is:

Mr. Praveen G
Author(s):
Greeshma Jacob
Shruthi M
Department: ECE
Contact email ids : [email protected]
[email protected]
[email protected]
COURSE OUTCOMES
Course Outcomes: At the end of this course, students will be able to:
CO1- Write an Assembly Language/ C Program in 8051 for solving simple problems that manipulate
input data using different instructions.
CO2- Develop testing and experimental procedures on 8051 Microcontroller, and analyze their operation
under different cases.
CO3- Develop programs for 8051 Microcontroller to implement real-world problems
CO4- Develop Microcontroller applications using external hardware interface.

COs and POs Mapping of lab Component

COURSE
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
OUTCOMES

CO1 1 1 3 1 3
CO2 1 1 3 1 3
CO3 1 1 3 1 3
CO4 1 1 3 1 3
Justification for CO – PO & CO – PSO Mapping

Mapping Mapping Levels: Justification


(Low / Medium /
High)
Students apply fundamental knowledge of electronics and
CO1-PO1 Low
programming to develop microcontroller-based solutions.

CO1-PO2 Low Selecting appropriate instructions and debugging logic builds


analytical skills.
Use of simulation and debugging tools (e.g., Keil µVision)
CO1-PO5 High
reflects modern tool usage.
Reinforces understanding of digital/electronic circuit behavior
CO1-PSO1 Low
through programming.
Enhances proficiency in using programming tools and
CO1-PSO2 High
environments for hardware control.
Students utilize engineering principles to plan and execute
CO2-PO1 Low
structured tests.
Design and validation of test cases contribute to solution
CO2-PO2 Low
development skills.
Engages students in using debuggers, logic analyzers, or
CO2-PO5 High
emulators as modern tools.
Applies knowledge of circuits to verify expected
CO2-PSO1 Low
hardware/software behavior.
Demonstrates hands-on experience in real-time debugging using
CO2-PSO2 High
industry tools.
Applies electronics and embedded knowledge to create
CO3-PO1 Low
functional applications.
Involves analysis of application requirements and
CO3-PO2 Low
implementation challenges.
Incorporates software tools and hardware interfaces in
CO3-PO5 High
development.
Translates communication/control concepts into practical
CO3-PSO1 Low
embedded programs.
Builds competence in embedded software development using
CO3-PSO2 High
modern tools.
Integrates electronic circuit knowledge to connect and control
CO4-PO1 Low
external devices.
Students analyze and resolve real-time interfacing issues (e.g.,
CO4-PO2 Low
timing, noise).
Utilizes sensors, communication modules, and interfacing
CO4-PO5 High
protocols effectively.
CO4-PSO1 Low Demonstrates application of electronic/communication concepts
in practical systems.

CO4-PSO2 High Builds proficiency in interfacing and controlling external


hardware via code.

REVISED BLOOMS TAXONOMY (RBT)

Rubrics for ABE Lab


Faculty handling AEC subjects must make note of the following marks distribution.

ABE Marks Distribution.

4th Sem 2022 Scheme

Sl.NO Lab Marks (50)


1. Record 10 (Min-6)
2 Observation + Attendance 10 (Min-6)

3. Unit Test 10 (Min-6)

4 Lab Internal Test 20 (Min-8)


5 Total 50 (Min-20)
Microcontrollers Laboratory
Evaluation Rubrics
Subject Code: BECL456A IA Marks: 50
Hours/ Week: 3Hrs Exam Hours: 03
Total Hours: 40 Exam Marks: 50

Components Above Average Average Below Average

Record (10) a) Programs with a) Programs with No proper results


proper proper and poor
commenting commenting documentation:
(Minimum)
b) Before and after b) Before and after
execution results execution results:
(<10)
c) On-time
submission: (10)

Observation a) Programs a) Programs No proper results


and executed and executed and and poor
Attendance obtained results obtained results documentation:
(10) written legibly. written legibly. (Minimum)
b) Regularly b) Not Regularly
attending lab: attending lab: (<
(10) 10 based on
attendance)

Unit Test (10) a) Proper write-up a) Change of No Proper Write-


(3) program (1) up, no result, and
not answered any
b) Execution of b) Partial output (2)
questions
program with c) 1 or 2 questions (Minimum)
results (5) Viva (1)
c) Viva (2)

Lab Internal a) Proper write-up a) Change of No Proper Write-


Test (20) (30) program (9) up, no result, and
not answered any
(Conducted for b) Execution of b) Partial output
questions
100 and program with (20)
(Minimum)
reduced to 20 results (50) c) 3 or 4 questions
Marks.) c) Viva (20) Viva (10)
PROGRAM LIST
Table of Contents Page No.
Getting Started
I. ASSEMBLY LANGUAGE PROGRAMS
Data Transfer Programs
Write an ALP to move a block of n bytes of data from source (20h) to
1. destination (40h) using Internal-RAM.
Write an ALP to move a block of n bytes of data from source (2000h) to
2. destination (2050h) using External RAM.
Write an ALP to exchange the source block starting with address 20h,
(Internal RAM) containing N (05) bytes of data with destination block
3. starting with address 40h (Internal RAM).
Write an ALP to exchange the source block starting with address 10h
(Internal memory), containing n (06) bytes of data with destination block
4. starting at location 00h (External memory)

Arithmetic & Logical Operation Programs:


Write an ALP to add the byte in the RAM at 34h and 35h, store the result in
5. the register R5 (LSB) and R6 (MSB), using Indirect Addressing Mode.
Write an ALP to subtract the bytes in Internal RAM 34h & 35h store the
6. result in register R5 (LSB) & R6 (MSB).
Write an ALP to multiply two 8-bit numbers stored at 30h and 31h and
7 store16- bit result in 32h and 33h of Internal RAM.
Write an ALP to perform division operation on 8-bit number by 8-bit
8. number.
9. Write an ALP to separate positive and negative in a given array.
10. Write an ALP to separate even or odd elements in a given array.
11. Write an ALP to arrange the numbers in Ascending & Descending order.
Write an ALP to find Largest & Smallest number from a given array
12. starting from 20h & store it in Internal Memory location 40h.
Counter Operation Programs:
13. Write an ALP for Decimal UP-Counter.
14. Write an ALP for Decimal DOWN-Counter.
15. Write an ALP for Hexadecimal UP-Counter.
16. Write an ALP for Hexadecimal DOWN-Counter.
II. C Programming
17. Write an 8051 C program to find the sum of first 10 Integer Numbers.
18. Write an 8051 C program to find Factorial of a given number.
Write an 8051 C program to find the Square of a number (1 to 10) using
19. Look-Up Table.

Write an 8051 C program to count the number of Ones and Zeros in two
20. consecutive memory locations.
Write an 8051 C program to display “Hello World’’ message using LCD
21. display

III. Hardware Interfacing Programs


Write an 8051 ALP/C Program to rotate stepper motor in Clock & Anti-
22. Clockwise direction.
Write an 8051 ALP/C program to Generate Sine & Square waveforms
23. using DAC interface.
Getting Started
Steps to use Keil µVision 5

1. Open Keil µVision 5 software (Double click on the icon)

2. Create a new project giving a proper name and save it.

1
3. Search for the microcontroller AT89C51ED2 and say OK.

4. Don’t add the startup file to the project.

2
5. Create a new file and type the code.

6. Save the file as .asm or .c file.

3
7. Right click on Source Group 1 and select add existing files to the group.

8. Search for the file in the pop up window

4
9. Go to project menu and build the file. (It checks for any syntax error).

10. Start the debug session and check for the expected output depending on
the logic of the program.

5
11. Debug window to check the output

I. ASSEMBLY LANGUAGE PROGRAM


i) Data Transfer Programs:
1) Write an ALP to move a block of n bytes of data from source (30h) to
destination (50h) using Internal-RAM.
ORG 0000h ; program start location
MOV R2, #0Ah ; ten bytes assumed
MOV R0, #30h ; source pointer
MOV R1, #50h ; destination pointer
BACK: MOV A, @R0 ; A ¬ [R0]
MOV @R1, A ; [R1] ¬[A]
INC R0 ; next location
INC R1 ; next location
DJNZ R2, BACK ; check for 10 bytes
SJMP $
END ; end of program

6
Before Execution:

After Execution

2) Write an ALP to move a block of n bytes of data from source (2000h) to


destination (2050h) using External RAM.
ORG 0000h ; program start location
MOV R7, #0Ah ; ten bytes assumed
MOV DPTR, #2000h ; source pointer
MOV R2, #50h
MOV R3,#20H ; destination pointer
BACK: MOVX A, @DPTR ; A ¬ [R0]
MOV R4,DPL ;Store DPTR address in R5-R4
MOV R5,DPH
MOV DPL,R2 ;Load destination address in dptr
MOV DPH,R3
MOVX @DPTR, A ; [dptr] ¬[A]
INC R2 ; next location
INC R4 ; next location
MOV DPL,R4
MOV DPH,R5
DJNZ R7, BACK ; check for 10 bytes
SJMP $
END ; end of program

7
Before Execution:

After execution:

3) Write an ALP to exchange the source block starting with address 30h,
(Internal RAM) containing N (05) bytes of data with destination block
starting with address 50h (Internal RAM).
ORG 0000h ; program start location
MOV R2, #05h ; 5 bytes OF data
MOV R0, #30h ; source pointer
MOV R1, #50h ; destination pointer
BACK: MOV A, @R0 ; A ¬ [R0]
XCH @R1, A ; [R1] ¬[A]
MOV @R0, A
INC R0 ; next location
INC R1 ; next location
DJNZ R2, BACK ; check for 10 bytes
SJMP $
END ; end of program

Before execution:

8
After execution:

4) Write an ALP to exchange the source block starting with address 30h
(Internal memory), containing n (06) bytes of data with destination block
starting at location 80h (External memory)

ORG 0000h ; program start location


MOV R2, #06h ; 6 bytes OF data
MOV R0, #10h ; source pointer
MOV R1, #00h ; destination pointer
BACK: MOV A, @R0 ; A ¬ [R0]
MOV R3, A
MOVX A, @R1
MOV @R0, A
MOV A, R3
MOVX @R1, A ; [R1] ¬[A]
INC R0 ; next location
INC R1 ; next location
DJNZ R2, BACK ; check for 10 bytes
SJMP $
END ; end of program

Before execution

9
After execution

II. Arithmetic & Logical Operation Programs:

5) Write an ALP to add the byte in the RAM at 34h and 35h, store the result
in the register R5 (LSB) and R6 (MSB), using Indirect Addressing Mode.
ORG 0000h ; program start location
MOV R0, #34H ;R0 points to First byte
MOV R1, #35H ;R1 points to Second byte
MOV A, @R0 ;Read first data in Accumulator
ADD A, @R1 ;Add second number to first number
MOV R5, A ;Store lower byte in R5
CLR A
MOV R6, #00
ADDC A, R6 ;Store carry(upper byte) in R6
MOV R6, A
SJMP $
END

Before execution

10
After Execution

6) Write an ALP to subtract the byte in the RAM at 34h and 35h, store the
result in the register R5 (LSB) and R6 (MSB), using Indirect Addressing
Mode.
ORG 0000h ; program start location
MOV R0, #34H ;R0 points to First byte
MOV R1, #35H ;R1 points to Second byte
MOV A, @R0 ;Read first data in Accumulator
CLR C ; Clear carry flag
SUBB A, @R1 ;Subtract with borrow second from first number
MOV R5, A ;Store lower byte in R5
CLR A
MOV R6, #00
SUBB A, R6 ;Store the borrow in R6.
SJMP $
END

7) Write an ALP to multiply two 8-bit numbers stored at 30h and 31h and
store16- bit result in 32h and 33h of Internal RAM.
ORG 0000h ; program start location
MOV R0, #30H ;R0 points to First byte
MOV R1, #31H ;R1 points to Second byte
MOV A, @R0 ;Read first data in Accumulator
MOV B, @R1
MUL AB ; Multiply the two bytes
MOV R0, #32H
MOV @R0, A ; Store lower product byte in 32H
INC R0
MOV @R0, B ;Store the upper product byte in 33H.
SJMP $
END

11
Before execution

After Execution

8) Write an ALP to perform division operation on 8-bit number by 8-bit


number.
ORG 0000h ; program start location
MOV R0, #30H ;R0 points to First byte
MOV R1, #31H ;R1 points to Second byte
MOV A, @R0 ;Read first data in Accumulator
MOV B, @R1
DIV AB ; Multiply the two bytes
MOV R0, #32H
MOV @R0, A ; Store quotient in 32H
INC R0
MOV @R0, B ;Store the remainder in 33H.
SJMP $
END

12
Before Execution

After execution

9) Write an ALP to separate positive and negative in a given array.


ORG 000H
MOV DPTR, #30H ;array initialized here
MOV R0, #40H ;positive numbers stored here
MOV R1, #50H ;negative numbers stored here
MOV R2, #10 ;count
BACK: MOVX A, @DPTR ;Read the array elements
MOV R3, A
RLC A ;Rotate left to check LSB for positive and negative
MOV A, R3
JC SKIP
MOVX @R0, A ;store positive number
INC R0
SJMP NEXT
SKIP: MOVX @R1, A ; store negative number
INC R1
NEXT:INC DPTR
DJNZ R2, BACK ;decrement count
SJMP $
END

13
After Execution:

10) Write an ALP to separate even or odd elements in a given array.


ORG 000H
MOV DPTR, #30H ;array initialized here
MOV R0, #40H ;Even numbers stored here
MOV R1, #50H ;Odd numbers stored here
MOV R2, #10 ;count
BACK: MOVX A, @DPTR ;Read the array elements
MOV R3, A
RRC A ;Rotate right to check LSB for odd and even
MOV A, R3
JC SKIP
MOVX @R0, A ;store even number
INC R0
SJMP NEXT
SKIP: MOVX @R1, A ; store odd number
INC R1
NEXT: INC DPTR
DJNZ R2, BACK ;decrement count
SJMP $
END

After Execution:

14
11) Write an ALP to arrange the numbers in Ascending & Descending order.
ORG 0000H
MOV R1, #04H ; use N-1 comparisons and iterations.
BACK1: MOV R0, #30H ; Array stored from 30h
MOV R2, #04H
BACK: MOV A, @R0
INC R0
MOV B, @R0
CJNE A, B, NO_EQ ;compare two consecutive elements
SJMP NO_EX
NO_EQ: JC NO_EX ; JNC FOR DECENDING
MOV @R0, A
DEC R0
MOV @R0, B
INC R0
NO_EX: DJNZ R2, BACK
DJNZ R1, BACK1
SJMP $
END

Before Execution

After Execution

15
12) Write an ALP to find Largest & Smallest number from a given array starting
from 30h & store it in Internal Memory location 50h.
ORG 0000H
MOV R3, #0AH
MOV R0, #20H
MOV 40H, #00H
AGAIN: MOV A,@R0
CJNE A, 40H, NOT_EQ
SJMP SKIP
NOT_EQ: JC SKIP ;JNC for smallest number and initial data is FFh
MOV 40H, A ;in memory 40h
SKIP: INC R0
DJNZ R3, AGAIN
HERE: SJMP HERE
END

Before Execution

After Execution

16
iii. Counter Operation Programs:
13) Write an ALP to realize Decimal Up/Down counter.

ORG 000H
MOV A, #00
BACK: ACALL DELAY
ADD A, #99H ; add 01 for BCD up counter
DA A ; for BCD counter
JNZ BACK
HERE: SJMP HERE

DELAY: MOV R1, #0FFH ;Delay Routine


DECR1: MOV R2, #0FFH
DECR: MOV R3, #0FFH
DJNZ R3, $
DJNZ R2, DECR
DJNZ R1, DECR1
RET
END

14) Write an ALP to realize Hexadecimal Up/Down counter.

ORG 000H
MOV A, #00
BACK: ACALL DELAY
INC A ; DEC A FOR HEX DOWN COUNTER
JNZ BACK
HERE: SJMP HERE
DELAY: MOV R1, #0FFH ;Delay routine
DECR1: MOV R2, #0FFH
DECR: MOV R3, #0FFH
DJNZ R3, $
DJNZ R2, DECR
DJNZ R1, DECR1
RET
END

View-> Watch & call Stack window, in the Watches select watch 1 (or 2) and press
F2 and enter a (for accumulator A)

17
II C PROGRAMMING
15. Write an 8051 C program to find the sum of first 10 Integer Numbers.

#include <reg51.h>
sfr A=0x0E0;

void main()
{
unsigned int i=0,sum=0;
A=0;
while(i<=10)
{
sum=sum+i;
i=i+1;
}
A=sum;
}

Output:
sum = 0x 0037

16. Write an 8051 C program to find Factorial of a given number.

#include <reg51.h>

sfr A=0x0E0;
void main()
{
unsigned char num = 5; //number should be <= 5
unsigned char I, result = 1;
if (num == 0)
{
result = 1;
}
else
{
for (i=0; i<=num; i++)
{
Result = result * i;
}
}
A = result;
}
Output:
fact = 0x78

18
17. Write an 8051 C program to find the Square of a number (1 to 10) using
Look-Up Table.

#include <reg51.h>

// Define a lookup table with the squares of numbers from 0 to 255


unsigned int square_table[16] = {0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169,
196, 225};

unsigned int get_square(unsigned char num) // Function to get the square of a


number using the lookup table
{
return square_table[num]; // Return the square from the
} //lookup table

void main()
{
unsigned char number = 5; // Example input number
unsigned int square_value;

square_value = get_square(number); // Call the function to get the square


} //of the number

Output:
For x = 0x 09 xsquare= 0x 64 (81d)

18) Write an 8051 C program to count the number of Ones and Zeros in two
consecutive memory locations.

#include<stdio.h>
void main()
{
unsigned char i, ones, zeros;
unsigned int *p=0x30, num;
num= *p;
for(i=0; i<16; i++)
{
/* If LSB is set then increment ones otherwise zeros */
if(num & 1)
ones++;
else
zeros++;
/* Right shift bits of num to one position */

num >>= 1;
19
}
}

Output:
D: 0x30: AB CD
Ones = 0 x 0A
Zeros = 0x 06

19) Write an 8051 C program to display “Hello World’’ message using LCD display
#include<stdio.h>
#include<reg51.h>
void main()
{
unsigned char i;
unsigned char mess[]="Hello World";
TMOD = 0x20;
TH1 = 0xFD;
SCON = 0x50;
TR1 =1;
for (i=0; i<11; i++)
{
SBUF = mess[i];
while(TI==0);
TI=0;
}
}

Output:
Hello World

20
III. Hardware Interfacing Programs
20. Write an 8051 ALP/C Program to rotate stepper motor in Clock & Anti-
Clockwise direction.

Stepper motor

# include <REG51XD2.H>
sbit clock=P3^3;
sbit anticlock=P3^2;
void delay(unsigned int X)
{
for(;X>0;X--);
return;
}
main()
{
unsigned char val,i;
P0=0X00;
val=0X11;
for(i=0;i<4;i++)
{
P0=val;
if(clock==0)
val=val<<1;
else if(anticlock==0)
val=val>>1;
delay(6500);
}
}

21. Write an 8051 ALP/C program to Generate Sine & Square waveforms using
DAC interface

Sine wave
# include<REG51XD2.H>
main()
{
static int a[13]={128,192,238,255,238,192,128,64,17,0,17,64,128};
unsigned char i=0;
P0=0x00;
while (1)
{
for(i=0;i<13;i++)
{
P0=a[i];

21
}
}
}

Ramp wave
#include<REG51XD2.H>
main()
{
unsigned char i=0;
P0=0x00;
while(1)
{
for(i=0;i<0xff;i++)
{
P1=i;
P0=i;
}
}
}

Triangular wave
# include<REG51XD2.H>
main()
{
unsigned char i=0;
P0=0x00;
while(1)
{
for(i=0;i<0xff;i++)
{
P1=i;
P0=i;
}
for(i=0xfe;i>0x00;i--)
{
P0=i;
P1=i;
}
}
}

22
Square wave:
#include <reg51.h>

// Define the high and low values for the square wave (8-bit values for DAC)
#define HIGH_VALUE 0xFF // High voltage (full scale)
#define LOW_VALUE 0x00 // Low voltage (zero)

void delay(unsigned int itime) // Simple delay function (time is in milliseconds)


{
unsigned int i, j;
for (i = 0; i < itime; i++)
for (j = 0; j < 1275; j++);

void main()
{
while (1)
{
P1 = HIGH_VALUE; // Assuming DAC is connected to PORT 1
delay(500); // Wait for 500 ms

P1 = LOW_VALUE; // Assuming DAC is connected to PORT 1


delay(500); // Wait for 500 ms
}
}

23
Viva Questions:

1. What is a microcontroller? How is it different from a microprocessor?


2. List the features of the 8051 microcontroller.
3. How many ports does the 8051 have and what are their functions?
4. Explain the architecture of the 8051 microcontroller.
5. What is the size of RAM and ROM in the 8051?
6. What are the different types of addressing modes in 8051?
7. Explain the difference between MOV and MVI instructions.
8. What is the use of the SJMP instruction?
9. How do you perform a delay in 8051 using software?
10. Write a simple program to toggle an LED using port P1.0.
11. How do you interface an LCD with the 8051?
12. What is the purpose of the timer/counter in the 8051?
13. Explain how interrupts work in the 8051.
14. How many interrupts are available in the 8051? List them.
15. How do you interface a stepper motor with the 8051?
16. How is serial communication achieved in the 8051?
17. What is the role of the SBUF and SCON registers?
18. What is baud rate and how is it set in 8051?
19. Can ports of 8051 be used as both input and output? Explain.
20. What happens if the stack overflows in 8051?

24

You might also like