Can't get SEROUT to work

I’m having a lot of trouble getting my serial motor controller to work with my basic atom module. Its a pololu micro dual motor controller that uses a serial interface. It works great with my BS2 but for some reason it wont work with my atom. I tested and check all the pins, tried different baud rates, and so on and nothing. I 99% sure its something wrong with the code. I’m thinking that the baud rate might be wrong perhaps because I wanted a non-inverted bit with no parity at a 9600 baud so the manual says it should be “N9600”. Except if I put any number in front of the 9600 it gives me an error. I attached a short piece of code I am using just to test it out. Please let me know if anything looks wrong.

speed VAR Byte

PAUSE 200

SEROUT 15, 9600, $80, 2,2]            'sets controller in two motor mode

LOW 14                                 'reset motor controller
PAUSE 100
HIGH 14
PAUSE 100                              'motor controller startup time



FOR speed = 0 TO 127                   'motors speed up
SEROUT 15, 9600, $80, 0, 5, speed]    
SEROUT 15, 9600, $80, 0, 7, speed]
PAUSE 40

NEXT

FOR speed = 127 TO 0
SEROUT 15, 9600, $80, 0, 5, speed]    'motors slow down
SEROUT 15, 9600, $80, 0, 7, speed]
PAUSE 40

NEXT

FOR speed = 0 TO 127
SEROUT 15, 9600, $80, 0, 4, speed]   'motors reverse, speed up
SEROUT 15, 9600, $80, 0, 6, speed]
PAUSE 40

NEXT

FOR speed = 127 TO 0
SEROUT 15, 84, $80, 0, 4, speed]     'motors slow down, in reverse
SEROUT 15, 84, $80, 0, 6, speed]
PAUSE 40

NEXT


END

I am not sure which of the IDEs you are using for your adam.

If you are using the older one then I believe that the 9600 should be:
N9600

If you are using the newer IDE, then I believe it should be, something like:
I8N1_9600

I hope this helps

For the 2.2.1.1 IDE it would be i9600. :smiley:

8-Dale