SlideShare a Scribd company logo
1 of 5
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

What's hot

What's hot (20)

8086 Introduction
8086 Introduction8086 Introduction
8086 Introduction
 
Z 80 processors (History-Products)
Z 80 processors (History-Products)Z 80 processors (History-Products)
Z 80 processors (History-Products)
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085
 
Flags registor of 8086 processor
Flags registor of 8086 processorFlags registor of 8086 processor
Flags registor of 8086 processor
 
Internal microprocessor architecture
Internal microprocessor architectureInternal microprocessor architecture
Internal microprocessor architecture
 
Presentation on 8086 microprocessor
Presentation on 8086 microprocessorPresentation on 8086 microprocessor
Presentation on 8086 microprocessor
 
Ch3 ppt
Ch3 pptCh3 ppt
Ch3 ppt
 
Lect 5
Lect 5Lect 5
Lect 5
 
8051 architecture
8051 architecture8051 architecture
8051 architecture
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
8086 Microprocessor
8086 Microprocessor8086 Microprocessor
8086 Microprocessor
 
Architecture of 8086 microprocessor
Architecture of  8086 microprocessorArchitecture of  8086 microprocessor
Architecture of 8086 microprocessor
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
 
8086 Microprocessor
8086 Microprocessor8086 Microprocessor
8086 Microprocessor
 
8051 1
8051 18051 1
8051 1
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 
8086 new
8086 new8086 new
8086 new
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 

Viewers also liked

8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
8086 instruction set with types
8086 instruction set with types8086 instruction set with types
8086 instruction set with typesRavinder Rautela
 
Microprocessor and Microcontroller Lab Manual
Microprocessor and Microcontroller Lab ManualMicroprocessor and Microcontroller Lab Manual
Microprocessor and Microcontroller Lab ManualSanthosh Kumar
 
MPMC Microprocessor
MPMC MicroprocessorMPMC Microprocessor
MPMC MicroprocessorA.S. Krishna
 
mpmc (Microprocessor and microcontroller) notes
mpmc (Microprocessor and microcontroller) notesmpmc (Microprocessor and microcontroller) notes
mpmc (Microprocessor and microcontroller) notesNexus
 
microprocessor Questions with solution
microprocessor Questions with solutionmicroprocessor Questions with solution
microprocessor Questions with solutiondit
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015vtunotesbysree
 
Memory Segmentation of 8086
Memory Segmentation of 8086Memory Segmentation of 8086
Memory Segmentation of 8086Nikhil Kumar
 
MASM -UNIT-III
MASM -UNIT-IIIMASM -UNIT-III
MASM -UNIT-IIIDr.YNM
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller featuresTech_MX
 
Question paper with solution the 8051 microcontroller based embedded systems...
Question paper with solution  the 8051 microcontroller based embedded systems...Question paper with solution  the 8051 microcontroller based embedded systems...
Question paper with solution the 8051 microcontroller based embedded systems...manishpatel_79
 
8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.MDr.YNM
 

Viewers also liked (20)

MPMC Unit-1
MPMC Unit-1MPMC Unit-1
MPMC Unit-1
 
Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
 
Mpmc
MpmcMpmc
Mpmc
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
8086 instruction set with types
8086 instruction set with types8086 instruction set with types
8086 instruction set with types
 
Microprocessor and Microcontroller Lab Manual
Microprocessor and Microcontroller Lab ManualMicroprocessor and Microcontroller Lab Manual
Microprocessor and Microcontroller Lab Manual
 
MPMC Microprocessor
MPMC MicroprocessorMPMC Microprocessor
MPMC Microprocessor
 
mpmc (Microprocessor and microcontroller) notes
mpmc (Microprocessor and microcontroller) notesmpmc (Microprocessor and microcontroller) notes
mpmc (Microprocessor and microcontroller) notes
 
microprocessor Questions with solution
microprocessor Questions with solutionmicroprocessor Questions with solution
microprocessor Questions with solution
 
Mpmc lab
Mpmc labMpmc lab
Mpmc lab
 
8086 microprocessor lab manual
8086 microprocessor lab manual8086 microprocessor lab manual
8086 microprocessor lab manual
 
Microprocessors 1-8086
Microprocessors 1-8086Microprocessors 1-8086
Microprocessors 1-8086
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
 
Memory Segmentation of 8086
Memory Segmentation of 8086Memory Segmentation of 8086
Memory Segmentation of 8086
 
MASM -UNIT-III
MASM -UNIT-IIIMASM -UNIT-III
MASM -UNIT-III
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller features
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Question paper with solution the 8051 microcontroller based embedded systems...
Question paper with solution  the 8051 microcontroller based embedded systems...Question paper with solution  the 8051 microcontroller based embedded systems...
Question paper with solution the 8051 microcontroller based embedded systems...
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 
8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.M
 

Similar to Unit 5

Similar to Unit 5 (20)

Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 Microcontroller
 
Micro 8051
Micro 8051Micro 8051
Micro 8051
 
Microcontroller1
Microcontroller1Microcontroller1
Microcontroller1
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 
8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
Micro controller
Micro controllerMicro controller
Micro controller
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
MICROCONTROLLER 8051
MICROCONTROLLER 8051MICROCONTROLLER 8051
MICROCONTROLLER 8051
 
002079
002079002079
002079
 
Ashish microcontroller 8051
Ashish microcontroller 8051Ashish microcontroller 8051
Ashish microcontroller 8051
 
8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware
 
Unit 4.pptx
Unit 4.pptxUnit 4.pptx
Unit 4.pptx
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
Unit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesUnit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notes
 
Microcontroladores: tutorial de microcontrolador 8051
Microcontroladores: tutorial de microcontrolador 8051Microcontroladores: tutorial de microcontrolador 8051
Microcontroladores: tutorial de microcontrolador 8051
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051.ppt
8051.ppt8051.ppt
8051.ppt
 
assignment 1-MC.pdf
assignment 1-MC.pdfassignment 1-MC.pdf
assignment 1-MC.pdf
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

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