Você está na página 1de 17

Introduction of microprocessor

• CPU for Computers


• No RAM, ROM, I/O ports on CPU chip itself
• All components are interfaced externally
• Becomes bulky
• costly
• Example : Intel’s x86, Motorola’s 680x0

Many chips on mother’s board


Data Bus
CPU
General-
Serial
Purpose RAM ROM I/O Timer COM
Micro- Port
Port
processor
Address Bus

General-Purpose Microprocessor System


Intrduction of Microcontroller
• Mini computer
• All the components (Ram,Rom,I/O ports,Timer..) are inbuilt on the single
chip
• Compact size
• Fast processing
• Example : Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X

CPU RAM ROM


A single chip
Serial
I/O Timer COM
Port
Port
Microcontroller
Comparison of the 8051 Family Members

Feature 8051 8052 8031


ROM (program space in bytes) 4K 8K 0K
RAM (bytes) 128 256 128
Timers 2 3 2
I/O pins 32 32 32
Serial port 1 1 1
Interrupt sources 6 8 6
Contents:
Features
Block Diagram
Memory Organization
Some registers
Block Diagram
External interrupts
On-chip Timer/Counter

Interrupt ROM for


On-chip Timer 1 Counter
Control program
RAM Timer 0 Inputs
code

CPU

Bus Serial
4 I/O Ports
OSC Control Port

P0 P1 P2 P3 TxD RxD
Address/Data
Memory mapping in 8051

• ROM memory map in 8051 family

4k 8k 32k
0000H 0000H 0000H

0FFFH
DS5000-32

1FFFH
8751
AT89C51
8752
AT89C52 7FFFH

from Atmel Corporation


from Dallas Semiconductor
• RAM memory space allocation in the 8051

7FH

Scratch pad RAM

30H

2FH
Bit-Addressable RAM

20H
1FH Register Bank 3
18H
17H
Register Bank 2
10H
0FH Stack) Register Bank 1)
08H
07H
Register Bank 0
00H
Families of Microcontrollers
8051 MCS (Micro Controller Series):

• 89C51
• 89S51
• 89C52
• 89S52
• 89C1051
• 89C2051
• 89C4051

8095 MCS (Micro Controller Series):

• 8095
• 8096
• 8097
• 8395
• 8396
• 8397
The necessary tools for a
microprocessor/controller
 CPU: Central Processing Unit
 I/O: Input /Output
 Bus: Address bus & Data bus
 Memory: RAM & ROM
 Timer
 Interrupt
 Serial Port
 Parallel Port
Embedded system

Features:

Small size

Low power

Efficient use of PCB space

High performance in small size

High MIPS / power consumption ratio

High bus bandwidth

Low interface bottlenecks


Examples
Products Personal information :
Cell phone, pager, watch, pocket recorder, calculator
Watch, pocket recorder, calculator.
Laptop components:
mouse, keyboard, modem, faxcard, sound card, battery charger
Home appliances:
Door lock, alarm clock, thermostat, air conditioner, tv remote,
VCR, small refrigerator, exercise equipment, washer/dryer,
Microwave oven.
Toys:
Video games, cars, dolls, etc.
What is a microcontroller ?

• A Microcontroller is a small CPU with many support


devices built into the chip
• Self Contained (CPU, Memory, I/O)
• Application or Task Specific (Not a general purpose
• computer)
• Appropriately scaled for the job
• Small power consumption
• Low costs ( $0.50 to $5.00.)
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
Registers
A

R0
DPTR DPH DPL
R1

R2 PC PC
R3

R4 Some 8051 16-bit Register

R5

R6

R7

Some 8-bitt Registers of


the 8051
8051 Flag bits and the PSW register
• PSW Register
CY AC F0 RS1 RS0 OV -- P

Carry flag PSW.7 CY


Auxiliary carry flag PSW.6 AC
Available to the user for general purpose PSW.5 --
Register Bank selector bit 1 PSW.4 RS1
Register Bank selector bit 0 PSW.3 RS0
Overflow flag PSW.2 OV
User define bit PSW.1 --
Parity flag Set/Reset odd/even parity PSW.0 P

RS1 RS0 Register Bank Address

0 0 0 00H-07H

0 1 1 08H-0FH

1 0 2 10H-17H

1 1 3 18H-1FH
Instructions that Affect Flag Bits:

Note: X can be 0 or 1

Você também pode gostar