Controlling SSC-32 with BASIC Stamp 2

I am having a couple of issues controlling my SSC-32 with my BS2. When I try to serout data to the SSC-32, it doesn’t always seem to arrive. I have connected the Rx pin of the SSC-32 to pin 0 on my BS2.

I use the following code:

SEROUT 0, 6, “ver”]

Sometimes, the data LED will turn off, but most times it will not.

If I repeatedly press the reset button on my BOE (the breadboard that connects to the BS2 to the SSC-32, which when the reset button is pressed, restarts the program stored in the BS2), eventually the data LED on the SSC-32 turns off, indicating to me that proper data was received.

I am having even worse issues trying to get the SSC-32’s response to the ver command to serin properly. But lets just focus on trying to get the SSC-32 to receive data everytime it has been sent data.

This suggests to me that the SSC-32 and my BS2 are having trouble synchronizing, but I know relatively little about serial communications. Anyone have any suggestions to make the communication between the two more precise?

The RX pin on the SSC-32 is but one of the three TTL (0V or 5V) serial communication pins.

By rule of thumb, they would be connected like so:

SSC-32…Basic Stamp 2
GND…GND
TX…RX
RX…TX

I’m not sure, though, so I’ll post back in a few minutes, after I take a look at the Stamp’s data sheet.

Well, I can’t seem to find the sheet that says which pins are the dedicated serial pins, but you probably already know where they are.
Those two dedicated pins will be your RX and TX.

Note:
With TX and RX, it’s usually ok to swap them, if you feel that you may have them the wrong way, without causing damage.

By the way, there’s a reason that you don’t need to connect the Vdd (+) pins, even though you’re connecting the GND (-) pins.
If you connect the Vdd, as well, you’d be combining both battery sources directly.
The RX and the TX act as a +, when they’re high, so that’s where you get the complete circuit.

Actually with the BS2, there are no dedicated Rx and Tx pins because any of the 16 I/O pins can process serial data. I have arbitrarily used pins 0 and 1 for Tx and Rx, respectively. My issue is not that I cannot Transmit data, my issue is that the SSC-32 does not receive the data everytime I send it.

This may be completely off base because its based upon different micros. That said: software emulated serial communication is usually tricker to make reliable than hardware UART driven pins. If the micro you’re using has a UART and you don’t have a good reason to not be using it, you should. So if there are specific pins that are suggested for serial, it’s probably because there is a hardware UART which will likely behave better.

Hmm… it recieves info sometimes…

Try sending a single servo’s pulse instruction until you get the light to go out.
Then querry that servo’s pulse, and see exaclty what the SSC-32 “heard” from your micro.
(You’ll need to hook up to the TX of the SSC-32, as well, for that).

Have you quintuplet-checked that all of the baud rates match?

I’m actually having similar problems with a WiPort and an SSC-32.
Although, with mine, I can’t ever get the SSC-32’s LED to go off.

With any luck, one of us will figure out what’s up, and it’ll be the solution to the other’s problem.

:slight_smile: