Hi, everybody, I really really need help on this
I’ve just got the SSC32 and I want to use it for the hexapod, I have the ATMega8535 minimum system and I cannot send the serial data to the SSC32, I’m using BASCOMAVR, I have follow all the instruction from the manual, and using the TTL level communication to the SSC32, but I did’t see any servo movement, here is my program listing :
I have not used the ATMega8535, but have used several other Atmegas… I don’t think you are going to have much luck talking at the baud rate 115200. If you look at the spec sheet for the processor, depending on how basecom configures the USART you will be off by either 8.5% or 3.5% which is too much for reliable communications. Try changing to the baud rate of 38400 (and change the jumpers on the SSC-32 as well) and see if you have better luck
Yes, I’ve tried with all of the baud rate setting, but still nothing happen, if I’m using TTL level the pin out should be TX on my 8535 and RX on SSC32, or TX ---- TX? or is it the BASCOMAVR compiler that is not working well since I read in other forums that other’s experience the same problem in serial communication using BASCOMAVR? thx.
Is the SSC-32 receiving anything? That is when you run your program, do you see the LED on the SSC-32 flashing? That would say that is receiving something, although not necessary anything valid. It will still flash even at the wrong baud rate. For now assuming now flashing:
What wires do you have connected between your chip and the SSC-32? Have you verified that you have the TX pin from your board going to the RX pin of the SSC-32? Also have you run a ground wire between the two boards? Pictures help here.
how are both boards powered?
Don’t know enough about bascom… I use C on my Atmegas (either Winavr or Arduino). So I don’t know what BASCOM does to initialize the USART to allow outputs. Does it set up an interrupt handler that buffers the output or does it directly output to the appropriate IO register and wait for it to complete… Does Print default to going to the USART? … Sorry but lots I don’t know about this…
Edit: If you don’t have any luck with using the USART you might try configuring a software USART and see if that does any better,
Looking at: avrhelp.mcselec.com/index.html?uart.htm
You could try to configure another output port pin, like in the example PortC pin 1
'Open a TRANSMIT channel for output
Open "comc.1:19200,8,n,1" For Output As #1
Print #1 , "serial output"
in BASCOM serial initializing is simply just putting :
$crystal = 8000000
$baudrate = 38400
then we’re ready to use the USART, and instruction PRINT will directly sending data to the TXD with default setting, 8 data bit, 1 stop bit, no parity. Apparently, SSC32 shows that it’is receiving data, I can see that the LED blinking, I’m startting to think changing from BASCOMAVR to winavr, but first I’ll try using the software USART, hope I get some luck, thx.
No Luck at all.
I’ve tried to connect my avr to PC and send data to the hyper terminal, all work’s well, and I even try using lynx term and connect to other pc using hyper terminal and watch the data that sent by lynxterm, it is the same with data that I send to the SSC32 from the AVR, just #0 P1500 and so on…, but, when I connect the AVR to SSC32 nothing happen just the LED blinking that happen, should I change my crystal frequency? Help I Really need it. thx.
Having set the baud rate in your program to 38400, have you also set the jumpers on the SSC32 to accept that baud rate? Can you post a picture of the SSC32?