Stepper Motor Driver (PASM) from OBEX not working. Please help
TC
Posts: 1,019
Hello all,
I am trying to get a stepper motor to work. I downloaded Stepper Motor Driver (PASM) from OBEX. It does not seam to work, and I know nothing about PASM. I can get
to work on the same pins, but the object will not work. Could someone please take a look, and tell me if I have to do something.
I do also have pin 20 (Home switch) set to HIGH, I even tried it set to LOW.
Thanks
TC
I am trying to get a stepper motor to work. I downloaded Stepper Motor Driver (PASM) from OBEX. It does not seam to work, and I know nothing about PASM. I can get
CON _CLKMODE = XTAL1 + PLL16X _XINFREQ = 5_000_000 StepPin = 16 PUB temp repeat dira[StepPin]~~ dira[StepPin+1]~~ Outa[StepPin+1]~ ' set to negative direction repeat 1000 ' Move 1000 steps in the negative direction outa[StepPin]~ outa[StepPin]~~ waitcnt(clkfreq/2000+cnt) waitcnt(clkfreq+cnt) outa[StepPin+1]~~ ' set to positive direction repeat 1000 ' Move 1000 steps in the positive direction outa[StepPin]~ outa[StepPin]~~ waitcnt(clkfreq/7000+cnt) waitcnt(clkfreq+cnt)
to work on the same pins, but the object will not work. Could someone please take a look, and tell me if I have to do something.
I do also have pin 20 (Home switch) set to HIGH, I even tried it set to LOW.
Thanks
TC
Comments
I think you are confusing the pin numbers with the I/O designations.
In the code you posted the stepper output is Pin 21 (I/O 16) and the Home signal is Pin 25 (I/O 20).
Does this make sense?
regards,
Desiko
Yes it does. That is what I have setup, but it still does not work.
Same goes for stepper output, are you using pin 21 or pin 16?