VTech Alphabert s Magic Readport User Manual Page 61

  • Download
  • Add to my manuals
  • Print
  • Page
    / 80
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 60
BM Dept., Govt. Engg. College, Gandhinagar Page 61
Sequence of pulses required to send on port P0 to rotate motor in clockwise and anticlockwise
direction for full step mode:
Program 1: To rotate motor for 100 steps in clockwise direction (Full step)
ORG 30h
MOV P0,#00h ;Configure port P0 as an output port
MOV R0, #64h ;Load count value for 100 steps
MOV A,#11h ;Load accumulator with 11h
loop: MOV P0,A ;Sent data to port 1 (stepper motor)
delay: ACALL delay ;Delay to control speed
RL A ;Next data
DJNZ R0, loop ;Continue rotation if no. of steps<100
MOV R2,#0FFh ;Change this count to change speed
d_loop: DJNZ R2,d_loop
RET
END
Page view 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 79 80

Comments to this Manuals

No comments