SlideShare une entreprise Scribd logo
1  sur  25
1
General-purpose microprocessor
CPU
General-
Purpose
Micro-
processor
RAM ROM I/O
Port
Timer
Serial
COM
Port
Data Bus
Address Bus
Figure 1-1 (a) General-Purpose Microprocessor System
• CPU for Computers
• No RAM, ROM, I/O on CPU chip itself
• Example:Intel’s x86, Motorola’s 680x0
Many chips on
mother’s board
2
Microcontroller
RAM ROM
I/O
Port
Timer
Serial
COM
Port
Figure 1-1 (b) Microcontroller
CPU
• A smaller computer
• On-chip RAM, ROM, I/O ports...
• Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8
and PIC 16X
A single chip
3
Microprocessor v.s. Microcontroller
Microprocessor
• CPU is stand-alone,
RAM, ROM, I/O, timer
are separate
• designer can decide on
the amount of ROM,
RAM and I/O ports.
• expansive
• versatility
• general-purpose
Microcontroller
• CPU, RAM, ROM, I/O
and timer are all on a
single chip
• fix amount of on-chip
ROM, RAM, I/O ports
• for applications in which
cost, power and space
are critical
• single-purpose
4
Embedded System
• Embedded system means the processor is embedded into that application.
• An embedded product uses a microprocessor or microcontroller to do
one task only.
• In an embedded system, there is only one application software that is
typically burned into ROM.
• Example:printer, keyboard, video game player
• Example:Table 1-1, some embedded products using microconrollers
5
Three criteria in Choosing a Microcontroller
1. meeting the computing needs of the task efficiently and cost effectively
• speed, the amount of ROM and RAM, the number of I/O ports and timers, size,
packaging, power consumption
• easy to upgrade
• cost per unit
2. availability of software development tools
• assemblers, debuggers, C compilers, emulator, simulator, technical support
3. wide availability and reliable sources of the microcontrollers.
• A single chip computer or a CPU with all the peripherals like RAM,ROM,I/O,
Timers, ADCs, etc on the same chips.
• A Microcontroller is meant to be more self- contained and independent, and
functions ads a tiny, dedicated computer.
• Originally, 8051 Microcontrollers were developed using N-MOS Technology but
the use of battery powered devices and their low power consumption lead to
usage of CMOS Technology (which is famous for its low power consumption).
• Majority of the modern 8051 Microcontrollers are Silicon IP Cores (Intellectual
Property Cores) but discrete 8051 Microcontroller IC’s are also available.
Because of their low power consumption, smaller size and simple architecture,
8051 IP Cores are used in FPGAs (Field Programmable Gate Array) and SoCs
(System on Chip) instead of Advanced ARM Architecture based MCUs.
INTRODUCTION
FEATURES OF 8051
• Useful for small computing tasks.
• Adequate for many control and monitoring
application.
• Packaging (RAM, ROM, Timers on chip).
• Less power consumption.
• Easily upgradable.
• Availability of tools of microcontroller such as
proteus (simulator) and keil (compiler).
9
8051 Pin Diagram
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
RST
(RXD)P3.0
(TXD)P3.1
(T0)P3.4
(T1)P3.5
XTAL2
XTAL1
GND
(INT0)P3.2
(INT1)P3.3
(RD)P3.7
(WR)P3.6
Vcc
P0.0(AD0)
P0.1(AD1)
P0.2(AD2)
P0.3(AD3)
P0.4(AD4)
P0.5(AD5)
P0.6(AD6)
P0.7(AD7)
EA/VPP
ALE/PROG
PSEN
P2.7(A15)
P2.6(A14)
P2.5(A13)
P2.4(A12)
P2.3(A11)
P2.2(A10)
P2.1(A9)
P2.0(A8)
8051
(8031)
Architectural overview of
8051 microcontroller
Functional block diagram of 8051
12
Inside Architecture of 8051
CPU
On-chip
RAM
On-chip
ROM for
program
code
4 I/O Ports
Timer 0
Serial
Port
Figure 1-2. Inside the 8051 Microcontroller Block Diagram
OSC
Interrupt
Control
External interrupts
Timer 1
Timer/Counter
Bus
Control
TxD RxD
P0 P1 P2 P3
Address/Data
Counter
Inputs
•The 8051 is an accumulator based microcontroller. Its registers are:
register A, PSW, register B, 8-bit stack pointer, 16-bit data pointer,
program counter, program address register, 16-bit timer registers for
timer/counters, instruction register, control registers, RAM address
register, serial data buffer, capture registers, special function registers
etc.,
•Register B is used during multiply and divide operations.
•Data pointer: It consists of DPH( a high byte) and DPL(a low byte). It holds
16- bit address. It can be used as a 16-bit register or a two independent 8-
bit registers.
•Serial Data Buffer: It consists of two separate registers, a transmit buffer
register and a receive buffer register.
•Timer Registers: (TL0,TH0), (TL1,TH1), and (TL2,TH2) are register pairs.
These register pain are 16-bit counting registers for Timer/counter 0,1, and 2
respectively.
REGISTERS: OF 8051
Program Counter: The Intel 8051 microcontroller contains a
16-bit program counter (PC) register. It points to the
address of the next instruction of the program which is to be
fetched and executed. It is automatically incremented after
fetching an instruction. It keeps the track of memory
addresses of the instructions in the program being
executed. It is affected by JUMP and CALL instructions.
•Stack pointer (SP): Intel 8051 microcontroller contains
an 8-bit stack pointer register. It is incremented before
data is stored during PUSH and CALL operations. It is
decremented when POP or RET (Return) operation takes
place. Any area of on-chip RAM can be used.
•PSW (Program Status Word): PSW register contains program status
information. Its bits are indicated by PSW.0, PSW.1, PSW.2,…….., PSW.7
7 6 5 4 3 2 1 0
Bit No. 0, PSW.0. It is for parity status (Parity flag, P).
Bit No. 1, PSW.1. Reserved.
Bit No. 2, PSW.2. Overflow flag (OV).
Bit No. 3, PSW.3. (RS0)
Bit No. 4, PSW.4. (RS1)
Bit No. 5, PSW.5. It is Flag 0 (F0) available to users for general
purpose.
Bit No. 6, PSW.6. It is auxiliary carry flag (AC).
Bit No. 7, PSW.7. It is carry flag (CY).
CY AC F0 RS1 RSO OV - P Status
information
Bit No
These bits are to select working register bank.
Memory organization
• On- chip memory
• Off-chip memory
6-Jun-23
8051 chip
Internal memory
Internal SFRs
Internal RAM
Internal ROM
External Data memory
(upto 64KB) RAM
External Code memory
(upto 64KB) ROM
20
Micro 8051
6-Jun-23
On-Chip Memory Internal RAM
22
Micro 8051
8051 CPU Registers
A (Accumulator)
B
PSW (Program Status Word)
SP (Stack Pointer)
PC (Program Counter)
DPTR (Data Pointer)
Used in assembler
instructions
6-Jun-23 23
Micro 8051
General Purpose Register
07
06
05
04
03
02
01
00
R7
R6
R5
R4
R3
R2
R1
R0
0F
08
17
10
1F
18
Bank 3
Bank 2
Bank 1
Bank 0
4 Register Banks
Each bank has R0-R7
Selectable by PSW.2,3
6-Jun-23 24
Micro 8051
Bit Addressable Memory
20h – 2Fh
(16 locations  8-bits = 128 bits)
7F 78
1A
10
0F 08
07 06 05 04 03 02 01 00
27
26
25
24
23
22
21
20
2F
2E
2D
2C
2B
2A
29
28
6-Jun-23 25
Micro 8051

Contenu connexe

Similaire à 8051.pptx

B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051MahiboobAliMulla
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller nitugatkal
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 Microcontrollers
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III  The 8051 MicrocontrollersSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III  The 8051 Microcontrollers
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 MicrocontrollersArti Parab Academics
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller918007165995
 
UNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptxUNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptxGowrishankar C
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdfSrikrishna Thota
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051guest70d48b1
 
Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]gauravholani
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copymkazree
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerAmandeep Alag
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerSudhanshu Janwadkar
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERAnkita Jaiswal
 

Similaire à 8051.pptx (20)

B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051
 
89s52 2
89s52 289s52 2
89s52 2
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 Microcontrollers
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III  The 8051 MicrocontrollersSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III  The 8051 Microcontrollers
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 Microcontrollers
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
Micro controller
Micro controllerMicro controller
Micro controller
 
UNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptxUNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptx
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]Pic microcontroller [autosaved] [autosaved]
Pic microcontroller [autosaved] [autosaved]
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copy
 
UNIT 4.pptx
UNIT 4.pptxUNIT 4.pptx
UNIT 4.pptx
 
unit-2.pptx
unit-2.pptxunit-2.pptx
unit-2.pptx
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 Microcontroller
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Microcontroller1
Microcontroller1Microcontroller1
Microcontroller1
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
 
Uc1(vii sem)
Uc1(vii sem)Uc1(vii sem)
Uc1(vii sem)
 

Dernier

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Dernier (20)

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 

8051.pptx

  • 1. 1 General-purpose microprocessor CPU General- Purpose Micro- processor RAM ROM I/O Port Timer Serial COM Port Data Bus Address Bus Figure 1-1 (a) General-Purpose Microprocessor System • CPU for Computers • No RAM, ROM, I/O on CPU chip itself • Example:Intel’s x86, Motorola’s 680x0 Many chips on mother’s board
  • 2. 2 Microcontroller RAM ROM I/O Port Timer Serial COM Port Figure 1-1 (b) Microcontroller CPU • A smaller computer • On-chip RAM, ROM, I/O ports... • Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X A single chip
  • 3. 3 Microprocessor v.s. Microcontroller Microprocessor • CPU is stand-alone, RAM, ROM, I/O, timer are separate • designer can decide on the amount of ROM, RAM and I/O ports. • expansive • versatility • general-purpose Microcontroller • CPU, RAM, ROM, I/O and timer are all on a single chip • fix amount of on-chip ROM, RAM, I/O ports • for applications in which cost, power and space are critical • single-purpose
  • 4. 4 Embedded System • Embedded system means the processor is embedded into that application. • An embedded product uses a microprocessor or microcontroller to do one task only. • In an embedded system, there is only one application software that is typically burned into ROM. • Example:printer, keyboard, video game player • Example:Table 1-1, some embedded products using microconrollers
  • 5. 5 Three criteria in Choosing a Microcontroller 1. meeting the computing needs of the task efficiently and cost effectively • speed, the amount of ROM and RAM, the number of I/O ports and timers, size, packaging, power consumption • easy to upgrade • cost per unit 2. availability of software development tools • assemblers, debuggers, C compilers, emulator, simulator, technical support 3. wide availability and reliable sources of the microcontrollers.
  • 6.
  • 7. • A single chip computer or a CPU with all the peripherals like RAM,ROM,I/O, Timers, ADCs, etc on the same chips. • A Microcontroller is meant to be more self- contained and independent, and functions ads a tiny, dedicated computer. • Originally, 8051 Microcontrollers were developed using N-MOS Technology but the use of battery powered devices and their low power consumption lead to usage of CMOS Technology (which is famous for its low power consumption). • Majority of the modern 8051 Microcontrollers are Silicon IP Cores (Intellectual Property Cores) but discrete 8051 Microcontroller IC’s are also available. Because of their low power consumption, smaller size and simple architecture, 8051 IP Cores are used in FPGAs (Field Programmable Gate Array) and SoCs (System on Chip) instead of Advanced ARM Architecture based MCUs. INTRODUCTION
  • 8. FEATURES OF 8051 • Useful for small computing tasks. • Adequate for many control and monitoring application. • Packaging (RAM, ROM, Timers on chip). • Less power consumption. • Easily upgradable. • Availability of tools of microcontroller such as proteus (simulator) and keil (compiler).
  • 10. Architectural overview of 8051 microcontroller Functional block diagram of 8051
  • 11.
  • 12. 12 Inside Architecture of 8051 CPU On-chip RAM On-chip ROM for program code 4 I/O Ports Timer 0 Serial Port Figure 1-2. Inside the 8051 Microcontroller Block Diagram OSC Interrupt Control External interrupts Timer 1 Timer/Counter Bus Control TxD RxD P0 P1 P2 P3 Address/Data Counter Inputs
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. •The 8051 is an accumulator based microcontroller. Its registers are: register A, PSW, register B, 8-bit stack pointer, 16-bit data pointer, program counter, program address register, 16-bit timer registers for timer/counters, instruction register, control registers, RAM address register, serial data buffer, capture registers, special function registers etc., •Register B is used during multiply and divide operations. •Data pointer: It consists of DPH( a high byte) and DPL(a low byte). It holds 16- bit address. It can be used as a 16-bit register or a two independent 8- bit registers. •Serial Data Buffer: It consists of two separate registers, a transmit buffer register and a receive buffer register. •Timer Registers: (TL0,TH0), (TL1,TH1), and (TL2,TH2) are register pairs. These register pain are 16-bit counting registers for Timer/counter 0,1, and 2 respectively. REGISTERS: OF 8051
  • 18. Program Counter: The Intel 8051 microcontroller contains a 16-bit program counter (PC) register. It points to the address of the next instruction of the program which is to be fetched and executed. It is automatically incremented after fetching an instruction. It keeps the track of memory addresses of the instructions in the program being executed. It is affected by JUMP and CALL instructions. •Stack pointer (SP): Intel 8051 microcontroller contains an 8-bit stack pointer register. It is incremented before data is stored during PUSH and CALL operations. It is decremented when POP or RET (Return) operation takes place. Any area of on-chip RAM can be used.
  • 19. •PSW (Program Status Word): PSW register contains program status information. Its bits are indicated by PSW.0, PSW.1, PSW.2,…….., PSW.7 7 6 5 4 3 2 1 0 Bit No. 0, PSW.0. It is for parity status (Parity flag, P). Bit No. 1, PSW.1. Reserved. Bit No. 2, PSW.2. Overflow flag (OV). Bit No. 3, PSW.3. (RS0) Bit No. 4, PSW.4. (RS1) Bit No. 5, PSW.5. It is Flag 0 (F0) available to users for general purpose. Bit No. 6, PSW.6. It is auxiliary carry flag (AC). Bit No. 7, PSW.7. It is carry flag (CY). CY AC F0 RS1 RSO OV - P Status information Bit No These bits are to select working register bank.
  • 20. Memory organization • On- chip memory • Off-chip memory 6-Jun-23 8051 chip Internal memory Internal SFRs Internal RAM Internal ROM External Data memory (upto 64KB) RAM External Code memory (upto 64KB) ROM 20 Micro 8051
  • 21.
  • 22. 6-Jun-23 On-Chip Memory Internal RAM 22 Micro 8051
  • 23. 8051 CPU Registers A (Accumulator) B PSW (Program Status Word) SP (Stack Pointer) PC (Program Counter) DPTR (Data Pointer) Used in assembler instructions 6-Jun-23 23 Micro 8051
  • 24. General Purpose Register 07 06 05 04 03 02 01 00 R7 R6 R5 R4 R3 R2 R1 R0 0F 08 17 10 1F 18 Bank 3 Bank 2 Bank 1 Bank 0 4 Register Banks Each bank has R0-R7 Selectable by PSW.2,3 6-Jun-23 24 Micro 8051
  • 25. Bit Addressable Memory 20h – 2Fh (16 locations  8-bits = 128 bits) 7F 78 1A 10 0F 08 07 06 05 04 03 02 01 00 27 26 25 24 23 22 21 20 2F 2E 2D 2C 2B 2A 29 28 6-Jun-23 25 Micro 8051