- Widya Mandala Catholic University Surabaya

LAMPIRAN
FOTO ALAT KESELURUHAN
r1
I
E
d?
i:
"c
q
:
8
8
z
F]
D
(n
rrl
Z
z
rr)
rrl
J
rrl
F
z
M
z
(_)
(
F
i"Yn
i.
ill
a_:
E
o
z
F
F,.
LN
F<
F<
:ra\
6v
a
qn
&>
z7
<i
laE
()ca
QF4
<l!
7>
'2 (:r-t\ Y lft
<,'
X?
YU
a<
sz
r-
z
rrl
MAINPROGRAM
MULAI
ULANG
KANAN
JALAN
ADC2)
MOV SP,#3OH
MOV R2,#W
(Inputdri ADC I kePort0)
MOV A,#PI
STJBBA,R2
(InputdariADC 2 ke Port 1)
(ADCI Dlurmgi ADC2)
JNC KANAN
MOV R2,A
MOV 4#255
SUBBA,R2
SETB P3.O
AJMP JALAN
(pembanding
putarkiri ataukanan)
(Motor putarkiri)
CLR P3.O
(motorprfrarkanao)
CJNE A,#2O,CEKCARRY (HisterisisantaaADCI dan
AJMP STOP
CEK-CARRYJC STOP
JALAN1
SETB P3.I
AJMP TILANG
(motorON)
STOP
(motorOFF)
WAIT
CLR P3.I
MOV R6,#1
MOV R7,#200
DJNZ R7,$
DJNZ R6,WAIT
AJMP ULANG
.
SinyalAudio( InputTape)
I Stop
MPos:
0,0001|h|IASURT
Source
nm
IHl
W
1,08t/
cH2
W
1,52l/
cH1
EE
1,3H1
IH2
@
1,[|01/
ll,|5,00m1
[H11,00t/C}|2
l05,5Hr
[Hl/ -81,lmV
PhilipsSemicordrctors
80e51 familyprogmmmer'sguide
80C51Family
andinstruction
set
INSTRUCTION
I}EFINMONS
ACALL ad&'1
Func.tbn:
tlescriptbn:
Exrnple:
8yltes:
Cytilas:
Encoding:
Operation:
AbeoluteCall
ACALLurrconditionallv
calb a suFqrtine bcabd at th€ indicabd drlss. The insfrr.rlkmirE'sner|ts
the PC twkr b ouin tre acares orat" ttru'"i"g-irdi&,
fier pustlesrre l&!ft r€sut ofib
poin twba The d'dinatbn ad*sss b the
bytefrsi) and incranentsrresi*
:|11!fuedl
obEjrcd
by succ€sshrolyconcatanatinglfre
frve hhh{fits bils of the incr€rnefibdpc, opcoe uiu z-s, *o n"
secondfte ol the irstuc{bn. The suhoitine catledmu* trir*im-J-t
,i*ii" ffiJiiJ2k
bbck of the
plognaDrn'm.'y as the frst byte d tfie instuc{ir'' fortuirq AcAtL.
N" n"gc .rB frd;l
InitiallysP equab ozH.ThB rabet:suBRrM b at
Fogrtn rsnry rocaton0345 H, Aftc reortirg the
insifuc{bn,
ACALL SUBRTN
at bcatbn 0123H,SP willconbin 09H, int€rnalRAMlrca{ionsOSttantt ogt't
wiHcfilain 2Slt ard 01ft,
resF{irroly, ard the PCwi[ wrtain 03+St{.
2
2
aloagagl l0
0 o 1
ACALL
(Pc)<- (PC)+t
(sP) <- (SP) + I
(sP) <- {pcz.o)
(SP)e(sP)+1
(sP) <- (Pq5-g)
(PCroo) * pageddess
a7 a6 a5 a4 la3 a2 a1 aO
PhifipsSemicddrtors
80C51familyprogrammer'sguide
and instructionset
80C51Famity
Table 7.
80G51Instnrtion Set Surnrnary{Continued)
MIIEfiOTUC
EOOLEANVAR|^H.E X^ilpl,n-Ano|t
DESCEPNO
JB
rel
Jt'np if drect bit b sei
rd
Junp if dred Ht b fiot set
J|''np if (trect tit b set and de8. bt
bilrd
PROGRAT ARA'ICHIf,G
ACALL
addrlt
osourToR
3
24
J
24
3
24
PEE(D
(Cd,Brued)
JNIB
JBC
AYTE
Absotrte slxor.diE.€X
2
LCAI-L
21
l-o.!g sr&odine cdt
3
RET
?A
Relrn trorn submnine
RETI
Rehrn from inEm-|pt
24
21
AJMP
addtl
Absdhrte irfip
2
LJMP
a&nG
24
LorE jt'np
3
SJMP
rd
24
StDd junp (rebttve e(tri
JMP
Jiinp i.rtu
JZ
@A+DFrR
rd
Jl\|z
rel
Jrfip if Acafidator
C,NE
AdF€crJd
C;ofirpae &e
CJNE
A,ffirel
CJNE
RN,#dafe,rd
CJNE
@Ri,ffieJEl
Cofipd€ imfidate
e(flsl
D.INZ
Rn,rd
DJNZ
di.ecttd
OecrerDdt regasierd irnp if 'Et zF.ro
Decrer ertt drect byb rd i|.'rp if not zero
l,lc operatidl
r,roP
rgive
Jttrap if ,f'rfi:Iy'9,tfiis
21
b lhe DPTR
u
Bo
is noi zaro
Me io ACC and jump if not eq.d
compar€ imm€(f8te to Acc md irmp if r$t eqlal
Comptre inmedEtte io re{ist6 a.d irfip if not
equd
2
21
2
21
3
24
3
z4
3
24
to irdi€ct -|d jrrrp if ,Ft
24
2
21
3
a
1
12
At mnemmicscopyr'€hedo tntetcorpor*ionlffi
PhiliDsSemicond$tors
80C51familyprogrammer'sguide
and instructionset
80C51Family
Table7.
8OG5tInstruc{ionSet Summary{Continued)
oscru.rToR
PER(I'
DATATRAIISFER(Contlnued)
MOV
A,#data
Move immediaE data to AcainLdator
2
12
MOV
Rn,A
Mdve Acd.fidator
1
12
MoV
Rn,drect
Move (fred byE b register
MOV
RN,#deta
Move inrnediste &fts to register
2
MoV
directA
MoYeAcafirJator
2
MOV
di(ect,Rn
MOV
direcidH€ct
Move re{isE to (treri @
Move dired byte to drect
3
24
MOV
dilect,@Ri
Move indirect RAM b drect byte
2
24
MOV
direct#datB
Move inrm€(fate diaiato dired byte
3
24
MoV
@Ri,A
Move Acarr Jator to indirEct RAM
MOV
@Ri,dred
MoYeflired byte to irdirect RAM
2
?4
MOV
@Ri,#data
2
12
MOV
OPTR,#data'l6
MoYeintmedab data to idirect RAM
Load Dala PointeJ wifi a 't6{it constant
3
24
t\tovc
A,@A+DPTR
Mova Co(b byte .elativ€ ro DPTR to Acc
MOVC
A,@n+PC
Move Cotb byE .€latiye b PC b Acc
MOVX
A,@Ri
Move externd FIAM (&ttt ed(k) to Acc
MOVX
A,@DPTR
MoYe e)demd RAM (16-bit d(t)
MOVX
A,@Ri.A
Move Acc to enernd RAM {8{it addr)
1
24
MOVX
@DPTRA
Move Acc to extemd RAM (16{it addr)
1
24
PUSH
drect
Pusfr direct bt|te or o stad(
POP
direct
Ffopdrect byte frorfl stad(
xcH
xcH
xcH
xcHo
A,Rn
ExcrEnge rqister with Acdfidator
A,direct
Exchange rjiret* byte with Acc'ndatot
A,@Ri
ExctEqge ifiSrect FIAMsitr Aernuhd
A,@Ri
Excftsnge lm-dder
b regisier
24
to drect byte
12
12
24
24
21
1
b Acc
dbit indireti RAM with A69
24
24
21
24
I
12
12
12
1
12
BCtOt.E
AN vaRt Ag_E nAt{P('-Artot{
cl-R
c
Clear carry
1
12
CLR
bit
Clesr drect Ht
2
12
Set cdry
1
12
Set dired ttt
2
12
Comdernent carry
1
12
bit
Comdernent dlect bit
2
12
c,bit
AND (ffi
2
24
ANL
c,rbir
ANO cfirpleinent of dirEr* bit b cary
2
24
ORL
c,bit
OR direct hl to cary
2
24
ORL
c,lbir
OR conplernent of &eat bt to cdry
2
24
t\,lov
MOV
c,bir
Move dired bit to cany
2
12
bit,c
Move carry to dired bit
JU
rel
Jump if caary b set
2
JNIC
rel
Jqnp if cany not set
2
SETB
SETB
bir
CPL
CPL
bitto cany
u
Al mnemqracs cqyrigiEd
24
21
C InEl Co|ptratbn 19E0
PhiliosSemicoddrtors
80C51familyprogmmmer'sguide
80C51Family
andinstruction
set
8{IC5,IFAI$ILYINSTRUGTIOI{SET
Table 7.
80G5t Instruction Set Summary
Intstupt ResponseTfie: RefiertoHa.dwe Dessiptim Chagt€r.
ln rftdio.! trrtltter
Fhg $thgdll
IrEtn .didr
Fteg
Inttru€rioo
Flte
ADD
ADT}C
suB
MUL
gtv
oA
RRC
RLC
SETEC
cov
Ac
XX
XX
xx
O X
0x
x
x
X
1
X
X
x
(1)t"tote
trst operstiorFm sFR h/te addess a)8 of bit dressG
c ovAc
CLRC
CPLC
A N Lc" bi t
ANLC./t*t
o R _c " b i r
oRL c,/tIt
Mcn/c.bl
CJNE
O
X
x
X
x
X
X
X
2t}$'215t3-, the psw or ti,ls in rhe psvrr)will ab efied fl4 settings.
|:sbr qr tElructbn |i||t ltrd aatatsaslngmoaht:
RegisterR7-m of the s.rrer y setecGdRegis.ter
Bad(.
Rt
diGct
8-Et intemd d8!alocetion'sddess. Ttis cuj<l be en lnErnd Dsta RAMlocatim (0-127) or a sFR 9.e.,uo port,
cofit'ot rc{isterrsbljs reghfrer,eb. (t?€'-ffin.
E-tritin€md (iata RAMklcalion(0-255)ffi
hdrecdy lhru€h fegistg Rl or R0.
@Ri
ttdata
8-bitconsla.t incfrxhd in fie iElrudiofi.
16-bitaonstantirrctded in ihe irtsBuction
#data 16
addr 16
lGbit destindim ddess. Usd by LCALLend LIMP.A bsrdt c*t tte *|yifi€fe w hh fre 64k{Ide prBrsfii
Memoryffissp€ce.
11-llt deslhationad(f6s. used by AcAfL andAJMP.The br dt wit be wfthh rtte ssn€ a(+yG pageof
prqr''"t nenwy I dre fr$ byE of lre trlo*i're iBtrucitm.
Signed(tno's cornCe.nent)&batofisetbyE. Usedby gtMP fld dl omebnd irnps. Rangeis -128 to +127
hdes rdative b frst brt€ of tp trloBilg instrudict.
tlfect A(ftessed bit h |nbrnsl t ets RAM6 speciel Fuffiion Register.
addr 11
rel
bit
MTGUOTTC
.
tEgcRFI|ol{
EyrE
t?;T
A,Rtt
Ad r€aster b Acamdator
1
12
2
12
ADO
4(k
A,@Ri
Add dect byte to AcdrfR*atff
Add hrli€(t
1
12
AOB
t\fuld
Aftl immedate data to AcqJrl.{etor
2
12
ADDC
ARn
A,direct
Add register to Aaamldalor yrith ceiry
Add h&ed
ADD,C
A@Ri
A,#deta
SUBB
SUBB
AOD
ADD
ADDC
RAM to Acdrndator
12
2
12
't2
Add inmedate daEl b Acc wif| cany
2
12
AR'I
sL6rd
Rqis.terftofi
rl
12
di€ct btrte frDm Acc yrith bonol|l
2
12
SUBB
Adrect
A,@Ri
Subffi
Subrad irdiec{ RAM frorn Acc with borow
1
12
SUBB
A,ffia
Stiblract imn€diate (hr from Acc with borrd
2
12
rNc
tNc
A
Incrgnent Acqnnulobr
1
12
Rn
lndEment rqister
ADT]C
Add dr€ct byte to Acdml{aff
RAM b Acdrnr&or
sith cary
with sry
Acc with bonor
'tz
Al mtE nmics copyrbti€d G |nEl Corpordtbn1!|l8O
BIODATA
NamaLengkap
FX. TONY. SETIAWAN
NRP
5103095030
NIRM
94.7.003.31073
.06029
Tempat,Tanggallahir
Lasem,November1975
Agama
Katolik
AlamatRumah
Jl RayaTimw 162
Jatirogo-Tuban
Riwayat Pendidikan:
> SDN WotsogoI Jatirogo.Tuban,lulus tahun 1988
> SMPK SantoYusup2,Malang lulustahun1991
> SMAK SantaAgnes,Surabaya, lulus tahtrn 1995
)
UniversitasKatolik Widya MandalaFakultasTeknik JurusanTeknik
Elektro,Surabaya,angkatan
!995
PBRPUSTAI'
AAN
Enhcrlrer t(rroiil Wldvr Mrndrlr
DURABAY
A