Control SSC - 32 with a picaxe 40x1 chip

Hi all I’m currently attempting to control a lynxmotion SSC - 32 with a picaxe 28/40 protoboard and a 40x1 chip.

So this is what I’ve cobbled together. I Used the Lynx sample code from the ssc users pdf and translated it to picaxe basic (ish) I think.

let w0 = 1000 

let w1 = 1500
let b4 = 5

start:

serout 2,N2400,("#",#b4, #w1, “T”, #w0,13)

pause 1500

w1 = 2000

serout 2,N2400,("#",#b4, #w1, “T”, #w0,13)
pause 2000


goto start

So…
Mmmm not working. Looks good but no servo action.

The SSC status indicator LED turns on at powerup and stays light 'til the picaxe is connected. At which point it goes out. Any subsequent comms are indicated with a quick blink.

Well, all seems good according to the LED. It’s steady,off/blinking when the picaxe is connected/disconnected (doing the right things) but there is no life from the servo.

I’m thinking the pic is doing the trick but…
A) the code isn’t making sense to the Atmel on the ssc
B) the servo’s on the wrong pin

I’m wondering…
A) servo’s connected to the wrong pin
B) What is the significance of 5 in (b4 = 5)? Is it the pinout?
C) How do I specify pin0 in ACSII?

Here is a link to my topic on the picaxe forum where axe people have had a think about the problem and have noted there ideas…

picaxeforum.co.uk/showthread … lynxmotion

This is the suggested sample code I’ve rewritten in picaxe basic

’ Atom / SSC-32 Test
’ Configure the SSC-32 for 38.4k baud.
’ Note, a | means the line continues onto the next line.

’ Note, a ’ means the line is a comment, and will not be compiled.

servo0pw var word

movetime var word
servo0pw = 1000

movetime = 2500

start:

servo0pw = 1000

serout p0,i38400,"#0P",DEC servo0pw,“T”,DEC movetime,13]

pause 2500

servo0pw = 2000

serout p0,i38400,"#0P",DEC servo0pw,“T”,DEC movetime,13]

pause 2500


goto start

Sorry, I don’t know much about picaxe.

But the first things I would check are your communication parameters. The atom type program you showed has the communication baud rate set to 38400 and yours is set to 2400 baud. Does the jumpers on your SSC-32 match this?

Also it does not look like your are generating the command properly.
For example

serout 2,N2400,("#",#b4, #w1, "T", #w0,13)


I will assume in picaxe basic that the #b4 will output the variable B4 as Ascii Text and not its binary equivlent?

If so you should probably have it as:

serout 2,N2400,("#",#b4, "P",#w1, "T",#w0,13)


The P is important it says you want the pulse width to be …

Good Luck
Kurt

Yep keeping an eye on baud rate (2400 set. i.e. no jumpers)

I’ve also changed the pause times to 1000 and 5000. the indicator light blinks in 1s and 5s intervals. It’s definately the ascii code.

Including your suggestion, these are the different versions I’ve tried… (still no servo movement)
picaxeforum.co.uk/showthread … #post85008

Here is the picaxe commands datasheet. ‘serial out’ section is the relevant bit.
technobots.co.uk/Data%20Shee … -BASIC.pdf

Hey it just occurred to me there could be a connection between this problem and an issue I had earlier this week. Both issues relate to serial communication.

Here’s a link to the thread…
lynxmotion.net/phpbb/viewtop … ght=ssc+32

One moment it didn’t work and next it did and there was nothing changed except the sands of time??? I still have no idea why or what the cause was. Have a read maybe it’s relevant/enlightening?