Basic Stamp 2 + SSC-32 communication problem

I’ve been trying to get my BS2 to send commands to my SSC-32 board, but so far no success :cry: I’ve created a simple program that I send over the serial cable (null modem) from the BS2 over to the SSC-32, but it doesn’t seem to work.

I’ve been using this as a sample program (with the BS2 and PBasic 2.5 directives):

PAUSE 1500 SEROUT 15, 6, "#2 P1500", 13] PAUSE 1000 END
I believe I have the SSC-32 set to the right baud rate, but it does not work. I can control the arm fine from the computer with both baud rate jumpers in, though.

Any ideas? I’m at my wits’ end with this.

or so I had thought :laughing: I didn’t realize I was viewing the board upside-down compared to the manual’s picture. It’s set correctly now, and works :smiley:

I have a further mystery to relate … It seems when I finally got it to work (using my laptop), I had mistakenly entered “25” instead of “15” for the pin number on the SEROUT command. When I fixed it, the arm no longer functioned, but when I set it to 16 (which I assume is what 25 defaults to) it works perfectly. I can’t complain now that it’s working :laughing: but could anybody shed some light as to why pin #16 works but #15 doesn’t?

I’m confused, there are 16 I/O pins total but there is no P16. The pins are numbered from 0 to 15 giving 16 I/O pins. When you call for P16, there should be an error I would think. If you want to use Pin 16 you would call it as P15.

Instead of lableing the pins 1-16 you are lableing them 0-15. So in your code you use SEROUT 16, 6, “#2 P1500”, 13] and it works?

Yeah.

Same reason it confounds me :confused:

Hmm… odd.

Have you questioned the guys at parallax as to what a number > 15 will yield?

I made more than one error :blush:

First of all, the baud “6” which I thought was 9600 turned out to be 38.4k. Although it worked fine, when I was trying to use SERIN to query the SSC-32 board the results were either garbled or nonexistent. After a bit of head-scratching, I finally realized my mistake. I set the baud rate to 2400 on the SSC and used the “384” corresponding number for SEROUT and SERIN commands, and finally achieved reliable results :smiley: I could probably bump the baud up some more, but 2400 is more than enough for my project.

My other problem was which pin to use for SERIN. No matter what I tried, it didn’t work. Until I tried 16 again, that is :confused: Magical number, that. According to Parallax’s BS2 manual, magical number 16 corresponds to SOUT (physical pin #1) when using SEROUT and SIN (physical pin #2) when using SERIN.

Thank goodness for the internet :laughing: