Skip to content

08

Stepper Motor Interfacing

p08

DATA SEGMENT
PORTA EQU 00H
PORTB EQU 02H
PORTC EQU 04H
PORT_CON EQU 06H
DATA ENDS
CODE SEGMENT
MOV AX, DATA
MOV DS, AX
ORG 0000H
START:
MOV DX, PORT_CON
MOV AL, 10000000B
OUT DX, AL
MOV SI, 0
MOV DI, 0
LL0:MOV CX, 2FFFH
LL1:MOV AL, S2[DI]
MOV DX, PORTC
OUT DX, AL
LOOP LL1
INC DI
CMP DI, 4
JL LL0
JMP START
ORG 1000H
S2 DB 1101B
DB 1011B
DB 0111B
DB 1110B
CODE ENDS
END
Last Updated: 2023-01-25 ; Contributors: AhmedThahir

Comments