SlideShare a Scribd company logo
Lecture 1
Course Overview and
The 8051 Architecture
2
MCUniversity Program Lectures
 8051 architecture
 System overview of C8051F020
 8051 instruction set
 System clock, crossbar and GPIO
 Assembler directives
 Programming using C language
 Interrupts
 Timer operations and programming
 Serial communication
 DAC and comparator
 ADC
3
Course Syllabus
Lecture
Topic
Tutorial
Questions Lab number and Topic Language
1 Course overview and 8051 architecture 1
2 System overview of C8051F020 2 0. Prelab: Working with the tools
3 Toolstick Platform Overview
4 8051 Instruction Set 3
5 System Clock, Crossbar, and GPIO 4 1. Blinky (no timers) Assembly
6 Assembler Directives 5 2. 16x16 Multiply Assembly
7 Programming using C Language 6 3. Blinky (no timers) C
8 Interrupts 7
9 Timer Operations and Programming 8 4. Blinky (timer with ISR) Assembly
5. Blinky (timer with ISR) and
other timer operations C
6. Switch debouncing C
10 Serial Communication 9 7. Serial Communication and LCD C
11 DAC and Comparator 8. Analog Comparators C
9. DAC C
12 ADC 10 10. ADC C
 Lectures and Tutorial questions are based on the
“Embedded Programming with Field-Programmable
Mixed-Signal Microcontrollers” Textbook
4
Course Goals
 At the end of this course, you should be able to:
 Understand the architecture of one of the most popular
microcontroller (MCU) families
 Use an integrated development environment (IDE) to program and
debug an MCU
 Program an MCU using Assembly and C languages
 Understand and use peripherals integrated into an MCU
 Interface an MCU to simple external components
 Understand and use interrupts
 Use timers in various modes
 Communicate using a serial interface
 Understand and use analog to digital converters (ADC), digital to
analog converters (DAC) and comparators
5
Course Prerequisites
 A course in Electric Circuits that includes understanding
basic electronic components such as resistors, capacitors,
diodes and transistors
 A course in basic digital logic design that includes logic
gates and Boolean arithmetic
 Ability to program in a high-level programming language
such as C or C++
6
The 8051 Architecture
 Microprocessors and microcontrollers
 The 8051 microcontroller: a brief history
 Block diagram of the original 8051
 Is 8-bit still relevant?
 Harvard and von Neumann architectures
 Memory organization
 Special function registers
7
Microprocessors and Microcontrollers
 Microprocessor: general-purpose CPU
 Emphasis is on flexibility and performance
 Generic user-interface such as keyboard, mouse, etc.
 Used in a PC, PDA, cell phone, etc.
 Microcontroller: microprocessor + memory on a single chip
 Emphasis is on size and cost reduction
 The user interface is tailored to the application, such as the buttons
on a TV remote control
 Used in a digital watch, TV remote control, car and many common
day-to-day appliances
8
Terminology
 Integrated Circuit (IC): A miniaturized electronic circuit that
consists of semiconductor devices and passive components
contained in a package
 Central Processing Unit (CPU): This refers to the core of the
MCU that executes code
 Microcontroller Unit (MCU): This is the standard acronym
used for microcontrollers, and refers to the full IC that
contains the CPU and peripherals.
 “n-bit” – the “n” refers to the data bus width of the CPU, and
is the maximum width of data it can handle at a time
 Examples: 8-bit MCU, 32-bit MCU
9
Microcontroller Architectures
 Microcontroller architecture refers to the internal hardware
organization of a microcontroller
 Each hardware architecture has its own set of software
instructions called assembly language that allows
programming of the microcontroller
 Some of the popular microcontroller architectures
 Intel 8051
 Zilog Z80
 Atmel AVR
10
The 8051 Microcontroller—A Brief History
 In 1980, Intel introduced the 8051, relevant today after more
than two decades
 First device in the MCS-51® family of 8-bit microcontrollers
 In addition to Intel there are other second source suppliers
of the ICs, who make microcontrollers that are compatible
with the 8051 architecture.
 In recent years some companies have incorporated many
different and additional features into 8051
 In 2000, Silicon Laboratories introduced a field
programmable, mixed-signal chip (C8051F020) based on
the 8051 core CPU
 This will be the platform for this course.
11
Is 8-bit Still Relevant?
 “n-bit” – the “n” refers to the data bus width of the CPU, and
is the maximum width of data it can handle at a time
 PCs with 64-bit microprocessors are becoming common
 Over 55% of all processors sold per year are 8-bit
processors, which comes to over 3 billion of them per year!*
 8-bit microcontrollers are sufficient and cost-effective for
many embedded applications
 More and more advanced features and peripherals are
added to 8-bit processors by various vendors
 8-bit MCUs are well-suited for low-power applications that
use batteries
*Note: Statistics from Embedded.com Article ID# 9900861, Dec 2002
12
Example System: RC Car
Forward
Reverse
Left
Right
Microcontroller
Controls
RF
Transmitter
Batteries
Voltage Regulator
Antenna
Power
RF Receiver
Antenna
Microcontroller
Front Electric
Motor (Left/Right)
Rear Electric Motor
(Fwd/Reverse)
Car lights (LEDs)
Batteries
Voltage Regulator
Power
13
Block Diagram of the Original 8051
Timer/Counter
(Timer 0 &
Timer 1)
4K byte Program
Memory (ROM)
128 bytes
Data Memory
(RAM)
I/O ports Serial Port
64 K Bus
Expansion Control
8051 CPU
Oscillator
&Timing
P3 P2 P1 P0
(Address/data)
TxD RxDALE /PSEN
From Crystal
Oscillator or RC
network
/INT0 /INT1
Other
interrupts
T0 T1
14
Block Diagram of the Silicon Labs 8051
15
Harvard and von Neumann Architectures
 Harvard Architecture—a type of computer architecture
where the instructions (program code) and data are stored
in separate memory spaces
 Example: Intel 8051 architecture
 von Neumann Architecture—another type of computer
architecture where the instructions and data are stored in
the same memory space
 Example: Intel x86 architecture (Intel Pentium, AMD Athlon, etc.)
16
MCU Fetch-Execute Cycle
 Fetch operation—retrieves
an instruction from the
location in code memory
pointed to by the program
counter (PC)
 Execute operation—
executes the instruction
that was fetched during the
fetch operation. In addition
to executing the instruction,
the CPU also adds the
appropriate number to the
PC to point it to the next
instruction to be fetched.
Program
Counter
(PC)
Code Memory
F
e
t
c
h
CPU
+
To other
peripherals
17
8051 and 8052
 The feature set of the 8052 is the superset of the 8051
 In addition to all the features of the 8051, the 8052 includes
 128 bytes internal RAM (total of 256 bytes)
 A third 16-bit timer, with new modes of operation
 Additional SFRs to support the third timer
 The Silicon Labs C8051F020 builds upon the 8052, and
adds further features
 The term “8051” is typically used in place of “8052”, and also
refers to the 8051 architecture
18
C8051F020 Data Memory (RAM)
 Internal Data Memory space is
divided into three sections
 Lower 128
 Upper 128
 Special function register (SFR)
 There are 384 bytes of memory
space physically, though the
Upper 128 and SFRs share the
same addresses from location
80H to FFH.
 Appropriate instructions should
be used to access each memory
block
19
Lower 128—Register Banks and RAM
Bit-addressable
Area (16 bytes)
Register Banks
(8 bytes per
bank; 4 banks)
General
Purpose RAM
(80 bytes)
20
Special Function Registers (SFRs)
 SFRs provide control and
data exchange with the
microcontroller’s resources
and peripherals
 Registers which have their
byte addresses ending with
0H or 8H are byte- as well as
bit- addressable
 Some registers are not bit-
addressable. These include
the stack pointer (SP) and
data pointer register (DPTR)
21
Summary of SFRs
 Accumulator (ACC) and B register
 ACC (also referred to as A) is used implicitly by several instructions
 B is used implicitly in multiply and divide operations
 These registers are the input/output of the arithmetic and logic unit (ALU)
 Program status word—PSW
 Shows the status of arithmetic and logical operations using multiple bits such as Carry
 Selects the Register Bank (Bank 0 - Bank 3)
 Stack pointer—SP
 Data pointer—DPTR (DPH and DPL)
 16-bit register used to access external code or data memory
 Timer Registers—TH0, TL0, TH1, TL1, TMOD, TCON
 Used for timing intervals or counting events
 Parallel I/O Port Registers—P0, P1, P2 and P3
 Serial Communication Registers—SBUF and SCON
 Interrupt Management Registers—IP and IE
 Power Control Register—PCON
www.silabs.com/MCU

More Related Content

DOC
Microprocessor and Microcontroller Anna University Answer Key April / May - 2015
PDF
EE8551 MPMC
PPTX
8051 Microcontroller Tutorial and Architecture with Applications
PDF
Microprocessor & Microcontoller short questions with answers
PDF
Introduction to 8085 Microprocessors
PDF
Question Bank microcontroller 8051
PDF
Introduction to 8085svv
DOC
8051 Microcontroller Notes
Microprocessor and Microcontroller Anna University Answer Key April / May - 2015
EE8551 MPMC
8051 Microcontroller Tutorial and Architecture with Applications
Microprocessor & Microcontoller short questions with answers
Introduction to 8085 Microprocessors
Question Bank microcontroller 8051
Introduction to 8085svv
8051 Microcontroller Notes

What's hot (20)

PPTX
8051 Microcontroller
PDF
EE6008 MBSD
DOCX
Embedded systems class notes
PPTX
8051 Microcontroller PPT's By Er. Swapnil Kaware
PDF
Microcontrollers 80 Marks Sample Question Paper
PPT
Lecture 1
PPTX
Introduction to microprocessor
PDF
20838382 microprocessor-8085-notes
PPT
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
PPT
Introduction to 8085 microprocessor
PDF
MICROPROCESSOR 8085 WITH PROGRAMS
DOC
8051 dev board guide
PPTX
Micro 8051
PDF
Week 1.2 pin diagram
PPTX
Introduction to 8085 Microprocessor
PPT
microcontroller basics
PDF
Architecture OF 8085
PDF
Week 1.3 architecture
PPT
8051 Microcontroller
EE6008 MBSD
Embedded systems class notes
8051 Microcontroller PPT's By Er. Swapnil Kaware
Microcontrollers 80 Marks Sample Question Paper
Lecture 1
Introduction to microprocessor
20838382 microprocessor-8085-notes
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
Introduction to 8085 microprocessor
MICROPROCESSOR 8085 WITH PROGRAMS
8051 dev board guide
Micro 8051
Week 1.2 pin diagram
Introduction to 8085 Microprocessor
microcontroller basics
Architecture OF 8085
Week 1.3 architecture
Ad

Similar to Lecture 1 (course overview and 8051 architecture) rv01 (20)

PPTX
Vinod ppt on es31 08 15
PPTX
MPMC UNIT II edited . ppt X and communication
PPTX
Microcontroller Electronics Engineering Sem 4MODULE 1.pptx
PDF
Architecture and Programmingpart1_Microcontroller
PPTX
Microcontrollers and its applications unit 1
PPTX
8051 microcontroller
PPTX
BEC405A_MICROCONTROLLERS_2023-24_M1.pptx
PPT
MICROCONTROLLER MODULE-1 PPT Includes basics of microcontroller , application...
PPTX
8051 presentation
PDF
Microcontrollers 8051 MSP430 notes
PPT
Embeded system by Mitesh Kumar
PPTX
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 Microcontrollers
PDF
microcontroller 8051 17.07.2023.pdf
PPTX
microcontroller 8051 hfdsdsyghydfhdsgukhdfsdgjkghu
PPT
INTRODUCTION TO MICROCONTROLLERS(8051) ARCHITECTURE,INSTRUCTION SET ,ADDRESSI...
PPT
8051 Microcontroller slides foe electronics
PPT
Microcontroller-8051.ppt
PDF
MICROCONTROLLER - INTEL 8051
Vinod ppt on es31 08 15
MPMC UNIT II edited . ppt X and communication
Microcontroller Electronics Engineering Sem 4MODULE 1.pptx
Architecture and Programmingpart1_Microcontroller
Microcontrollers and its applications unit 1
8051 microcontroller
BEC405A_MICROCONTROLLERS_2023-24_M1.pptx
MICROCONTROLLER MODULE-1 PPT Includes basics of microcontroller , application...
8051 presentation
Microcontrollers 8051 MSP430 notes
Embeded system by Mitesh Kumar
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT III The 8051 Microcontrollers
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 hfdsdsyghydfhdsgukhdfsdgjkghu
INTRODUCTION TO MICROCONTROLLERS(8051) ARCHITECTURE,INSTRUCTION SET ,ADDRESSI...
8051 Microcontroller slides foe electronics
Microcontroller-8051.ppt
MICROCONTROLLER - INTEL 8051
Ad

More from cairo university (20)

PPSX
Tocci chapter 13 applications of programmable logic devices extended
PPSX
Tocci chapter 12 memory devices
PPSX
Tocci ch 9 msi logic circuits
PPSX
Tocci ch 7 counters and registers modified x
PPSX
Tocci ch 6 digital arithmetic operations and circuits
PPSX
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
PPSX
A15 sedra ch 15 memory circuits
PPSX
A14 sedra ch 14 advanced mos and bipolar logic circuits
PPSX
A13 sedra ch 13 cmos digital logic circuits
PPSX
A09 sedra ch 9 frequency response
PPTX
5 sedra ch 05 mosfet.ppsx
PPSX
5 sedra ch 05 mosfet
PPSX
5 sedra ch 05 mosfet revision
PDF
Fields Lec 2
PDF
Fields Lec 1
PDF
Fields Lec 5&6
PDF
Fields Lec 4
PDF
Fields Lec 3
PPT
Lecture 2 (system overview of c8051 f020) rv01
PDF
Lecture 12 (adc) rv01
Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 12 memory devices
Tocci ch 9 msi logic circuits
Tocci ch 7 counters and registers modified x
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
A15 sedra ch 15 memory circuits
A14 sedra ch 14 advanced mos and bipolar logic circuits
A13 sedra ch 13 cmos digital logic circuits
A09 sedra ch 9 frequency response
5 sedra ch 05 mosfet.ppsx
5 sedra ch 05 mosfet
5 sedra ch 05 mosfet revision
Fields Lec 2
Fields Lec 1
Fields Lec 5&6
Fields Lec 4
Fields Lec 3
Lecture 2 (system overview of c8051 f020) rv01
Lecture 12 (adc) rv01

Recently uploaded (20)

PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
DOCX
573137875-Attendance-Management-System-original
PPT
Mechanical Engineering MATERIALS Selection
PPT
Project quality management in manufacturing
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
additive manufacturing of ss316l using mig welding
PDF
R24 SURVEYING LAB MANUAL for civil enggi
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Digital Logic Computer Design lecture notes
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
OOP with Java - Java Introduction (Basics)
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
573137875-Attendance-Management-System-original
Mechanical Engineering MATERIALS Selection
Project quality management in manufacturing
CH1 Production IntroductoryConcepts.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
additive manufacturing of ss316l using mig welding
R24 SURVEYING LAB MANUAL for civil enggi
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
CYBER-CRIMES AND SECURITY A guide to understanding
Digital Logic Computer Design lecture notes
UNIT-1 - COAL BASED THERMAL POWER PLANTS
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
OOP with Java - Java Introduction (Basics)

Lecture 1 (course overview and 8051 architecture) rv01

  • 1. Lecture 1 Course Overview and The 8051 Architecture
  • 2. 2 MCUniversity Program Lectures  8051 architecture  System overview of C8051F020  8051 instruction set  System clock, crossbar and GPIO  Assembler directives  Programming using C language  Interrupts  Timer operations and programming  Serial communication  DAC and comparator  ADC
  • 3. 3 Course Syllabus Lecture Topic Tutorial Questions Lab number and Topic Language 1 Course overview and 8051 architecture 1 2 System overview of C8051F020 2 0. Prelab: Working with the tools 3 Toolstick Platform Overview 4 8051 Instruction Set 3 5 System Clock, Crossbar, and GPIO 4 1. Blinky (no timers) Assembly 6 Assembler Directives 5 2. 16x16 Multiply Assembly 7 Programming using C Language 6 3. Blinky (no timers) C 8 Interrupts 7 9 Timer Operations and Programming 8 4. Blinky (timer with ISR) Assembly 5. Blinky (timer with ISR) and other timer operations C 6. Switch debouncing C 10 Serial Communication 9 7. Serial Communication and LCD C 11 DAC and Comparator 8. Analog Comparators C 9. DAC C 12 ADC 10 10. ADC C  Lectures and Tutorial questions are based on the “Embedded Programming with Field-Programmable Mixed-Signal Microcontrollers” Textbook
  • 4. 4 Course Goals  At the end of this course, you should be able to:  Understand the architecture of one of the most popular microcontroller (MCU) families  Use an integrated development environment (IDE) to program and debug an MCU  Program an MCU using Assembly and C languages  Understand and use peripherals integrated into an MCU  Interface an MCU to simple external components  Understand and use interrupts  Use timers in various modes  Communicate using a serial interface  Understand and use analog to digital converters (ADC), digital to analog converters (DAC) and comparators
  • 5. 5 Course Prerequisites  A course in Electric Circuits that includes understanding basic electronic components such as resistors, capacitors, diodes and transistors  A course in basic digital logic design that includes logic gates and Boolean arithmetic  Ability to program in a high-level programming language such as C or C++
  • 6. 6 The 8051 Architecture  Microprocessors and microcontrollers  The 8051 microcontroller: a brief history  Block diagram of the original 8051  Is 8-bit still relevant?  Harvard and von Neumann architectures  Memory organization  Special function registers
  • 7. 7 Microprocessors and Microcontrollers  Microprocessor: general-purpose CPU  Emphasis is on flexibility and performance  Generic user-interface such as keyboard, mouse, etc.  Used in a PC, PDA, cell phone, etc.  Microcontroller: microprocessor + memory on a single chip  Emphasis is on size and cost reduction  The user interface is tailored to the application, such as the buttons on a TV remote control  Used in a digital watch, TV remote control, car and many common day-to-day appliances
  • 8. 8 Terminology  Integrated Circuit (IC): A miniaturized electronic circuit that consists of semiconductor devices and passive components contained in a package  Central Processing Unit (CPU): This refers to the core of the MCU that executes code  Microcontroller Unit (MCU): This is the standard acronym used for microcontrollers, and refers to the full IC that contains the CPU and peripherals.  “n-bit” – the “n” refers to the data bus width of the CPU, and is the maximum width of data it can handle at a time  Examples: 8-bit MCU, 32-bit MCU
  • 9. 9 Microcontroller Architectures  Microcontroller architecture refers to the internal hardware organization of a microcontroller  Each hardware architecture has its own set of software instructions called assembly language that allows programming of the microcontroller  Some of the popular microcontroller architectures  Intel 8051  Zilog Z80  Atmel AVR
  • 10. 10 The 8051 Microcontroller—A Brief History  In 1980, Intel introduced the 8051, relevant today after more than two decades  First device in the MCS-51® family of 8-bit microcontrollers  In addition to Intel there are other second source suppliers of the ICs, who make microcontrollers that are compatible with the 8051 architecture.  In recent years some companies have incorporated many different and additional features into 8051  In 2000, Silicon Laboratories introduced a field programmable, mixed-signal chip (C8051F020) based on the 8051 core CPU  This will be the platform for this course.
  • 11. 11 Is 8-bit Still Relevant?  “n-bit” – the “n” refers to the data bus width of the CPU, and is the maximum width of data it can handle at a time  PCs with 64-bit microprocessors are becoming common  Over 55% of all processors sold per year are 8-bit processors, which comes to over 3 billion of them per year!*  8-bit microcontrollers are sufficient and cost-effective for many embedded applications  More and more advanced features and peripherals are added to 8-bit processors by various vendors  8-bit MCUs are well-suited for low-power applications that use batteries *Note: Statistics from Embedded.com Article ID# 9900861, Dec 2002
  • 12. 12 Example System: RC Car Forward Reverse Left Right Microcontroller Controls RF Transmitter Batteries Voltage Regulator Antenna Power RF Receiver Antenna Microcontroller Front Electric Motor (Left/Right) Rear Electric Motor (Fwd/Reverse) Car lights (LEDs) Batteries Voltage Regulator Power
  • 13. 13 Block Diagram of the Original 8051 Timer/Counter (Timer 0 & Timer 1) 4K byte Program Memory (ROM) 128 bytes Data Memory (RAM) I/O ports Serial Port 64 K Bus Expansion Control 8051 CPU Oscillator &Timing P3 P2 P1 P0 (Address/data) TxD RxDALE /PSEN From Crystal Oscillator or RC network /INT0 /INT1 Other interrupts T0 T1
  • 14. 14 Block Diagram of the Silicon Labs 8051
  • 15. 15 Harvard and von Neumann Architectures  Harvard Architecture—a type of computer architecture where the instructions (program code) and data are stored in separate memory spaces  Example: Intel 8051 architecture  von Neumann Architecture—another type of computer architecture where the instructions and data are stored in the same memory space  Example: Intel x86 architecture (Intel Pentium, AMD Athlon, etc.)
  • 16. 16 MCU Fetch-Execute Cycle  Fetch operation—retrieves an instruction from the location in code memory pointed to by the program counter (PC)  Execute operation— executes the instruction that was fetched during the fetch operation. In addition to executing the instruction, the CPU also adds the appropriate number to the PC to point it to the next instruction to be fetched. Program Counter (PC) Code Memory F e t c h CPU + To other peripherals
  • 17. 17 8051 and 8052  The feature set of the 8052 is the superset of the 8051  In addition to all the features of the 8051, the 8052 includes  128 bytes internal RAM (total of 256 bytes)  A third 16-bit timer, with new modes of operation  Additional SFRs to support the third timer  The Silicon Labs C8051F020 builds upon the 8052, and adds further features  The term “8051” is typically used in place of “8052”, and also refers to the 8051 architecture
  • 18. 18 C8051F020 Data Memory (RAM)  Internal Data Memory space is divided into three sections  Lower 128  Upper 128  Special function register (SFR)  There are 384 bytes of memory space physically, though the Upper 128 and SFRs share the same addresses from location 80H to FFH.  Appropriate instructions should be used to access each memory block
  • 19. 19 Lower 128—Register Banks and RAM Bit-addressable Area (16 bytes) Register Banks (8 bytes per bank; 4 banks) General Purpose RAM (80 bytes)
  • 20. 20 Special Function Registers (SFRs)  SFRs provide control and data exchange with the microcontroller’s resources and peripherals  Registers which have their byte addresses ending with 0H or 8H are byte- as well as bit- addressable  Some registers are not bit- addressable. These include the stack pointer (SP) and data pointer register (DPTR)
  • 21. 21 Summary of SFRs  Accumulator (ACC) and B register  ACC (also referred to as A) is used implicitly by several instructions  B is used implicitly in multiply and divide operations  These registers are the input/output of the arithmetic and logic unit (ALU)  Program status word—PSW  Shows the status of arithmetic and logical operations using multiple bits such as Carry  Selects the Register Bank (Bank 0 - Bank 3)  Stack pointer—SP  Data pointer—DPTR (DPH and DPL)  16-bit register used to access external code or data memory  Timer Registers—TH0, TL0, TH1, TL1, TMOD, TCON  Used for timing intervals or counting events  Parallel I/O Port Registers—P0, P1, P2 and P3  Serial Communication Registers—SBUF and SCON  Interrupt Management Registers—IP and IE  Power Control Register—PCON