Compatibility with ssc

Thanks a lot for all the info!

hi,

i managed to generate a bit pattern to send to ssc32, but there’s no response. could u help me confirm that this is the bit pattern that should go to the ssc32’s rx?
e.g.
#0 P1500 #0 P1490

0 (start bit), 11000100, 1 (stop bit) //sending ‘#’
0000011001 //sending 0

and so on…
am i missing something here?

looks correct… lsb first, ‘#’ = 0x23, ‘0’ = 0x30.

let’s get the oops questions out of the way… what baud is the ssc-32 configured for, how are you connecting it (examples using the TTL inputs from port pins on your uC vs. using an rs-232 connection via the db-9), do you have the jumpers on the ssc-32 configured to talk the way you are wired, and have you measured the width of each bit in either the simulator or on a scope to make sure you are meeting the correct number of uS/bit?

i set the ssc 32 baud rate to 9600 b/s by changing the jumper settings. i’m connecting 2 wires (the yellow and black) between my microcontroller and ssc32 - pin output (TTL) to rx, and gnd to gnd.
i haven’t changed any other jumpers though… what else is needed to communicate this way?
the output baud is correct… i checked it with a scope, and i am using SCI asynchronous communication which sets all the parameters so that looks ok…

could it be a problem with sending ? i sent ‘0D’ after all the commands…

thanks!

not certain but you could try sending and see if that does it.

hi,
it started working so its all good for now :slight_smile: thanks for all the advice.

hi,

I keep getting this problem when i try to send commands to the ssc 32 thru another uc. It responds to the first few servo commands but after that stops responding though the led is blinking showing that it is still receiving the commands.
confused ~~

The blinking LED only means it is receiving serial data, it does not mean the data is at the correct baud rate. The SSC-32 uses a hardware uart and uses a crystal so the baud rate timing should never be questioned. Unfortunately I suspect the code you are writing. Of course it is possible the your SSC-32 has a bad crystal, but it’s not likely. You can test it with a PC and the LynxTerm program. Just type in a long command and see if it completes it or falls on its face. Hope this helps.

Hi,

thanks for the feedback. you were right, the problem was with my code for the transmit.
i suspect there is some problem with my code to receive commands too…

main()
{
....
for(k=1; k<73; k++)
{
        cmdv=calcPosition(k);
        setServoPosition(cmdv);		    		
        sleepforawhile();//*question*
}
...
}

i have 2 questions, pl bear with me:

  1. currently, i’m using a counter for implementiing sleepforawhile(), ie, i check the flag that is set when the counter reaches a specific value and then reset it. however, for some reason, even after k reaches 72 and the program should move out of the loop, it continues checking the counter endlessly and the program doesnt proceed. not sure why that’s happening.
  2. the other way i thought of implementing sleepforawhile() was by querying status of the move. once i get a ‘.’ i go to the next servo pos. my code looks like this (btw, i got a lot of help from other posts on this forum… thanks!)

[code]
while(receiving!=’.’)
{
for(i=0; i<2; i++)
{
transmit(query*); //transmitting “Q\r”
}
receiving=receive();
}

receiving='0';[/code]

This worked once but never after that…
the receive() function looks something like this

unsigned char receive(void)
{
	unsigned char rcv;
	do
	{
		if (error)		{
                                //error processing			
                                 while(1);
		}
	}while(receive register not full);

	
	return (contents of receive register);
}

Any help would be really appreciated.

Cheers*