Problem Statement: 8255
Write 8086 ALP to interface DAC and generate following waveforms on oscilloscope,
----------------------------Square wave--------------------------
0000:2050 MOV AL, 80
0000:2052 OUT 67, AL
0000:2054 MOV AL, 01
0000:2056 OUT 63, AL
0000:2058 MOV AL, 00
0000:205A OUT 61, AL
0000:205C CALL 1000
0000:205F MOV AL, 55
0000:2061 OUT 61, AL
0000:2063 CALL 1000
0000:2066 MOV AL, AA
0000:2068 OUT 61, AL
0000:206A CALL 1000
0000:206D MOV AL, FF
0000:206F OUT 61, AL
0000:2071 CALL 1000
0000:2074 MOV AL, AA
0000:2076 OUT 61, AL
0000:2078 CALL 1000
0000:207B MOV AL, 55
0000:207D OUT 61, AL
0000:207F CALL 1000
0000:2082 MOV AL, 00
0000:2084 JMP 205A
0000:2086 INT 3
0000:5000 MOV AL,80
0000:5002 OUT 67,AL
0000:5004 MOV AL,01
0000:5006 OUT 63,AL
0000:5008 MOV AL,00
0000:500A OUT 61,AL
0000:500C INC AL
0000:500E OUT 61,AL
0000:5010 CMP AL,FF
0000:5012 JNZ 500C
0000:5014 JMP 5008
0000:5016 INT 3
0000:7000 MOV AL, 80
0000:7002 OUT 67, AL
0000:7004 MOV AL, 01
0000:7006 OUT 63, AL
0000:7008 MOV AL, 00
0000:700A OUT 61, AL
0000:700C INC AL
0000:700E OUT 61, AL
0000:7010 CMP AL, FF
0000:7012 JNZ 700C
0000:7014 DEC AL
0000:7016 OUT 61, AL
0000:7018 CMP AL, 00
0000:701A JNZ 7014
0000:701C JMP 7008
0000:701E INT 3
Write 8086 ALP to interface DAC and generate following waveforms on oscilloscope,
(i) Square wave - Variable Duty Cycle and Frequency.
(ii) Ramp wave - Variable direction
(iii) Trapezoidal wave
(iv) Stair case wave
(ii) Ramp wave - Variable direction
(iii) Trapezoidal wave
(iv) Stair case wave
----------------------------Square wave--------------------------
0000:4000 MOV CL,FF
0000:4002 DEC CL
0000:4004 JNZ 4002
0000:4006 RET
0000:4007 MOV AL, 80
0000:4009 OUT 67, AL
0000:400B MOV AL, 01
0000:400D OUT 63, AL
0000:400F MOV AL, 00
0000:4011 OUT 61, AL
0000:4013 CALL 4000
0000:4016 MOV AL, FF
0000:4018 OUT 61, AL
0000:401A CALL 4000
0000:401D JMP 400F
0000:401F INT 3
----------------------------Staircase wave-----------------------
0000:2052 OUT 67, AL
0000:2054 MOV AL, 01
0000:2056 OUT 63, AL
0000:2058 MOV AL, 00
0000:205A OUT 61, AL
0000:205C CALL 1000
0000:205F MOV AL, 55
0000:2061 OUT 61, AL
0000:2063 CALL 1000
0000:2066 MOV AL, AA
0000:2068 OUT 61, AL
0000:206A CALL 1000
0000:206D MOV AL, FF
0000:206F OUT 61, AL
0000:2071 CALL 1000
0000:2074 MOV AL, AA
0000:2076 OUT 61, AL
0000:2078 CALL 1000
0000:207B MOV AL, 55
0000:207D OUT 61, AL
0000:207F CALL 1000
0000:2082 MOV AL, 00
0000:2084 JMP 205A
0000:2086 INT 3
----------------------------Square tooth wave--------------------
0000:5000 MOV AL,80
0000:5002 OUT 67,AL
0000:5004 MOV AL,01
0000:5006 OUT 63,AL
0000:5008 MOV AL,00
0000:500A OUT 61,AL
0000:500C INC AL
0000:500E OUT 61,AL
0000:5010 CMP AL,FF
0000:5012 JNZ 500C
0000:5014 JMP 5008
0000:5016 INT 3
----------------------------Saw tooth wave----------------------
0000:6000 MOV AL,80
0000:6002 OUT 67,AL
0000:6004 MOV AL,01
0000:6006 OUT 63,AL
0000:6008 MOV AL,FF
0000:600A OUT 61,AL
0000:600C DEC AL
0000:600E OUT 61,AL
0000:6010 CMP AL,00
0000:6012 JNZ 600C
0000:6014 JMP 6008
0000:6016 INT 3
0000:6002 OUT 67,AL
0000:6004 MOV AL,01
0000:6006 OUT 63,AL
0000:6008 MOV AL,FF
0000:600A OUT 61,AL
0000:600C DEC AL
0000:600E OUT 61,AL
0000:6010 CMP AL,00
0000:6012 JNZ 600C
0000:6014 JMP 6008
0000:6016 INT 3
----------------------------Triangular wave----------------------
0000:7002 OUT 67, AL
0000:7004 MOV AL, 01
0000:7006 OUT 63, AL
0000:7008 MOV AL, 00
0000:700A OUT 61, AL
0000:700C INC AL
0000:700E OUT 61, AL
0000:7010 CMP AL, FF
0000:7012 JNZ 700C
0000:7014 DEC AL
0000:7016 OUT 61, AL
0000:7018 CMP AL, 00
0000:701A JNZ 7014
0000:701C JMP 7008
0000:701E INT 3
No comments:
Post a Comment