StampWorks Stepper Experiment --> SX/B
Mike W
Posts: 105
I have tried to rewrite SW20-EX27-Stepper_Control.BS2 to work in SX/B. The program seems to run OK but I am not sure of it.Could somebody take a look at it?
First I am not sure if I configured my pull up resistors correctly.
Second I am not quite clear on ( timing ) and the use of RC Time,
Third can I· configureonly the pins I am using in port B ( rb.4, rb.5, rb.6, rb.7) with TRIS_B or do I have to configure all of them.
The stepper is stopped in the middle Potentiometer posistion and starts slow, working to fast in eather direction.
I am using a· Copal Stepper I pulled out of an old 3 1/2 floppy drive, the SX is connected to the stepper via (4) 2n2222 transistors and a 1K resistor between the I/O pin and Base. The potentiomete is wired as in the schematic for SW20-EX27-Stepper_Control.BS2
Thanks
Mike W
Post Edited By Moderator (Jon Williams (Parallax)) : 2/3/2006 8:02:56 PM GMT
First I am not sure if I configured my pull up resistors correctly.
Second I am not quite clear on ( timing ) and the use of RC Time,
Third can I· configureonly the pins I am using in port B ( rb.4, rb.5, rb.6, rb.7) with TRIS_B or do I have to configure all of them.
The stepper is stopped in the middle Potentiometer posistion and starts slow, working to fast in eather direction.
I am using a· Copal Stepper I pulled out of an old 3 1/2 floppy drive, the SX is connected to the stepper via (4) 2n2222 transistors and a 1K resistor between the I/O pin and Base. The potentiomete is wired as in the schematic for SW20-EX27-Stepper_Control.BS2
Thanks
Mike W
Post Edited By Moderator (Jon Williams (Parallax)) : 2/3/2006 8:02:56 PM GMT
SXB
4K
Comments
Looks pretty good except....
You have "right" and "left" declared as subroutines, but you just jumping to them then jumping back to main.
If you want them to be subroutines then you'll have to do this:
IF Rc_RT < Rc_LT THEN
Right
ENDIF
And of course put a RETURN at the end of each subroutine instead of "GOTO Main"
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"Ability may get you to the top, but it takes character to keep you there."
·