The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN

8255 HANEL


INTERFACINGStepper Motor Connection To The 8255


‰Ch 13 detailed the interface of a stepper motor to the 8051‰Here show stepper motor connection to the 8255 and programming in Fig 15-9


MOV A,#80H

;control word for PA=out

MOV R1,#CRPORT ;control reg port addressMOVX @R1,A ;configure PA=outMOV R1,#APORT ;load PA addressMOV A,#66H ;A=66H,stepper motor sequence
AGAIN MOVX @R1,A

;issue motor sequence to

PA

RR A ;rotate sequence for
clockwise

ACALL DELAY ;waitSJMP AGAIN
Free download pdf