You are on page 1of 6

Assembly Send 8 bit hex to port o|

Paogram
mo a, # oCH
mov po
end

H Lnclude < so51h


Void main ()

unsigrned cha aj
Port 2
o-9 to
SEND bit binasy no
Assembly
Progkam
mov
moy 2 t tOAH

mov
start íne A
call delay
djnz rI stast
S
sjmp R2, ##DD
mov R3, # (2S

Lovp
losp12 put a
pop
nop R3ooP
djnz R?, lorp2
ret

CPregam# ínelde <sSl.h

4 detine penid
Void main()
unsigrned char

(a 0;
3 foy
delay ms (per iod);
Toggle 8& bit Port i
Assersby progam
mov mouJ2,H00
start
a,p0
muv P1, a
delayi moy3, # 125

cpl a Loopl push a


ocall dely
ymp start nop
djnz R3,loopl
dety dËnz Rzloop2
et
end

índde (89cyi h
#
t olefine period
Void mainl)

3 ukile ()

delayms(peziod);
ddagm (paiod); )
altesnate bik ot pi
Toggle
Assembly aogiam
org a, ttoA AH

starte mov
delay &
cpl a
acall delay
start

|C Paogam
t include (4cS.h
+de7ine period (00

main( )
void
Lkleli)
Pl= 0x 55,
delog-mslperiod);
PI =oxaa,

delag-ms (purio);
eggle msB s port 1
Assemby

start call delay delayi


ymp stazt
encd

Brogvam
incude < 965|h
tt de7ine rpesied loc
bit dispi
Void mainC)

wlileli)
displ=1;
delay -ms peri odd,
displ
delay-mpenot);
Let shit data at ot 1

mov a, t#oh

start P1, a

call del ay
djnz R1, start end

ymp s1

# inclde<9c S|·h7

detine period lo
tt
Void mainl)

unsiqned har

wtile (1)

Pl= Pl<<1
delay ms Cpeziod);

You might also like