Hi,
I have the 315 mhz 4800 bps RF link. I am using two Axon microcontrollers for Tx/Rx. Each Axon is running at 16mhz.
I wrote my own routines for each of the GetByte and SendByte
Here is my SendByte routine
void SendByte(char c) {
while (!(UCSR0A & (1<<UDRE0))); // wait until you are able to send a byte
UDR0 = c;
}
Here is my getbyte routine
int GetByte0(void)
{
while((UCSR0A&(1<<RXC0)) == 0); // wait until a byte is received
return UDR0;
}
I was getting transmission problems when sending 55,56,59 ( in hex) .
SendByte(data1); //55
SendByte(data2); //56
SendByte(data3); //59
SendByte(data4); //5A
I did some tests of transmission packets and here is my results (all tests were run at 4800 bps)
For the following combinations I the transmission is really crappy and I get less than 300 3 byte packets in 30 seconds.
0,55,56,59,0 with 10ms delay after each packet, with 5ms delay after each byte, with 3ms delay after each byte, with no delay at all
0,55,56,59 with 10ms delay after each packet, with 5ms delay after each packet ,with 5ms delay after each byte, with 3ms delay after each byte, with no delay at all
So far the best I’ve gotten is this combination :
0,55,56,59,0 with 5ms delay after each packet and 852 correct 3 byte packets in 30 seconds - 28.4 packets per second == 85.2 bytes per second - still pretty crappy
I’m going to experiment with different delay times after each packet.
Datasheets are provided on this page for my receiver and transmitter : http://www.sparkfun.com/commerce/produc … ts_id=7816
More info on my struggle ( in blog like format) can be found in my thread on SoR Forum - http://www.societyofrobots.com/robotfor … pic=5541.0
Anything I can do to improve transmission and accuracy?
Thank You,
Eric