Tuesday, 1 March 2016

TRIANGULAR WAVE GENERATOR-USING DAC

2.TRIANGULAR WAVE GENERATOR
PROGRAM:
ADDRESS
OPCODE
LABEL
MNEMONICS
OPERAND
COMMENT
80C0



MVI
A,80H
Load accu with
80C1





80h
80C2



OUT
43H
Output Accumulator value
80C3





To control reg
80C4


UP
MVI
A,00H
Clear accumulator
80C5






80C6


PQR
OUT
40H
Output accumulator value
80C7





To port A
80C8



CALL
DELAY
Goto subroutine delay
80C9






80CA






80CB



INR
A
Increment Accumulator
80CC



CPI
FFH
Compare Accumulator
80CD





Value with FFH
80CE



JNZ
PQR
If a not equal to FFH
80CF





Goto  PQR
80D0






80D1


ABC
DCR
A
Decrement Accumulator
80D2



OUT
40H
Output Accumulator
80D3





Value to port A
80D4



CALL
DELAY
Goto  Subroutine delay
80D5







80D6





80D7



CPI
00H
Compare  Accumulator value
20D8





With 00H
20D9



JNZ
ABC
If Accumulator is not zero

ADDRESS

OPCODE
LABEL
MNEMONICS
OPERAND
COMMENT
80DA





Goto  zero
80DB






80DC



JMP
PQR
Jmp  to PQR
80DD





unconditionally
80DE






80DF


DELAY
MVI
D,05H
Load D reg=05h
80E0






80E1


XYZ
DCR
D
Decrement D reg
80E2



JNZ
XYZ
Goto  xyz until D=00
80E3






80E4






80E5



RET

Return to program



OBSERVATION:


No comments:

Post a Comment