SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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)
 

Último

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
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
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Último (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.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...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
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...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

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