Thks for help HenrikOlsson,
is work but is not precision,make mistake every 5-6 circle working.
I use this step motor,ST-28 have 5 wire uni polar step motor,
this is specification:
Rated voltage: 12VDC
Current: 32mA
Resistance/phase: 280
Fases: 4
Angle/step: 5.625 deg
Gear ratio: 1:64
detent torque: 350gfcm (0.034Nm)
pull-in torque: 6360g (0.059Nm)
max. starting pulse rate:700pps
max. slewing pulse rate:1400pps
max. speed: 20.5 rpm
steps/rev: 2048 (tested!!)
connector order:
B2: Blue
B1: Pink
A2: Yellow
A1: Orange
GND: Red
And one more question in your code I will see you dont use this like in my code:
and tell is when I change speed of motor maybe I must change some number of steps,of some else... I dont now!!!Delay VAR BYTE
i VAR WORD
TRISB = 0 ' All outputs.
Delay = 10 ' ~100steps / second
For i = 1 to 1000 '1000 steps forward.
PORTB = %00000001
Pause Delay
PORTB = %00000010
Pause Delay
PORTB = %00000100
Pause Delay
PORTB = %00001000
Pause Delay
NEXT here dont have i whay
Pause 2500
For i = 1 to 1000 '1000 steps reverse.
PORTB = %00001000
Pause Delay
PORTB = %00000100
Pause Delay
PORTB = %00000010
Pause Delay
PORTB = %00000001
Pause Delay
NEXT
Bookmarks