SlideShare a Scribd company logo
MPMC


                               Unit 5

    1. State the features of 8051 microcontroller.
    The main features of 8051 microcontroller are:
       1) 8051 have 128 bytes of RAM
       2) 8051 have 128 user defined flags
       3) it consist of 16 bit address bus
       4) it also consist of 3 internal and two external interrupts
       5) less power usage in 8051 with respect to other micro-controller
       6) it consist of 16-bit program counter and data pointer
       7) 8051 can process 1 million one-cycle instructions per second
       8) it also consist of 32 general purpose registers each of 8 bits
       9) ROM on 8051 is 4 Kbytes in size
       10) it also consist of Two 16 bit Timer/ Counter
2. Explain the operation of stack pointer in 8051 microcontroller.
The stack pointer (SP) is an 8-bit register at location 81H. A stack is used for temporarily
storing data. It operates on the basis of last in first out (LIFO). Putting data onto the stack is
called "pushing onto the stack" while taking data off the stack is called "popping the stack."
The stack pointer contains the address of the item currently on top of the stack. On power-up
or reset the SP is set to 07H. When pushing data onto the stack, the SP is first increased by
one and the data is then placed in the location pointed to by the SP. When popping the stack,
the data is taken off the stack and the SP is then decreased by one. Since reset initialises the
SP to 07H, the first item pushed onto the stack is stored at 08H (remember, the SP is
incremented first, then the item is placed on the stack). However, if the programmer wishes to
use the register banks 1 to 3, which start at address 08H, he/she must move the stack to
another part of memory. The general purpose RAM starting at address 30H is a good spot to
place the stack. To do so we need to change the contents of the SP.
MOV SP, #2FH.

3.Write an 8051 assembly language program to add two 8 bits number data stored in internal
memory and store the result in register R2.

       MOV A,#44;LOAD ACC WITH 44H
       ADD A,#66;ADD 66H WITH THE CONTEN
       MOV R2,A;MOVE RESULT IN REGISTER
       HERE: SJMP HERE

4. Explain register bank?
Register banks in the 8051

As mentioned earlier, a total of 32 bytes of RAM are set aside for the register banks and stack.
These 32 bytes are divided into 4 banks of registers in which


each bank has 8 registers, RO – R7. RAM locations from 0 to 7 are set aside for bank 0 of RO –
R7 where RO is RAM location 0, Rl is RAM location 1, R2 is location 2, and so on, until memory
location 7, which belongs to R7 of bank 0. The second bank of registers RO – R7 starts at RAM
location 08 and goes to location OFH. The third bank of RO – R7 starts at memory location 10H
and goes to loc ation 17H. Finally, RAM locations 18H to 1FH are set aside for the fourth bank
of RO – R7. The following shows how the 32 bytes are allocated into 4 banks:
1. Microcontroller having inbuilt RAM or ROM and inbuilt timer.
2. Input and output ports are available.
3. Inbuilt serial port.
4. Separate memory to store program and data.
5. Many functions pins on the IC.
6. Boolean operation directly possible.

1
MPMC


7. It take few instructions to read and write data from external memory.




5.Compare microprocessor and microcontroller.

    Microprocessor                                        Microcontroller

    1. Do not have inbuilt RAM or ROM and timer.          1. Microcontroller having inbuilt RAM or ROM
                                                          and inbuilt timer.

    2. Input and output ports are not available,
    requires extra device like 8155                       2. Input and output ports are available.

    3. Do not have inbuilt serial port, requires 8250     3. Inbuilt serial port.
    device.

    4. Program and data are stored in same memory.        4. Separate memory to store program and data.

    5. Less multifunction pins on IC.                     5. Many functions pins on the IC.

    6. Boolean operation is not possible directly.        6. Boolean operation directly possible.

    7. It take many instruction to read and write data    7. It take few instructions to read and write data
    from external memory.                                 from external memory.




2
MPMC


6.Explain single operand arithmetic instructions of8051microcontroller




7. Explain the internal RAM memory of 8051 microcontroller.

RAM memory consists of 3 blocks containing 128 registers each. Its structure falls into the
8051 standard:

       128 general-purpose registers;
       128 memory locations reserved for SFRs. Even though only some of them are trully
       used, free locations shouldn’t be used for storing variables; and
       128 additional registers available for use (have no special purpose). Since they have
       the same addresses as SFRs, they are accessed by indirect addressing.




3
MPMC




8. Can you use DPTR to access internal ROM? Justify your answer.

DPTR register is not a true one because it doesn't physically exist. It consists of two separate
registers: DPH (Data Pointer High) and (Data Pointer Low). For this reason it may be treated as
a 16-bit register or as two independent 8-bit registers. Their 16 bits are primarly used for
external memory addressing. Besides, the DPTR Register is usually used for storing data and
intermediate results.




9. Write an 8051 assembly language program to perform BCD addition of two 8 bit number data
stored in location 51H and 52H and store the result in memory location 53H.

       MOV R1,#20
       MOV R2,#30
       MOV A,R1
       ADD A,R2
       DA R,A
       MOV R5,A
       HERE: SJMP HERE




4
MPMC




10. List and explain various data transfer instructions of 8051 microcontroller.




5

More Related Content

PDF
Embedded systems ppt iii
anishgoel
 
PPT
Memory organization of 8051
Muthu Manickam
 
PPTX
8051 memory
Mayank Garg
 
PPT
fco-lecture-8086
24happy24
 
DOC
Architecture of 8085
HarshitParkar6677
 
PDF
Microprocessor & Assembly language by team blackhole
Md Abdus Sobur Sikdar
 
PPT
8051 Addressing Modes
Senthil Kumar
 
DOC
4th yr dmumicrocontroller1
haymanotyehuala
 
Embedded systems ppt iii
anishgoel
 
Memory organization of 8051
Muthu Manickam
 
8051 memory
Mayank Garg
 
fco-lecture-8086
24happy24
 
Architecture of 8085
HarshitParkar6677
 
Microprocessor & Assembly language by team blackhole
Md Abdus Sobur Sikdar
 
8051 Addressing Modes
Senthil Kumar
 
4th yr dmumicrocontroller1
haymanotyehuala
 

What's hot (20)

DOCX
8086 Introduction
harikrishna parikh
 
PPTX
Z 80 processors (History-Products)
Mohammed Hilal
 
PDF
Microprocessor 8086
Aanjaney Singh Chauhan
 
PPTX
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
PDF
Architecture OF 8085
muneer.k
 
PPTX
Flags registor of 8086 processor
Fazle Akash
 
PPTX
Internal microprocessor architecture
University of Gujrat, Pakistan
 
PPTX
Presentation on 8086 microprocessor
Diponkor Bala
 
PPT
Ch3 ppt
wasz123
 
PPT
Lect 5
guestebfd84da
 
PPSX
8051 architecture
sb108ec
 
PDF
Microprocessors and microcontrollers
gomathy S
 
PPTX
8086 Microprocessor
Md.Galib Hossain
 
PPTX
Architecture of 8086 microprocessor
Anirban Saha Anik
 
DOCX
Intel Microprocessors 8086 Documentation
Adeel Rasheed
 
PPTX
8086 Microprocessor
IshworKhatiwada
 
PDF
8086 microprocessor
savitamhaske
 
PPTX
8086 new
Gopikrishna Madanan
 
PPTX
Microprocessor 8086
Gopikrishna Madanan
 
8086 Introduction
harikrishna parikh
 
Z 80 processors (History-Products)
Mohammed Hilal
 
Microprocessor 8086
Aanjaney Singh Chauhan
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Architecture OF 8085
muneer.k
 
Flags registor of 8086 processor
Fazle Akash
 
Internal microprocessor architecture
University of Gujrat, Pakistan
 
Presentation on 8086 microprocessor
Diponkor Bala
 
Ch3 ppt
wasz123
 
8051 architecture
sb108ec
 
Microprocessors and microcontrollers
gomathy S
 
8086 Microprocessor
Md.Galib Hossain
 
Architecture of 8086 microprocessor
Anirban Saha Anik
 
Intel Microprocessors 8086 Documentation
Adeel Rasheed
 
8086 Microprocessor
IshworKhatiwada
 
8086 microprocessor
savitamhaske
 
Microprocessor 8086
Gopikrishna Madanan
 
Ad

Viewers also liked (20)

PPT
MPMC Unit-1
A.S. Krishna
 
PDF
Mp &mc programs
Haritha Hary
 
DOC
8051 Microcontroller Notes
Dr.YNM
 
PDF
8086 instruction set with types
Ravinder Rautela
 
DOC
Microprocessor and Microcontroller Lab Manual
Santhosh Kumar
 
PPTX
MPMC Microprocessor
A.S. Krishna
 
DOC
mpmc (Microprocessor and microcontroller) notes
Nexus
 
PDF
microprocessor Questions with solution
dit
 
PDF
Mpmc lab
anveshthatikonda
 
PDF
8086 microprocessor lab manual
University of Technology - Iraq
 
PPT
Microprocessors 1-8086
Shubham Chaurasia
 
PDF
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
vtunotesbysree
 
PPTX
Memory Segmentation of 8086
Nikhil Kumar
 
DOCX
MASM -UNIT-III
Dr.YNM
 
PPTX
8051 microcontroller features
Tech_MX
 
PPT
8051 Presentation
Sayan Chakraborty
 
PDF
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
PDF
8086 microprocessor
Teja Bheemanapally
 
DOC
8086 class notes-Y.N.M
Dr.YNM
 
MPMC Unit-1
A.S. Krishna
 
Mp &mc programs
Haritha Hary
 
8051 Microcontroller Notes
Dr.YNM
 
8086 instruction set with types
Ravinder Rautela
 
Microprocessor and Microcontroller Lab Manual
Santhosh Kumar
 
MPMC Microprocessor
A.S. Krishna
 
mpmc (Microprocessor and microcontroller) notes
Nexus
 
microprocessor Questions with solution
dit
 
8086 microprocessor lab manual
University of Technology - Iraq
 
Microprocessors 1-8086
Shubham Chaurasia
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
vtunotesbysree
 
Memory Segmentation of 8086
Nikhil Kumar
 
MASM -UNIT-III
Dr.YNM
 
8051 microcontroller features
Tech_MX
 
8051 Presentation
Sayan Chakraborty
 
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
8086 microprocessor
Teja Bheemanapally
 
8086 class notes-Y.N.M
Dr.YNM
 
Ad

Similar to Unit 5 (20)

PDF
8051 Architecture and PIN Configuration.pdf
Srikrishna Thota
 
PPTX
Unit 4.pptx
BLACKSPAROW
 
PDF
002079
irfantheraj
 
PPTX
8051 Microcontroller_module_4.1.pptx
ARYAKUMARNIRAV
 
PDF
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
sangeeta jogade
 
PPTX
8051 Microcontroller By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
PPTX
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
MadavanR1
 
PPTX
Microcontroller 8051 features and applications
anushkayadav3011
 
PPTX
module-2.pptx
Ambika Naik
 
PPT
8051.ppt
Samarth Varshney
 
PDF
Unit1 5-mpi-lecture-notes
Prabhu Mali
 
PPTX
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 Microcontrollers
Arti Parab Academics
 
DOCX
Study of 8051 microcontroller
918007165995
 
PDF
8051 final word
handson28
 
PPTX
8051 Microcontroller
Jai Sudhan
 
PPT
8051.ppt microcontroller full detail explnation
revanthkumartr
 
PPTX
B sc e5.2 mp unit 4 mc-8051
MahiboobAliMulla
 
PPT
janakiraman egsp collage I msc 4 unit
janakiramang6
 
8051 Architecture and PIN Configuration.pdf
Srikrishna Thota
 
Unit 4.pptx
BLACKSPAROW
 
002079
irfantheraj
 
8051 Microcontroller_module_4.1.pptx
ARYAKUMARNIRAV
 
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
sangeeta jogade
 
8051 Microcontroller By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
MadavanR1
 
Microcontroller 8051 features and applications
anushkayadav3011
 
module-2.pptx
Ambika Naik
 
Unit1 5-mpi-lecture-notes
Prabhu Mali
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 Microcontrollers
Arti Parab Academics
 
Study of 8051 microcontroller
918007165995
 
8051 final word
handson28
 
8051 Microcontroller
Jai Sudhan
 
8051.ppt microcontroller full detail explnation
revanthkumartr
 
B sc e5.2 mp unit 4 mc-8051
MahiboobAliMulla
 
janakiraman egsp collage I msc 4 unit
janakiramang6
 

Recently uploaded (20)

PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Doc9.....................................
SofiaCollazos
 
The Future of Artificial Intelligence (AI)
Mukul
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Doc9.....................................
SofiaCollazos
 

Unit 5

  • 1. MPMC Unit 5 1. State the features of 8051 microcontroller. The main features of 8051 microcontroller are: 1) 8051 have 128 bytes of RAM 2) 8051 have 128 user defined flags 3) it consist of 16 bit address bus 4) it also consist of 3 internal and two external interrupts 5) less power usage in 8051 with respect to other micro-controller 6) it consist of 16-bit program counter and data pointer 7) 8051 can process 1 million one-cycle instructions per second 8) it also consist of 32 general purpose registers each of 8 bits 9) ROM on 8051 is 4 Kbytes in size 10) it also consist of Two 16 bit Timer/ Counter 2. Explain the operation of stack pointer in 8051 microcontroller. The stack pointer (SP) is an 8-bit register at location 81H. A stack is used for temporarily storing data. It operates on the basis of last in first out (LIFO). Putting data onto the stack is called "pushing onto the stack" while taking data off the stack is called "popping the stack." The stack pointer contains the address of the item currently on top of the stack. On power-up or reset the SP is set to 07H. When pushing data onto the stack, the SP is first increased by one and the data is then placed in the location pointed to by the SP. When popping the stack, the data is taken off the stack and the SP is then decreased by one. Since reset initialises the SP to 07H, the first item pushed onto the stack is stored at 08H (remember, the SP is incremented first, then the item is placed on the stack). However, if the programmer wishes to use the register banks 1 to 3, which start at address 08H, he/she must move the stack to another part of memory. The general purpose RAM starting at address 30H is a good spot to place the stack. To do so we need to change the contents of the SP. MOV SP, #2FH. 3.Write an 8051 assembly language program to add two 8 bits number data stored in internal memory and store the result in register R2. MOV A,#44;LOAD ACC WITH 44H ADD A,#66;ADD 66H WITH THE CONTEN MOV R2,A;MOVE RESULT IN REGISTER HERE: SJMP HERE 4. Explain register bank? Register banks in the 8051 As mentioned earlier, a total of 32 bytes of RAM are set aside for the register banks and stack. These 32 bytes are divided into 4 banks of registers in which each bank has 8 registers, RO – R7. RAM locations from 0 to 7 are set aside for bank 0 of RO – R7 where RO is RAM location 0, Rl is RAM location 1, R2 is location 2, and so on, until memory location 7, which belongs to R7 of bank 0. The second bank of registers RO – R7 starts at RAM location 08 and goes to location OFH. The third bank of RO – R7 starts at memory location 10H and goes to loc ation 17H. Finally, RAM locations 18H to 1FH are set aside for the fourth bank of RO – R7. The following shows how the 32 bytes are allocated into 4 banks: 1. Microcontroller having inbuilt RAM or ROM and inbuilt timer. 2. Input and output ports are available. 3. Inbuilt serial port. 4. Separate memory to store program and data. 5. Many functions pins on the IC. 6. Boolean operation directly possible. 1
  • 2. MPMC 7. It take few instructions to read and write data from external memory. 5.Compare microprocessor and microcontroller. Microprocessor Microcontroller 1. Do not have inbuilt RAM or ROM and timer. 1. Microcontroller having inbuilt RAM or ROM and inbuilt timer. 2. Input and output ports are not available, requires extra device like 8155 2. Input and output ports are available. 3. Do not have inbuilt serial port, requires 8250 3. Inbuilt serial port. device. 4. Program and data are stored in same memory. 4. Separate memory to store program and data. 5. Less multifunction pins on IC. 5. Many functions pins on the IC. 6. Boolean operation is not possible directly. 6. Boolean operation directly possible. 7. It take many instruction to read and write data 7. It take few instructions to read and write data from external memory. from external memory. 2
  • 3. MPMC 6.Explain single operand arithmetic instructions of8051microcontroller 7. Explain the internal RAM memory of 8051 microcontroller. RAM memory consists of 3 blocks containing 128 registers each. Its structure falls into the 8051 standard: 128 general-purpose registers; 128 memory locations reserved for SFRs. Even though only some of them are trully used, free locations shouldn’t be used for storing variables; and 128 additional registers available for use (have no special purpose). Since they have the same addresses as SFRs, they are accessed by indirect addressing. 3
  • 4. MPMC 8. Can you use DPTR to access internal ROM? Justify your answer. DPTR register is not a true one because it doesn't physically exist. It consists of two separate registers: DPH (Data Pointer High) and (Data Pointer Low). For this reason it may be treated as a 16-bit register or as two independent 8-bit registers. Their 16 bits are primarly used for external memory addressing. Besides, the DPTR Register is usually used for storing data and intermediate results. 9. Write an 8051 assembly language program to perform BCD addition of two 8 bit number data stored in location 51H and 52H and store the result in memory location 53H. MOV R1,#20 MOV R2,#30 MOV A,R1 ADD A,R2 DA R,A MOV R5,A HERE: SJMP HERE 4
  • 5. MPMC 10. List and explain various data transfer instructions of 8051 microcontroller. 5