0% found this document useful (0 votes)
19 views

8051 pin diagram

The document provides an overview of the 8051 microcontroller, detailing its internal architecture, including ROM, RAM, and I/O ports. It explains the functionality of various pins, such as reset, ALE, EA, and PSEN, and their roles in interfacing with external memory. Additionally, it discusses the importance of clock signals and the multiplexing of address and data buses in the operation of the microcontroller.

Uploaded by

yaswitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

8051 pin diagram

The document provides an overview of the 8051 microcontroller, detailing its internal architecture, including ROM, RAM, and I/O ports. It explains the functionality of various pins, such as reset, ALE, EA, and PSEN, and their roles in interfacing with external memory. Additionally, it discusses the importance of clock signals and the multiplexing of address and data buses in the operation of the microcontroller.

Uploaded by

yaswitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

S051 mico contoller

g- blt
PO
Int.RoM
8-bit
4K Bytes
PI
de mem 8- bi
Reset
Co
P2
8-bit
P3
ALE
8051 -RxD lojoo00
EA
P3-I
|Rom. (NT O
PSEN P3-k
Int RAm P3-s< JNTI
Pa-4e To
128 Byteo T
Vee P3
Data Mem P86
RAm
GND Ro
fenctisn
alternate
pot3
(g051) cohi ch it eas count hoo
manj paople
shng
It has 40 Pino u
many noto are there in
a cuyer cy mach

enter àn a mall, hous oR,


be tumed sn or
coh at is he demperature
, Should the Compres
Compre sSo

red sn 0rff, 7S
niave be t
Should the
the
heater

as Yeaching
insid a

Ihe Cosect speud ,


does th airbag spen
(
during an impac)
or hot, ete. These featuro Can be conbalkd by
mioCortoller

Is not a micYopDeSSor along coith tha poasso it


hao Intesnal Rom,RAm ,Ilo poots ete inside it

Rom per man ant mmoy hsn- otabk, read -ony mony
holds e
infomation even oeh power Supply ès f lost.

T+ holdo rgam
(2
ssme the AC 7onote csntrol as an
.
miro c6ntoler
For cxampu,
hooaa
hao
embedded oytem ohich

nternal Rom- cohich Storer pora for identityig


e It has
informaion
the keys prused, displaying tre Coesponding
ao in serial cothaore foon, bn
onthe Sceen, apppiate sign Coononuritato the Ac)
ete.
from the rmsle ccrrw' and
wIE
IF we Yamoy th b atery
Cuohich gino the

tha unste corbol ag ain,shsuld th


put t back to

Ofcouxe, becauçe the ogranes sti|| than as


vofalie) memoy
+is Stood in some permaron t (no7-
Cinerral Rom).
beost evnifta
The pogram showd not
Powr Supply is ñot th oe
Ohat is sterad in side RAm 7

Data (of tempesohwa, tne fan sped, tne made


jn whch tue yemote csntot is, ayt timer data
etc.) coich are
changed in cday- to day basis.
Jence, data nust be stuad in crttable form

hers, Shauld be stosa d in RAm

Rom
Data mem ory is RAM
S651 4D Pins

: lock (9
(X, X

X,, X ae cnnected to Crystal sci llato cohch giveo he


Clock sup P henca thoy are Callad clock -inpt.
m

Stond ard froquency is I2 mHe

Rent )Reset (crectin of we Tesel- &o51)

This pln is used-to


Resel-is inconmigoo

eset th device.
RAm
. hen You

on, tha of tha (s Gone, but


pres this butt Contets
Cdata)
Corrlents of Rom coill etain
fhe
(Progran o
7emain but the data coi1/ be one
Poogam will

(disetion js outjing Jas Bo51 giveo this sgnal)


ALE Addrem.Latch nable tohich ts used to
Separate ths address and data ohich o oh
multipleed Ccombined )fom.
to Extarnal Rom
EA Fetive lo signal, Yelated
Enable Extertae Access)

PSE N Active op Signal , Yelated to xternal Rom.

stotu s Enabe)
(Prog
EA and PSEN signals
8051 is not rigld,
etesn al Rom.
to contot

8054 ho
the

indernal memog
,
mem xy
but allo ws

as per
Jou to expand
four tgigarm
ant.

commect extesnal
and al the tirne

wYou dot )ed to use thorn

ju dort conmact
Refiyeyator
a remot sntt phh gay our
e On
mem oy hip but in yow and aIlo ws
extern al moy
coith inter nal
phone comes
external nemay.
tou to (nnect

This ts abo true for digita! Cumeras


Nec,GiND:) Pwer Supply
Vee is t5V (loqic 1)

GND iS ov (ogie 6) )
po:\s-bit Ilo port pll poot ase 8-bitb
onal
Pl: 8-bH Ilo pont and
(All Can
bjdiecti
be i/p o ofp pb)
port that 0s7
P2: 8 bit I|o ache
PI|

P3: 8 bt I/o cernt doos that ae all decided


poats
by these
Over thra,
ou ay
LEDS Conhect
K You may connect

Connectkey boarc anyting.


ovem
Ovem here,
here you may connect
you
Sound output
hae altemote functigns.
er hang ot thes pats

)
(port P3)

The se are Sernial Poot


by bit)
Rxp: (dota goes out bit

Por Sernal Com municoctjisn


Used

which
ÎNTO P3.2 There is/are ihterupt
ike there is
P3.> Sends signal
an acci det, that's
thof's cog onbag,
Sendo
ÁD Conveetur sento sigke/tempt
opened,
-oill b
jh tempesatwe ) etExtermal
ohen thrr is
are
a
(
change intempt)
ntenpt ino
the
in fhe form of
ents Aming is
direction of hturrpt
systen (hence, the

These are times iputs. hey


Ps 5
To, T(P3.4, provide Clock to the timers
5
X Ohat do these clocko do ?
when youput noteo in curny
They count the motes
erfering a mall, podact
peopk
Counting -machine, ete.
a company
ohichae -monufactund by
being

iner clock pu/es

efurnal RAm,
velated to
WR These sig nals a RAm, wRand
RD
xternal
you Conret
Ro I
pieture
Cone ito the teck
|Petail 2Kplanation the yotem
beconms
(this cloek is
Fvary clock pulse
Clock input
X1, X2: e
triggr to the prcassus
do a nes cctivty.

a stote în
Theye is

which the pOcessTulse


a clock
US drjn
8051

Her
tferete the stote
Stoteoi
Charig
why onA clock pulse
rThal is
on T state (T Stand The pro CessoY
oes nof
js called
toansitisn foom ho w fine
siion undexstand the
for tyan ha
to tne othe ) passes? Then
Stote
anak activity ?
0hento Start
proesso knocos
that mut tgg
Theve has to be Something
new acthvty (to change
the pro ass0
to do a

ut state )
clsc/<
matler 2
the
of
* Does the froquenty
the cloce, ia,
faster
Ofcouwe, higher the frogueng,
more no. of pulses operofisn) ( in ohe unit time.

(second).
the chip (9051)
The highest feguency at okich
that 's the Stardard Crystal
orko is /2 MH2

fequensd

Reset Reset ( used to nat the chip)

ytem are all est.

Thepro assoT, RAm, I/o


ports

d
are vetaine nsn-volatila)
Rom: Contett as Rom is

doesnot care est signal be


all or datn ill

will Yenain,
VHene, prjra
Prgra
gone

ohat happer ?
Oher Jou reset yow phsnpe oill

eros progaonm (also caled


The progrom r
boting the deriu.
used t start
is
monitor progran)
that shouwd be
VJt is tha first program
resat
aur device is
eieuted evuytim 0000ft
is storrd at
locatien

That aset pogron


in internal Rom.
reset, Pe is
the
beoming
cohenever g05/ is
tence, executian
program staots
so that
0000H by dafault
locatisn Oo00 H.
fasn

latch enabe
addrass
ALE : Stando far
data
demultiple addrass and
Used to
to com bne addrs
to
is chnigu
Mutipkx ing tne nwnber
der to Teducce
and dat bus in
i

of pins
()
the multiplexed bus is
ALE tells us hethe

data or adtrass -
camyáng addrass
mutiplexed bus Carging
ohen ALE =
bus data
ALE

Addsess bus
0

is of
AIS
mutiplexed

Ik- bits ( l6- ln es)

A0 to
Ao
Az
As - Ag
Hig her byle | Lower byte

is sf
Data bus is
8- bit (8- ines)
Do to D

logic:
Mutiplexing

The lower half


of the address bus (A-A)
(D-
to
Do) are mu Hiplexed
data bus
and the
fom (AD,- A0o)

Wien ALE =1
AD- ADo
arrieo addres AA)
ALE=
Ohen
cari data (D Do)
AD, -ADo
Ag) is mot mutiplered
CA,
Higler ordur oddres bus
Cit aboays carjeacdtas

that (AD De) Caries addreso data?


NGw, oho knowS A

ho telMo ?

Thodss cohy tha sgnal ALE S Outgdng


Sheh you Con net extenal Rom, you |have
EA:
too cptio
use internal Rom and
b Ethar yo
xternal Rom
in
continue
4KB,t goes from
intona Rom is

OFFF H
O00OA to
fomtne vary next
eternal Rom bagin

addrass, i.e., fom oO0 H, iHs a

Contimu ation ofinternal Rom

Another csnfigwration is:


discard intesnal Rom cornpletely
you may
only external Rom (Starts fram
and use DOOD)
are doided by the
s
These too optione/onfigusocti
acass)
loo pin EA (axternoal
Cctive
e aceesskeep EA=o
e I! you want toful externall
etrn al Rom || start
i fsom 0000H

i.e., inten al Rom is dis Card ed/)


Logicaiy Yem
rem oved

If you want to use theRom Int. an d

Cnitne in the Extesnal Rom |Keep EA = 1

Bt Rom Starts frorm Jo00t)


Cxtanal

(PSEN;
Tt is the Tead
Sijnal that toig gus, Rom
to Send data to 805]

(ASting frdata foon eternal Rom)

Vec: +5V po wer suppY


wIO ponts
: Four g-bit 1o poob

All are birectional ( Can be woring as input o output pats

1,8-bit PO
slineo of Posto
Po7- Po.o
Int- Rom oo100|o |LSB.
4k Byted
RESET Mem
Code
ALE B-bit
> P1
Plt - PI-O -8 Lines of foot 1

Ls6)
mico cmo lJles

>P2
-g
P2? - P20 ines of foot

(LS8)
Lnt-RAM
128 BytRs
Data mem.
-bit P3
s ines of fort3
P37- P3-0

8 kays buttons
Ex:)you can connect
csnnect
Input port Ughts
fans /eigkh e
re covyacted
Fight
Coutput pot erampa)
So, input port can csntot the ole pot, pon ding
tna,valua o +he input ponr( cohichaver buttsn is pra csed), tha
r A of these pot can do Come Spending fan light
oill b on.
Byte as well Bit operati o

YByte operotisns
aSH on port PO
MoV Po,#25H } Put/ send
6n po
Wave sen 8-bt data to the port (Sending data cohich
afec tha
(individualy makej afect
w

po-0
Bt opuaies

}s the oth
|SETB
CR
ine of
Po.0

Po.o
the

Porto.
Po
P.o
becomeS 1

se contolled indiidually
Hena,32 Unes Can

in. ute
Kesemblonce of thase to poptio daily

not have two hands


We only

as o ten fingers
vwe hare

is doing an operation,ie,
my (left) hand
If we soj
hea al five fingeo Cre used
use d tojeth

indvidually.
We can each of the finge
earb ot
each of
g051,we have
4 I/o port
in pots
Similarly, &-bi
which ane

So, you can do


8-6t oelatisn on ang f
,.,
these

ports ,ie.) Jouau


ae anding
.
8- bit the

ohoe poot is affected

do
do Opratisn and
But you lan also bitose

afict aa Singe lne


)Ex vCsmect key
to pot Po
nnet LD to pon PI PI becsmo
(youl b serong output 6nthis Pot, hene

ned to do is Red foon Pont Po


nd send to
and pu this in a oop
conot oill happen ? corespshdn
ONcher key is pre ed, +he

LED coill glo.


(ex1)
(Prano ay) (1

LE D
(Sounda)

X Atemate fun ctfms of lonts

alterhate unctino.
Mast ot he port have
Posto) has an althate function ot AP7- ADO

Po
AD7
multiplexed
AD
bus of A) and (Dy-P

|P1:No alternate functton. I is just a port

IP2:) A I5 - A8 (H has alterate Ponctisn as Higher


Odes Addr. Bus)
|P3: List of altrnefe functimo (pocoerful featuns soE)

) Are address and dota buses

fine.
useful

Ys,but not all the

6Ory ? eKtsnalmemo, thon


th the
henewa 205) iteract
nem. locatisn and
ad bus is vegred
ds. to identify the
js taquiyed to ehd feth the data into|frem |
data bus
the salecfed -menyoy ocotion .
t wR
Tf addyess ond data Lus are too useful
, hy

use dedi Cated buses ohy are they altesnafe functions ofPOP2
to exterh al memor1, then t Yequtes
he 8os| is Conmected
Qdds. and data bus that is not Ssmething that we do on
a day- bo-day baSis:
Most appianes
rote cnte, Smat usaleh,
aso und
A t,
us dot
rafiyrata,etc)
have | use
()
external memog
Ohen migo Cortrol(os (in most cases), cohenerrthey are wntg
wth RAm cnd Rom Rom, hey are intena) RAM and
(allopereliconhappen n side ) internal Rom.
So, if there wese individel
and data buses, thej
ad dress
wold ke siting tdle, Lecause most
ok Coth idernal
f the tine nicCro cortdles

menoriw

Herca, here Shoud not h de diated bus

adds ess and Should


12
frdata.
functa af Po and P2.
they are altehate
Th's ohy
Al tonata funchiens
Po

P!
Dnt Roo Nore

P2 AIs- A8
Giran Belod

2051
Psoe
INTO
P3-24 TNTT

ps-4k

P3-6

ps.

to g05l,port
he morent we congect exhenal me e
now
po and P2 oTe gones becau se
addres and data
data be oot
s. Poet
buses. 11 coil/
coil evr be
jsne. Always use PI as our stardasd post for
(13)

AHeonele functino of Poot P3

P3.o RxD
P3.| :7x D

Serial pst f &O5) bit- by- bit)


(Soding one bit
at a time ;

Of RO5) prt P3
why Seofal fun ctisn ae altesnot fun ctino
So seful ?
f they are
Tf they 0aud be dedicated ines pin s, then if they

0ald not be used ( t device does not oo seial Com munj'e oticr)

then they coould be dle

micgoLDave,
rofigeatr
thehe are manY devican lika
clo Ceial (omn.
thal o n

Altrough AeTV em a
All the poot inas ave Cono use senidl esmm.
bdirectisnal. whe a port

lene is use d as Dersal com munication

widinchinal
ine, then etaould be

ine (Serjal i/p or senial o/P)

Irteru
P3-2 INTO ae Harclware
Extern
INTI
P3-3
the
hich comes inside
ar Yp sinal
interupts used a
intemupts.
o; hence pcasso
procass these fwo
Tf you don use ntermypts,
morm al pot nas.

P3.4 iTo 3
P35:T tnars ot gos))
(two
Timer clock inputs
wThose imer does Counting
right now, tne tiner

Suppose frthe tie being


oher
Counl is o. From O

There must be Something that toig5


coould come.
From oohere these tigger

L clock pulses
these thoo pot
we wauld nof use -imes ther
imeo s pin are altosate
(Oould be idle, hence

of 3.
fnctlm Povt
use all
and t you
cxtenal memoy,
R If you connec
featro you' ||oo ow ports.
these wonderful
availale ?
Oho is sill

pot P1 is aliap jut as a port.

p3.?: RD
ejth r
Connect exteona KAnj you may
Corite into the

the RAM or

Yead data tsn


RAm.
extena
These Conto) signas

decided by g051.
ohich re

&05/
Menog af
Ftenal
Add
Bus
Bus
= l6
bt
Addr. ra
-)
byto
meng copoo'ty

64KB
to F FFFH
H
0D00
Adldo. ang
(15

Exter al Rom

s2e G4 KB
Mar
Adds signal jdertifs
= PSEN - Corntot
etlsral
Read Sigal
Signal hich
data fssm
Ron So RAm
mnrg?
Externa RAn

vMax Sur GAKB to FF FFH


Atdr.

Rood signd
= Ro
ite signal

PO, P2, and


and p3,
Carieo

Addre sS the Csrtost


Data signoo

You might also like