i just start using the pololu serial 16 servo controller, after assembled it i try to go through the initial test, the first part, where grounded the serial input was successful, which all the led on, but i really don’t understand what is meant by real serial input, can u specifically explain to me this proccess, thanks.
for the second part, when i unplug the grounded signal the yellow led on, and i connect the serial DB9 to my pc, while open the hyper terminal, the leds were blinking, signaling that the boud rate was either high and sometimes low,i can’t get what was stated inside the manual, could u explain to me? thanks
hope to hear from u soon
It sounds as if your servo controller is working. The servo controller requires the first byte it sees to be 0x80 (or 0xFF in Mini SSC II mode) to calculate the baud rate. You are most likely sending other values than that from hyper terminal, which is why you would see baud rate errors.
What happens when you send the correct command packet?
Thanks for the reply.
here are some quetion need your confirmation…
1.the steps in the initial test. after i’ve connect the ground to the ‘S’, the 4 led light up, then before unplug the grounded wire, since i’m using the pc(hyper terminal, boud rate 9600) i connect the both serial db9, computer and the controller. then i unplug the ground wire, is it correct?
afterward i type by regarding to the protocal given?
2.what shall i type in the hyper terminal window? coz there is no char for ascii 0x80, how?
It sounds like your controller is working, so you don’t need to worry about the initial test for now. In general, you do NOT want to have an input connected to ground as you also try to send it serial data. Disconnect the ground connection before you do anything else.
If you want to just send commands, you need a terminal that will let you send hex (or binary) values, not just ascii characters. If you do a search, you’ll find various free or demo versions you can use to test your controller.
I’m trying to control the controller by using the PIC16F877A, sending serial data, 0x80, 0x01, 0x04, 0x00, 0x0B, 0xB8, but there is no change of direction. and the yellow led light, the red led blink, what does this mean? why this happen? and how to solve this?
hope to hear from u soon, thanks.
besides, does anyone have sample program (PIC assembly language) to control the servo? hope u all can help me, k?
here is another problem i’m facing now.
i try to send data as above message 80,01,04,01,1B,B3, from the PIC to the servo controller, but the green light flashing and the red light lighted.
the baud rate i’ve tried (19200, 9600, 4800) comes uot with the same result.
Why? and how to solve this?
This is an indication of a problem with the baud rate detection. This can result from either a bad baud rate or bad data being sent at the right baud rate. Do you have a way of confirming your serial output (e.g. an oscilloscope or another serial device)?
Our sample project 1 includes code for setting up serial transmission on a PIC with a UART, so that code should be applicable to your project. If things don’t work, you can post the relevant code here and someone might be able to spot the problem. Make sure you let us know what your clock speed is.
thanks for the reply
i’ve seen the program for project 1, and the setting is same with me.
for your information, i use pc to see for the code generated, is correct. but the green led stil blinking and red stil light.
here is the program:
;========= CONSTANT -- USART
RTS_OUTPUT EQU 1
;Port B Pin 1 output for flow control
CTS_INPUT EQU 2
;Port B Pin 2 input for flow control
;Constant for baud for 9600 baud
BAUD_CONSTANT EQU 0x33
BCF STATUS,RP1 ;select bank0
BCF STATUS,RP1 ;select bank1
;============================== STARTING VECTOR =================================
;============================== INTERRUPT VECTOR ================================
ORG 0X04 ;interrupt vector
;== Initial Set Up
MOVLW B'11111111' ;INPUT
CLRF TRISC ;OUTPUT CLRF TRISD
;============= Main Program ======
MAIN CALL SER_SETUP
MOVLW 0X02 CALL SERTX
MOVLW 0X01 CALL SERTX
;BSF PORTB,1 ;set RTS off before setting as output
BANK1 ;change from bank0 to bank1
;BCF TRISB,1 ;enable RTS pin as output
;set baud rate
;baud rate high speed option; 0 for low speed
BANK0 ;change from bank1 to bank0
BSF RCSTA,SPEN ;enable serial port
;change from unknown bank to bank0
BTFSS PIR1,TXIF ;check that buffer is empty
MOVWF TXREG ;transmit byte
You might try simplifying your program to find where the error happens. Begin by setting the serial line high, wait a while, then send one byte at a time with big pauses in between (or with some feedback you can use to determine where in the program you are). I suspect that the error condition will happen after the first byte (0x80), but it would be good to know for sure.
Also, you’re using the logic-level serial input, right? What voltage is your PIC running at?
thanks for the reply,
after many time of trial, i can control the servo motor already,
however, here is another problem coz the controller only read the first 6 bytes @ 5 bytes, it means that if i’m writting 2 packet of 6 bytes data, it only read the 1st one and go to the first position, whereas the 2nd one is neglected, why is this happen?
i’m using 8MHz and PIC16F877A power supply is 5V
thanks again for the technical help. hope to hear from u soon.