; Assume the interface is connected over J4 of trainer
; This program generates a Square or Triangular wave at Xout or Yout
; The program can be executed in Stand alone or Serial mode
; Execute the program from memory location 2000H
OUTPUT 2500AD
ORG 2000H
MOV AX,0000H
MOV CS,AX
MOV ES,AX
MOV DX,0FFE6H ;Initialise all 8255
MOV AL,80H ;ports as O/P ports
OUT DX,AL
START: MOV CX,0FFH ;set count
MOV AL,00H ;start from 0
UP: INC AL ;increment data for
MOV DX,0FFE0H ;+ive going slope and
OUT DX,AL ;output at port A & B
MOV DX,0FFE2H
OUT DX,AL
LOOP UP
MOV CX,0FFH ;set count
MOV AX,CX ;start from FFh
DOWN: DEC AL ;decrement data for
MOV DX,0FFE0H ;-ive going slope at
OUT DX,AL ;port A & B
MOV DX,0FFE2H
OUT DX,AL
LOOP DOWN
JMP SHORT START ;repeat continuously
END
; This program generates a Square or Triangular wave at Xout or Yout
; The program can be executed in Stand alone or Serial mode
; Execute the program from memory location 2000H
OUTPUT 2500AD
ORG 2000H
MOV AX,0000H
MOV CS,AX
MOV ES,AX
MOV DX,0FFE6H ;Initialise all 8255
MOV AL,80H ;ports as O/P ports
OUT DX,AL
START: MOV CX,0FFH ;set count
MOV AL,00H ;start from 0
UP: INC AL ;increment data for
MOV DX,0FFE0H ;+ive going slope and
OUT DX,AL ;output at port A & B
MOV DX,0FFE2H
OUT DX,AL
LOOP UP
MOV CX,0FFH ;set count
MOV AX,CX ;start from FFh
DOWN: DEC AL ;decrement data for
MOV DX,0FFE0H ;-ive going slope at
OUT DX,AL ;port A & B
MOV DX,0FFE2H
OUT DX,AL
LOOP DOWN
JMP SHORT START ;repeat continuously
END
0 comments:
Post a Comment