Help with the Micro Dual Serial Motor Controller?
Hello,
I've been having some trouble with getting the Micro Dual Serial Motor Controller to work. I'm using the example code that comes with the controller for the BS2 along with a couple of Debug commands just to make sure that the program is executing (see below, the debug commands indicate that the program is running). I've also made sure that the motor works by directly connecting the leads to the BS2 Vin and Vss. I've attached some pictures of the wiring just to make sure everything in connected correctly. (I've also made sure that there aren't any shorts, especially with the motor leads) Any help would be great!
The pins on the controller are:
Pin 1 to Vin
Pin 2 to Vss
Pin 3 to Vdd
Pin 4 to P14
Pin 5 to P15
pin 6 to motor
pin 7 to motor
The code is:
' {$STAMP BS2}
' {$PBASIC 2.5}
speed VAR Byte
DEBUG "running" ,CR
PAUSE 500
DEBUG "go!"
HIGH 14
LOW 15
HIGH 15
PAUSE 100
FOR speed = 0 TO 127
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 0, speed]
PAUSE 20
NEXT
DEBUG "one done"
FOR speed = 127 TO 0
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 0, speed]
PAUSE 20
NEXT
FOR speed = 0 TO 127
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 1, speed]
PAUSE 20
NEXT
FOR speed = 127 TO 0
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 1, speed]
PAUSE 20
NEXT
DEBUG "done"
I've been having some trouble with getting the Micro Dual Serial Motor Controller to work. I'm using the example code that comes with the controller for the BS2 along with a couple of Debug commands just to make sure that the program is executing (see below, the debug commands indicate that the program is running). I've also made sure that the motor works by directly connecting the leads to the BS2 Vin and Vss. I've attached some pictures of the wiring just to make sure everything in connected correctly. (I've also made sure that there aren't any shorts, especially with the motor leads) Any help would be great!
The pins on the controller are:
Pin 1 to Vin
Pin 2 to Vss
Pin 3 to Vdd
Pin 4 to P14
Pin 5 to P15
pin 6 to motor
pin 7 to motor
The code is:
' {$STAMP BS2}
' {$PBASIC 2.5}
speed VAR Byte
DEBUG "running" ,CR
PAUSE 500
DEBUG "go!"
HIGH 14
LOW 15
HIGH 15
PAUSE 100
FOR speed = 0 TO 127
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 0, speed]
PAUSE 20
NEXT
DEBUG "one done"
FOR speed = 127 TO 0
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 0, speed]
PAUSE 20
NEXT
FOR speed = 0 TO 127
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 1, speed]
PAUSE 20
NEXT
FOR speed = 127 TO 0
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 1, speed]
PAUSE 20
NEXT
DEBUG "done"
Comments
Read every page of the manual: http://www.pololu.com/file/download/smc02b_guide.pdf?file_id=0J36
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Thanks for then Hint. I changed the code and it works! Of course, my wife is completely surprised that it would have been something as simple as reading all of the manual. The manual, always a good place to hide something. [noparse]:)[/noparse]