31
10/1 The 8051 microprocessor/microcontroller The Microprocessors / Microcontrollers SELAMAT DATANG WELCOME 8051 microcontro ller

10 Introduction

Embed Size (px)

Citation preview

Page 1: 10 Introduction

10/1

The 8051 microprocessor/microcontroller

The Microprocessors/ Microcontrollers

SELAMAT DATANG

WELCOME8051

microcontroller

Page 2: 10 Introduction

10/2

The 8051 microprocessor/microcontroller

What is a microcontroller ?

Page 3: 10 Introduction

10/3

The 8051 microprocessor/microcontroller

The 8051 CPU

8051 Pins Layout and symbol

Page 4: 10 Introduction

10/4

The 8051 microprocessor/microcontroller

ATMEL AT89C51

Page 5: 10 Introduction

10/5

The 8051 microprocessor/microcontroller

Introduction

• A chip with reads & executes a program stored in memory

• How the computer works is controlled by the program

• Must Capable of accepting, decoding and executing instructions, presented to them in binary form.

• Combination with I/O and memory peripheral is called microcontroller or microprocessor based system

• Microprocessor term also known as Central Processing Unit (CPU)

Page 6: 10 Introduction

10/6

The 8051 microprocessor/microcontroller

Microprocessor Based System Block Diagram

A Microcontroller system

Single-chip microcontroller system

Page 7: 10 Introduction

10/7

The 8051 microprocessor/microcontroller

Microprocessor vs. Microcontroller

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.

• expansive• 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

Page 8: 10 Introduction

10/8

The 8051 microprocessor/microcontroller

Simple Microcontroller Application

Another term to describe a microcontroller is

- embedded controller or

- single-chip microcontroller

Because the microcontroller and its support circuits are often built into,

or embedded into one IC package.

Page 9: 10 Introduction

10/9

The 8051 microprocessor/microcontroller

Selecting a Microcontroller

• Choose the right one for your application– Speed, Power, Size, Cost

– Others: package options, integrated peripherals, scalability for future growth

• Choose one with good software development support– development environment - good compiler and debugger availability

– evaluation boards

– in-circuit emulators for those with deep pockets

– RTOS availability

• Other considerations– Hardware availability: make sure you can actually purchase the

microcontroller before designing it in

– expertise, licensing, etc

Page 10: 10 Introduction

10/10

The 8051 microprocessor/microcontroller

Selecting a Microcontroller

• Microcontroller– an application-specific processor

– 8051 vs. HC11 it all depends on your application

• Typically, microcontrollers...– are low cost, lightweight processors

– require few support components for better system integration

– come with integrated peripherals

Page 11: 10 Introduction

10/11

The 8051 microprocessor/microcontroller

Selecting a Microcontroller

• 8051 and the 68HC11 series microcontrollers are popular in automotive industry

• PICs from Microchip Inc are popping up everywhere you require low cost and low performance, i.e. inside batteries, mice, toys, secure remotes– a few tens of cents in large qty.

– packages from 8 pins to 68 pins; typical 16 to 20 pins

– memory capacity from 256 bytes ROM to a few Kbytes

– RAM to a few hundred bytes RAM

– top speeds from 4 MHz to 33 MHz

Page 12: 10 Introduction

10/12

The 8051 microprocessor/microcontroller

CPU Evolutions

Page 13: 10 Introduction

10/13

The 8051 microprocessor/microcontroller

Block Diagram

CPU

On-chip RAM

On-chip ROM for program

code

4 I/O Ports

Timer 0

Serial PortOSC

Interrupt Control

External interrupts

Timer 1

Timer/Counter

Bus Control

TxD RxDP0 P1 P2 P3

Address/Data

Counter Inputs

Page 14: 10 Introduction

10/14

The 8051 microprocessor/microcontroller

What is microcontroller ?• http://www.webopedia.com/TERM/M/microcontroller.html

• A highly integrated chip that contains all the components comprising a controller.

• Typically this includes a CPU, RAM, some form of ROM, I/O ports, and timers.

• Designed for a very specific task to control a particular system.

• As a result, the parts can be simplified and reduced, which cuts down on production costs.

• Sometimes called embedded microcontrollers, • They are part of an embedded system -- that is, one part of a larger

device or system.

• Microcontrollers : "special purpose computers."

Page 15: 10 Introduction

10/15

The 8051 microprocessor/microcontroller

CPU • Abbreviation of central processing unit. The CPU is

the brains of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where most calculations take place. In terms of computing power, the CPU is the most important element of a computer system.

• On large machines, CPUs require one or more printed circuit boards. On personal computers and small workstations, the CPU is housed in a single chip called a microprocessor.

• Two typical components of a CPU are: • The arithmetic logic unit (ALU), which performs arithmetic and

logical operations. • The control unit, which extracts instructions from memory and

decodes and executes them, calling on the ALU when necessary

Page 16: 10 Introduction

10/16

The 8051 microprocessor/microcontroller

Where can you find microcontroller.

• microwave oven • modern automobiles

• engine is controlled, anti-lock brakes, the cruise control

• remote control • TVs, VCRs and high-end stereo systems

• digital cameras, cell phones, camcorders, answering machines, laser printers, telephones (the ones with caller ID, 20-number memory, etc.), pagers, and feature-laden refrigerators, and dishwashers.

Page 17: 10 Introduction

10/17

The 8051 microprocessor/microcontroller

“microcontroller” characteristics :

• "embedded" inside some other device • (often a consumer product)

• dedicated to one task and run one specific program.

• often low-power devices • has a dedicated input device

• and often (but not always) has a small LED or LCD display for output.

• small and low cost.

• ruggedized in some way, but not always

Page 18: 10 Introduction

10/18

The 8051 microprocessor/microcontroller

8051• The 8051 is relatively old.• Most popular microcontrollers• Derivative microcontrollers based on--and

compatible with--the 8051 • Many web pages, books, and tools.• Latest models are by far more advanced

than the original 8051 • Labelled as "8051 compatible", "8051

compliant", or "8051 family" to emphasize their "noble heritage"

Page 19: 10 Introduction

10/19

The 8051 microprocessor/microcontroller

List of the 8051 chipsAcer Labs (8051 Family)M6032, M6759Actel (8051 Family)Core8051Aeroflex UTMC (8051 Family)UT69RH051Altium (8051 Family)Nexar TSK51Analog Devices (8051 Family)ADuC812, ADuC814, ADuC816, ADuC824, ADuC831, ADuC832, ADuC834, ADuC836, ADuC841, ADuC842, ADuC843, ADuC845, ADuC847, ADuC848AnchorChips (8051 Family)see Cypress Semiconductor

•Atmel (8051 Family)80C32E, AT48801, AT83/87C5103, AT83/87C5111, AT83/87C5112, AT83/89C5132, AT87F51, AT87F51RC, AT87F52, AT87F55WD, AT89C1051, AT89C1051U, AT89C2051, AT89C4051, AT89C51, AT89C5131, AT89C51CC03, AT89C51ED2, AT89C51IC2, AT89C51ID2, AT89C51RB2, AT89C51RC, AT89C51RC2, AT89C51RD2, AT89C51SND1, AT89C52, AT89C55, AT89C55WD, AT89F51, AT89F52, AT89LS51, AT89LS52, AT89LS53, AT89LS8252, AT89LV51, AT89LV52, AT89LV55, AT89S4D12, AT89S51, AT89S52, AT89S53, AT89S8252, AT8xC5122, T80C31, T80C31X2, T80C32, T80C51, T80C51FP1, T80C51I2, T80C51ID2, T80C51RA2, T80C51RD2, T80C51U2, T83/87C51RB2,…

Page 20: 10 Introduction

10/20

The 8051 microprocessor/microcontroller

Cont’d: 8051 Manufacturer· Atmel Wireless & uC · Cast, Inc. · Chipcon · CML Microcircuits · Cybernetic Micro Systems · CybraTech · Cygnal Integrated Products · Cypress Semiconductor · Daewoo · Dallas Semiconductor · Digital Core Design · Dolphin · Domosys · easyplug · Evatronix · Genesis Microchip · Goal Semiconductor · Honeywell · Hynix Semiconductor · Hyundai

· Infineon · InnovASIC · Intel · ISSI · Maxim · Mentor Graphics Co. · Micronas · MXIC · Myson Technology · Nordic Semiconductor · OKI · Oregano Systems · Philips · Sanyo · Sharp · Siemens · Silicon Laboratories, Inc. · Siliconians · SMSC · SST

ST MicroelectronicsSyncMOS · Synopsys · Syntek Semiconductor Co., Ltd.· TDK · Temic l· TI · Triscend · Winbond · Zensys

Page 21: 10 Introduction

10/21

The 8051 microprocessor/microcontroller

Microprocessor_linksFeatures of 8051 (http://www.archimedesinc.com/8051.htm) Describes the features of 8051 microcontroller.Instruction set overview for I8051 (http://www.ece.orst.edu/~pricec/8051/manuals/index.html) Gives an overview of the Arithmetic, Logical, Control, Data transfer and other miscellaneous instructions from the 8051 instruction set.The 8051 Microcontroller (http://www.labyrinth.net.au/~steve/8051.html) Sample source code, development tools, schematic diagrams, and many other links to 8051 microcontroller sites. 8051 Software (http://www.dcity.org/8051/software.htm) Freeware and shareware including assembler, disassembler, math functions, etc. Intel's X51 Microcontroller Page (http://www.intel.com/design/mcs51/). 8051 related topics (http://www.ece.orst.edu/~sllu/471/assemb.html ) This site discusses topics such as the 8051 Memory Organization, the Internal of 8031/51 and some Special Pins, Data and Address Accessing, Addressing Modes & Instruction Set Summary.FAQ 8051 (http://www.ece.orst.edu/~pricec/8051/faq/index.html) Frequently asked questions on the 8051. Another 8051 FAQ site (http://ee1.bradley.edu/~mrr2ro/micros/8051_faq.html) This site contains many links to FAQs for 8051 and other microcontroller users MicroLee (http://www.interlog.com/~miclee/8051.html) This site contains 8051 APPLICATION BOARD.

Page 22: 10 Introduction

10/22

The 8051 microprocessor/microcontroller

Page 23: 10 Introduction

10/23

The 8051 microprocessor/microcontroller

8051 Schematic

Page 24: 10 Introduction

10/24

The 8051 microprocessor/microcontroller

The 8051 CPU

• The 8051 is a CPU that can be operate as normal microprocessor system with the external memory and I/O devices connected to the CPU

Page 25: 10 Introduction

10/25

The 8051 microprocessor/microcontroller

Pinout – brief description

• Port 0• Dual purpose• With external memory

multiplexed address and data bus

• Port 1• Dedicated I/O

• Port 2• Dual purpose port.• Higher byte of the

address bus for external code memory.

• General purpose I/O.

• Port 3• Dual purpose port• Pins have alternative

functions• General purpose I/O

Page 26: 10 Introduction

10/26

The 8051 microprocessor/microcontroller

Pinout – brief description

• PSEN program stroke enable

• Output signal• Enables external

program (code) memory

• Usually connects to EPROM

• ALE address latch enable

• For demultiplexing the address and data bus

• Latch address sig to external register.

• the ALE signal oscillates at 1/12 the crystal frequency.

Page 27: 10 Introduction

10/27

The 8051 microprocessor/microcontroller

Pinout – brief description

• EA external access

• Select the internal or external ROM

• If LOW select the external ROM.

• RST reset

• Master reset

• XTAL• Norminal crystal

frequency is 12 MHz.

• Power connection• +5 volt

• I/O port– Port 1,2 &3

• 4 LS TTL load

– Port 0• 8 LS TTL load

Page 28: 10 Introduction

10/28

The 8051 microprocessor/microcontroller

comparison

Part No 8051 8052 8751 8752 8031 8032

EPROM

On-Chip ROM 4K 8k 4k 8k 0K 0K

RAM (Bytes) 128 256 128 256 128 256

Timers 2 3 2 3 2 3

I/O Ports 4 4 4 4 2 2

Serial Port 1 1 1 1 1 1

Interrupt Sources 6 8 6 8 6 8

Page 29: 10 Introduction

10/29

The 8051 microprocessor/microcontroller

Parametric_Table

Device

Fla

sh (K

bytes)

OT

P (K

byte

s)

Ma

sk RO

M

(Kbyte

s)

ISP

Self P

rogra

m

Me

mo

ry

EE

PR

OM

(Kb

ytes)

RA

M (B

ytes)

F.m

ax (M

Hz)

Vcc (V

)

I/O P

ins

UA

RT

16

-bit T

ime

rs

Watch

do

g

SP

I

TW

I

10

-bit A

/D

(chan

ne

ls)

AT80C51RD2             1280 60 2.7-5.5 32 1 3 Yes Yes    

AT83C5103     12       512 16 2.7-5.5 19   2   Yes    

AT83C51RB2     16       1280 60 2.7-5.5 32 1 3 Yes Yes    

AT83C51RC2     32       1280 60 2.7-5.5 32 1 3 Yes Yes    

AT83EB5114     4       256 24 3.0-3.6 11   2 Yes      

AT87C5103   12         512 16 3-5.5 19   2   Yes    

AT89C2051 2           128 24 2.7-6.0 15 1 2        

AT89C2051x2 2           128 16 2.7-6.0 15 1 2        

AT89C4051 4           128 24 2.7-6.0 15 1 2        

AT89C51AC2 32     UART API 2 1280 40 3-5.5 34 1 3 Yes     8

AT89C51AC3 64     UART API 2 2304 60 3-5.5 32 1 3 Yes Yes   8

AT89C51ED2 64     UART API 2 2048 60 2.7-5.5 32 1 3 Yes Yes    

AT89C51IC2 32     UART API   1280 60 2.7-5.5 34 1 3 Yes Yes Yes  

AT89C51ID2 64     UART API 2 2048 60 2.7-5.5 32 1 3 Yes Yes Yes  

AT89C51RB2 16     UART API   1280 60 2.7-5.5 32 1 3 Yes Yes    

AT89C51RC 32           512 33 4.0-6.0 32 1 3 Yes      

AT89C51RC2 32     UART API   1280 60 2.7-5.5 32 1 3 Yes Yes    

AT89C51RD2 64     UART API   2048 60 2.7-5.5 32 1 3 Yes Yes    

Page 30: 10 Introduction

10/30

The 8051 microprocessor/microcontroller

Parametric_Table

Device

Flash

(Kb

ytes)

OT

P (K

bytes)

Mask R

OM

(K

bytes)

ISP

Self P

rog

ram

Mem

ory

EE

PR

OM

(Kb

ytes)

RA

M (B

ytes)

F.m

ax (MH

z)

Vcc (V

)

I/O P

ins

UA

RT

16-bit T

imers

Watch

do

g

SP

I

TW

I

10-bit A

/D

(chan

nels)

AT89C55WD 20           256 33 4.0-6.0 32 1 3 Yes      

AT89LP2052 2     SPI     256 20 2.4-5.5 15 1 2 Yes Yes    

AT89LP4052 4     SPI     256 20 2.4-5.5 15 1 2 Yes Yes    

AT89LS51 4     SPI     128 16 2.7-4.0 32 1 2 Yes      

AT89LS52 8     SPI     256 33 2.7-4.0 32 1 3 Yes      

AT89LS53 12     SPI     256 12 2.7-6.0 32 1 3 Yes Yes    

AT89LS8252 8     SPI   2 256 12 2.7-6.0 32 1 3 Yes Yes    

AT89LV55 20           256 12 2.7-5.5 32 1 3        

AT89S51 4     SPI     128 33 4.0-5.5 32 1 2 Yes      

AT89S52 8     SPI     256 33 4.0-5.5 32 1 3 Yes      

AT89S53 12     SPI     256 24 4.0-6.0 32 1 3 Yes Yes    

AT89S8252 8     SPI   2 256 24 4.0-6.0 32 1 3 Yes Yes    

AT89S8253 12     SPI   2 256 24 2.7-5.5 32 1 3 Yes Yes    

T89C5115 16     UART API 2 512 40 3-5.5 20 1 2 Yes     8

TS80C31X2             128 60 2.7-5.5 32 1 2        

TS80C32X2             256 60 2.7-5.5 32 1 3        

TS80C51RA2             512 60 2.7-5.5 32 1 3 Yes      

TS80C51RD2             1280 60 2.7-5.5 32 1 3 Yes Yes    

Page 31: 10 Introduction

10/31

The 8051 microprocessor/microcontroller

Assumed / student

• done some amount of programming • basic understanding of hardware • firm grasp on the three numbering

systems » decimal, hexadecimal, and binary

number