Sie sind auf Seite 1von 22

MICROPROCESSOR Vs MICROCONTROLLER

GENERAL PURPOSE MICROPROCESSOR

CPU for computers


No RAM, ROM, I/O on chip itself ExampleIntels x86, Motorolas 680x0

GENERAL-PURPOSE MICROPROCESSOR SYSTEM


Data bus CPU General Purpose RAM ROM Micro processor Address bus

I/O PORT

Timer

Serial COM Port

MICROCONTROLLER

A smaller computer
On-chip RAM, ROM, I/O ports...
ExampleMotorolas 6811, Intels 8051, Zilogs Z8 and PIC 16X

MICRO PROCESSOR Vs MICRO CONTROLLER

MICROPROCESSOR:

ROM External Program Counter Bus interface Logic RAM External Displa y i/ps

ALU

Registers.

Peripheral Controller External

MICRO CONTROLLER Block diagram


EXTERNAL INTRRUPTS

INTERRUPT CONTROL

ON-CHIP ROM FOR PROGRAM CODE

TIMER0

ON-CHIP RAM

TIMER1

COUNTER INPUTS

CPU

OSC

BUS CONTROL

4 I/O PORTS

SERIAL PORT

P0

P1 P2 P3

TXD

RXD

ADDRESS/DATA

Introduction to 8051 Micro controller

MICROPROCESSOR Vs MICROONTROLLER

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.
Expensive 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

Overview of 8051 family


8051 is a 8-bit micro controller ,it is introduced by Intel corporation.8051 is the original member of the 8051 family. Other members of 8051 family 8052 and 8031 are the other family members of 8051. The following table gives comparison of 8051 family members

Feature
ROM(on-chip program space in bytes)
RAM(bytes) Timers 1/O pins Serial Port Interrupt sources

8051 8052
4K
128 2 32 1 6

8031
0K
128 2 32 1 6

8K
256 3 32 1 8

Various 8051 microcontrollers


8051 is available in different memory types,such as UV-EPROM , flash,and NV-RAM,all of which have different memory types. 8751 micro controller: This 8751 chip has only 4K bytes of on-chip UV_EPROM.To use this chip for development requires access to as PROM burner,as well as a UV-EPROM eraser to erase the contents of UV-EPROM inside the8751 chip before you can program it again It takes 20 mins to erase before it can be programmed again. AT89C51 from Atmel corporation: This 8051 chip has on-chip ROM in the form of flash memory. AT89C51 is used in place of the 8751 to eliminate the waiting time needed to erase the chip and thereby speed up the development time.

Versions of 8051 from Atmel(All ROM Flash)


Part Number ROM RAM I/o Timer Interrupts Vcc Packaging Pins

AT89C51

4K

128
128

32
32

2
2

6
6

5V
3V

40
40

AT89LV51 4K

AT89C105 4K 1 AT89C205 2K 1 AT89C52 8K AT89LV52 8K

64
128

15
15

1
2

3
6

3V
3V

20
20

128 128

32 32

3 3

8 8

5V 3V

40 40

DS from Dallas Semiconductor


DS5000 is another chip from Dallas semiconductor.The onchip ROM for the DS5000 is in the form of NV-RAM.The read/write capability of NV-RAM allows the program to be loaded into the on-chip ROM while it is in the system. 1.Having on-chip back up battery 2.Having special circuit which connects RAM to battery immediately after removing the supply voltage

P89C51 from Phillips:


It is another major producer of 8051 family from Phillips Corporation It has the following features 1.It has 10K bytes of on-chip ROM 2.Allows In system programming (ISP).Hence no need to use PROM programmer

8051 PIN description


P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST (RXD) P3.0 (TXD) P3.1 (INT0) P3.2 (INT1) P3.3 (T0) P3.4 (T1) P3.5 1 2 3 4 5 6 35 7 8 9 10 11 12 13 14 15 40 39 38 37 36 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)

8051

34 33 32

31
30 29 28 27 26

EA/VPP
ALE/PROG PSEN P2.7 (A15) P2.6 (A14) P2.5 (A13)

(WR) P3.6
(RD) P3.7 XTAL2 XTAL1 GND

16
17 18 19 20

25
24 23 22 21

P2.4 (A12)
P2.3 (A11) P2.2 (A10) P2.1 (A9) P2.0 (A8)

Pin number
Vcc(Pin 40) GND(Pin 20) XTAL1(Pin19) and XTAL2(Pin18) RST(Pin 9)

Description
Provides supply voltage to the chip .The voltage source is +5V It is the Ground The 8051 needs external clock to run it.Most often quartz crystal oscillator is connected to inputs XTAL1(Pin 19) and XTAL(Pin 18) It is the RESET pin.Upon applying high pulse to this pin the micro controller will reset and terminate all activities The 8051 family members all come with on-chip ROM to store programs.So EA connected to Vcc.

EA (Pin 31)

PSEN (Pin 29)


ALE (Pin 30)

This is an output pin .PSEN stands for Program store enable


ALE(address latch enable) is an output pin and is active high.This is used for demultiplexing the address and data by connecting to the G pin of 74LS373 chip

Interfacing External program memory

P1

P0 EA ALE 1

Instruction

Latch

Address

P3

P2
PSEN 0 OE External ROM

Microcontroller

Interfacing External data memory

P1 P0 EA ALE P3 P2 RD WR I/O Page bits WE OE


0

Data Vcc 1 Address

Latch

Microcontroller

External data memory

PORT0 Internal structure


Read latch TB2 10K

Vcc External Pull-up register Low P0.X Pin

Internal CPU bus

1 0 M1

P0.X
Write to latch Clk Q

OFF

TB1 Read Pin

PORT1 Internal structure


Vcc Read latch TB2

Load(L1)

Low P1.X Pin Internal CPU bus D Q 1 0 M1

P1.X
Write to latch Clk Q

OFF

TB1
Read Pin

EMBEDDED SYSTEM

Embedded system means the processor is embedded into that application. Embedded system is a combination of software and hardware and some other mechanical parts to perform a task. 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 etc

Criteria in choosing a Microcontroller

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


Availability of software development tools Assemblers, debuggers, C compilers, emulator, simulator, technical support Wide availability and reliable sources of the micro controllers.

Overview of 8051 Family


One of the oldest (Intel MCS-51 in 1981) and probably the most popular micro controller. Many derivatives are marketed by a number of vendors

Common features,
8-bit processor 4 I/O ports each 8bits wide

Max of 64K on-chip ROM (usually 0k to 4k)


Max of 64K external data memory Max of 64K external code memory 2 timers, one serial port 128 bytes of on-chip RAM Various speeds from 12MHz Clones may have different on-chip memory, timers etc

Comparison of 8051 Family Members

Feature ROM (program space in bytes) RAM (bytes) Timers

8051 4K 128 2

8052 8K 256 3

8031 0K 128 2

I/O pins
Serial port Interrupt sources

32
1 6

32
1 8

32
1 6

Das könnte Ihnen auch gefallen