; Assume the interface is connected over J4 of the trainer.
; This program illustrates the control of direction of
; rotation of the Stepper motor depending upon user choice.
; The program executes in a continuous loop.
; The program can be executed in STAND-ALONE MODE or SERIAL
; MODE of operation.
; The program starts at memory location 0:2000H
; Please refer ESA 86/88E user's manual for mnemonic
; syntax suitable to trainer
OUTPUT 2500AD
ORG 2000H
MOV AX,0000H ;Initialise Segment
MOV ES,AX ;Registers
MOV DX,0FFE6H ;Initialise
MOV AL,80H ;all 8255 Ports as o/p
OUT DX,AL
START: MOV AL,11H ;Output value
MOV DX,0FFE0H ;to Port A
R1: OUT DX,AL
CALL DELAY ;Introduce delay
RCR AL,1 ;Rotate bits in
JMP SHORT R1 ;data byte right & repeat
DELAY: MOV CX,800H ;Delay routine
SS: LOOP SS
RET
END
; This program illustrates the control of direction of
; rotation of the Stepper motor depending upon user choice.
; The program executes in a continuous loop.
; The program can be executed in STAND-ALONE MODE or SERIAL
; MODE of operation.
; The program starts at memory location 0:2000H
; Please refer ESA 86/88E user's manual for mnemonic
; syntax suitable to trainer
OUTPUT 2500AD
ORG 2000H
MOV AX,0000H ;Initialise Segment
MOV ES,AX ;Registers
MOV DX,0FFE6H ;Initialise
MOV AL,80H ;all 8255 Ports as o/p
OUT DX,AL
START: MOV AL,11H ;Output value
MOV DX,0FFE0H ;to Port A
R1: OUT DX,AL
CALL DELAY ;Introduce delay
RCR AL,1 ;Rotate bits in
JMP SHORT R1 ;data byte right & repeat
DELAY: MOV CX,800H ;Delay routine
SS: LOOP SS
RET
END
0 comments:
Post a Comment