Micro processor Lab Manual / Generate saw tooth wave form using DAC ALP

Program Name

Write a Assembly Language Program for Generate saw tooth wave form using DAC .
Theory
Instruction Mnemonic Operand Comments
MVI A,80 Load accumulator with 80 to configure 8255.
OUT CWR Configure CWR with 80 as output.
MVI A,00 Initialize accumulator to 00H to display ongoing sawtooth from 00.
OUT PA Send value 00 throughOUT port A.
OUT PB Send value 00 through OUT port B.
INR A Increment the value of accumulator to extend the ongoing waveform.
CPI FF To check whether it has reached maximum value or not.
JNZ BACK 1 Jump back if the result is not zero.
OUT PA Send value FF through OUT port A.
OUT PB Send value FF through OUT port B.
DCR A decrement the value of accumulator to extend the downgoing waveform.
CPI 0 To check whether it has reached maximum or not.
JNZ BACK 2 Jump back if the result is not zero.
JMP BACK 1 Jump back to display incremented value as output.


Delay Code
Instruction Mnemonic Operand Comments
MVI B,FF Move immediately FFH into reg B.
DCR B Decrement the value of B.
JNZ YY If the value does not become 00H then continue decrementing value to register B.
RET Return back to main routine.
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back