8051 pin diagram
8051 pin diagram
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
red sn 0rff, 7S
niave be t
Should the
the
heater
as Yeaching
insid a
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
Rom
Data mem ory is RAM
S651 4D Pins
: lock (9
(X, X
eset th device.
RAm
. hen You
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
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
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|
)
(port P3)
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
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
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
d
are vetaine nsn-volatila)
Rom: Contett as Rom is
will Yenain,
VHene, prjra
Prgra
gone
ohat happer ?
Oher Jou reset yow phsnpe oill
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
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
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
ho telMo ?
OFFF H
O00OA to
fomtne vary next
eternal Rom bagin
(PSEN;
Tt is the Tead
Sijnal that toig gus, Rom
to Send data to 805]
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
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
do
do Opratisn and
But you lan also bitose
LE D
(Sounda)
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
fine.
useful
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
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)
P3.o RxD
P3.| :7x D
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)
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
widinchinal
ine, then etaould be
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
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
p3.?: RD
ejth r
Connect exteona KAnj you may
Corite into the
the RAM or
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
Rood signd
= Ro
ite signal