;8086 interfaced with 8255 PPI and DAC for Square Wave Generation
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
L1:
MOV AL,00H
MOV DX,FFE0H
OUT DX,AL
CALL DELAY
MOV AL,FFH
MOV DX,FFE0H
OUT DX,AL
CALL DELAY
JMP L1
DELAY:
MOV BX,00FFH
L3:
DEC BX
JNZ L3
RET
CODE ENDS
END
;8086 interfaced with 8255 PPI and DAC for Triangle Wave Generation
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
MOV AL,00H
L1:
MOV DX,FFE0H
OUT DX,AL
INC AL
CMP AL,FFH
JNZ L1
L2:
MOV DX,FFE0H
OUT DX,AL
DEC AL
CMP AL,00H
JNZ L2
JMP L1
CODE ENDS
END
;8086 interfaced with 8255 PPI and DAC for Sine Wave Generation
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
LIST DB 80H,8BH,96H,A1H,ABH,B6H,C0H,C9H,D2H,DAH,E4H,E8H, F0H,F3H,F9H,FBH,FDH,FFH,FFH
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
L5:
MOV SI,OFFSET LIST
MOV CL,13H
L1:
MOV AL,[SI]
MOV DX,FFE0H
OUT DX,AL
INC SI
DEC CL
JNZ L1
MOV CL,13H
L2:
DEC SI
MOV AL,[SI]
MOV DX,FFE0H
OUT DX,AL
DEC CL
JNZ L2
MOV SI,OFFSET LIST
MOV CL,13H
L3:
MOV AL,[SI]
NEG AL
MOV DX,FFE0H
OUT DX,AL
INC SI
DEC CL
JNZ L3
MOV CL,13H
L4:
DEC SI
MOV AL,[SI]
NEG AL
MOV DX,FFE0H
OUT DX,AL
DEC CL
JNZ L4
JMP L5
CODE ENDS
END
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
L1:
MOV AL,00H
MOV DX,FFE0H
OUT DX,AL
CALL DELAY
MOV AL,FFH
MOV DX,FFE0H
OUT DX,AL
CALL DELAY
JMP L1
DELAY:
MOV BX,00FFH
L3:
DEC BX
JNZ L3
RET
CODE ENDS
END
;8086 interfaced with 8255 PPI and DAC for Triangle Wave Generation
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
MOV AL,00H
L1:
MOV DX,FFE0H
OUT DX,AL
INC AL
CMP AL,FFH
JNZ L1
L2:
MOV DX,FFE0H
OUT DX,AL
DEC AL
CMP AL,00H
JNZ L2
JMP L1
CODE ENDS
END
;8086 interfaced with 8255 PPI and DAC for Sine Wave Generation
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
LIST DB 80H,8BH,96H,A1H,ABH,B6H,C0H,C9H,D2H,DAH,E4H,E8H, F0H,F3H,F9H,FBH,FDH,FFH,FFH
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
L5:
MOV SI,OFFSET LIST
MOV CL,13H
L1:
MOV AL,[SI]
MOV DX,FFE0H
OUT DX,AL
INC SI
DEC CL
JNZ L1
MOV CL,13H
L2:
DEC SI
MOV AL,[SI]
MOV DX,FFE0H
OUT DX,AL
DEC CL
JNZ L2
MOV SI,OFFSET LIST
MOV CL,13H
L3:
MOV AL,[SI]
NEG AL
MOV DX,FFE0H
OUT DX,AL
INC SI
DEC CL
JNZ L3
MOV CL,13H
L4:
DEC SI
MOV AL,[SI]
NEG AL
MOV DX,FFE0H
OUT DX,AL
DEC CL
JNZ L4
JMP L5
CODE ENDS
END
can you please show the interfacing diagram for square, triangular and sine wave generation?
ReplyDeletethanks a lot!
mohit