Re: Motor Stepper Example
Hi, astanapane ...
the problem is Pauseus 1 gives a ... 24µs pulse @ 4Mhz !!! ( see manual p.185 ) - I found 23µs @ scope !
so, you might need to use ... assembler and absolutely avoid the Stepit sub ...!
so, try this piece of code ...
Code:
ROTATION:
for i = 0 to (stepM - 1)
@ bsf PORTB,2 ; This gives ON pulse for 1µs ...
@ bcf PORTB,2
pauseUS delay
next
return
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks