Notes Architechture8051

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 28

Hardware Architecture Of 8051

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

Must be able to respond


predictably and in a
known amount of time

Environment cannot wait


for microcontroller to
respond.
Embedded System
General Block Diagram

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

• 8051 introduced by Intel in late 1970s


• Now produced by many companies in
many variations
• The most pupular microcontroller – about
40% of market share
• 8-bit microcontroller
8051 Microcontroller
• Complete, highly-integrated microcomputer
– CPU, RAM, ROM, IO
• Port 0
– 8-bit bidirectional I/O port OR
– multiplexed low-order address and data bus bytes
• Port 1
– 8-bit bidirectional I/O port
• Port 2
– 8-bit bidirectional I/O port OR
– high-order address byte
• Port 3
– 8-bit bidirectional I/O port OR 11
– various special-function signals
8051 Microcontroller Interface
Signals (1)
8
Port 0 or Lo Addr/Data PO/AD[7-0]
P2 / A[15-8] 8
Port 2 or Hi Addr

Addr Latch Ena/Program ALE /PROG*


Program Store Enable PSEN
Port 3/Special Functions: [Bus Timing]
Write P3.6 / WR*
Read P3.7 / RD*

Interrupt 0 [Int] P3.2 /INT0*


Interrupt 1 P3.3 /INT1*

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

Crystal/oscillator XTAL2* (External)


Clock / Reset
Crystal XTAL1* Generator

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

Port0 Port1 Port2 Port3


latch latch latch latch

Port0 Port1 Port2 Port3


I/O Port Circuitry
Alternate Pin-functions
On-Chip DATA Memory: RAM
Internal RAM
1F
Registers
Four Register Banks
Bank 3 Each bank has R0-R7
18
17

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)

Data sent and received serially


BAUD rate must agree between sender and receiver
Transmission modes selected using SFR

You might also like