Communication probems ssc32 board asynchron or synchron?

hi

i have a problems to communicate to my SSC32 board.
If i want to send a string(as example:"#5 P1500 ") the servocontrollerboard doesnt do anything.

i have build a µC-Board on my own. i use a atmega 8-16PU. i have programmed it in C.
how should i communicate with the SSC32 board? Asynchron or Synchron???
i can communicate with my µC board to my PC. only from my µC Board to the SSC32 board it didnt work!

here is my code:

void USART_INIT()
{
//UBRRH = 0x00;
UBRRL = 0x0F;				

UCSRB |= (1<<RXEN) | (1<<TXEN);   			 
UCSRC  = (1<<URSEL) | (1<<UCSZ1) | (1<<UCSZ0);  
UCSRA |= (1<< U2X);     

}
void main()
{
	USART_INIT();
	while(1)
	{				
	USART_TRANSMIT("#6 P1200");
	}
}

void USART_TRANSMIT(unsigned char *str)
{
 	while (*str != 0)
 	{
		while(!(UCSRA & (1<<UDRE)));	
	   	UDR = *str++; 					
	}		 		          		
}

thanks for your help!!!

should be USART_TRANSMIT( “#6 P1200\r” ) ; since the SSC-32 needs the \r to process the line.

also putting the USART_TRANSMIT( … ) ; inside the while (1) {…} loop is pounding the snot out of the ssc-32 for no reason. Just put it like this

void main()
{
    USART_INIT() ;
    USART_TRANSMIT( "#6 P1200\r" ) ;
    while( 1 ) ;
}

thanks EddieB

the “\r” was the problem and i have forgotten that i have to use a crossover cable!

but i have another question:
how long should be a delay befor i send another command?

with best regards
ralph

you can concatentate multiple commands in the same string of course but other than that I don’t think you need a delay… not sure if you can over-run the input buffer on the ssc-32 or not though. there is a practical limit of course where you may need to consider the speed of the servo. usually the manufacturers specify so many degrees in so many seconds but in practice the amount of torque on the servo will cause that number to vary. Unfortunately the only suggestion I have is to test it out… maybe make provisions in your code to allow for a delay, create some sequences as test patterns, and then run them with different delays to see if you get the same results.