Notes Architechture8051
Notes Architechture8051
Notes Architechture8051
Overview
• Basic components of digital computers
• Microcontrollers and Embedded Systems
• Applications and Common
Microcontrollers
• The MCS-51 Family of Microcontrollers
• On-chip memory, registers
• On-chip facilities overview
Basic Components of Digital
Computer
• CPU
• Memory Memory
• I/O CPU
I/O
Could be a chip, a
board, or several
boards
Microcontrollers
Memory
ROM RAM
CPU
I/O
Subsystems:
Timers, Counters, Analog
A single chip Interfaces, I/O interfaces
Embedded Systems
Real Time Control
Sensor conditioning
Output interfaces
sensor
actuator
Microcontroller
sensor
(uC) indicator
sensor
Common Microcontrollers
•Atmel •Motorola
•ARM •8-bit
•Intel •68HC05
•8-bit •68HC08
•8XC42 •68HC11
•MCS48 •16-bit
•MCS51 •68HC12
•8xC251 •68HC16
•16-bit •32-bit
•MCS96 •683xx
•MXS296 •Texas Instruments
•National Semiconductor •TMS370
•COP8 •MSP430
•Microchip •Zilog
•12-bit instruction PIC •Z8
•14-bit instruction PIC •Z86E02
•PIC16F84
•16-bit instruction PIC
•NEC
Microcontroller Architectures
Memory
0
Address Bus
Program
CPU Data Bus + Data Von Neumann
2n
Architecture
Memory
0
Address Bus
Program
CPU Fetch Bus Harvard
Address Bus 0
Architecture
Data Bus Data
MCS-51 “Family” of
Microcontollers
Timer 0 P3.4 / T0
Timer 1 P3.5 / T1
[I/O]
Serial Input Port P3.0 /RXD
Serial Output Port P3.1 /TXD
Port 1 P1 8
12
8051 Microcontroller Interface
Signals (2)
External Access Enable/ EA*/VPP
Programming Voltage
Reset RST
13
Inside Microcontroller
Signal
Pins
Bit Addressable RAM
Summary
of the 8051
on-chip
data
memory
(RAM)
Bit Addressable RAM
Summary
of the 8051
on-chip
data
memory
(Special
Function
Registers)
8051 CPU Registers
A (Accumulator)
B
PSW (Program Status Word)
SP (Stack Pointer)
PC (Program Counter)
DPTR (Data Pointer)
Used in assembler
instructions
Parallel I/O Ports
• Each port can be input or output
• Direction is set in Special Function Registers
Bank 2
10
0F
Bank 1
08
07 R7
06 R6
05 R5
04 R4
03 R3 Bank 0
02 R2
01 R1
00 R0
Bit Addressable Memory
2F 7F 78 20h – 2Fh (16 locations X
2E
8-bits = 128 bits)
2D
2C
Bit addressing:
2B
2A
mov C, 1Ah
29 or
28 mov C, 23h.2
27
26
25
24
23 1A
22 10
21 0F 08
20 07 06 05 04 03 02 01 00
Special Function Registers
DATA registers
CONTROL registers
•Timers
•Serial ports Addresses 80h – FFh
•Interrupt system
•Analog to Digital converter Direct Addressing used to
•Digital to Analog converter access SPRs
•Etc.
On-Chip Memory: Program/Data
Serial Port (UART)
Original 8051 had one serial port
TX (transmit)
Serial
Port RX (receive)