**************PROGRAM*******************
DIGITAL TO ANALOG CONVERSION
**********************************************
1) SQUARE WAVE-
mov al,89 ;configure 8255
out 67,al ;command address for 8255 - 67H
mov al,01 ;configure DAC (start of conversion)
out 63,al ;command address for DAC- 63H
mov al,00
l1: out 61,al
call delay
mov al,FF
out 61,al
call delay
jmp l1
2) RAMP WAVE-
DIGITAL TO ANALOG CONVERSION
**********************************************
1) SQUARE WAVE-
mov al,89 ;configure 8255
out 67,al ;command address for 8255 - 67H
mov al,01 ;configure DAC (start of conversion)
out 63,al ;command address for DAC- 63H
mov al,00
l1: out 61,al
call delay
mov al,FF
out 61,al
call delay
jmp l1
2) RAMP WAVE-
mov al,89
out 67,al
mov al,01
out 63,al
mov al,00
out 67,al
mov al,01
out 63,al
mov al,00
l1: out 61,al
inc al
cmp al,FF
jmp l1
3) STAIRCASE WAVE-
mov al,89
out 67,al
mov al,01
out 63,al
mov al,00
out 67,al
mov al,01
out 63,al
mov al,00
l1: out 61,al
call delay
add al,51
cmp al,FF
jnz l1
l2: out 61,al
call delay
sub al,51
cmp al,00
jnz l2
jmp l1
4) TRAPEZOIDAL WAVE-
mov al,89
out 67,al
mov al,01
out 63,al
mov al,00
out 67,al
mov al,01
out 63,al
mov al,00
l1: out 61,al
inc al
cmp al,FF
jne l1
out 61,al
call delay
l2: out 61,al
dec al
cmp al,00
jne l2
call delay
jmp l1
No comments:
Post a Comment