CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Linx RMX-433-LR problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Kasper



Joined: 14 Jan 2004
Posts: 88
Location: Aurora, Ontario, Canada

View user's profile Send private message Visit poster's website

Linx RMX-433-LR problem
PostPosted: Wed Jun 30, 2004 9:12 am     Reply with quote

Hi.

we have a board which uses a linx 433MHz receiver as part of a wireless link. It is hooked up to the first UART of a PIC 18F6620, where the code takes care of the odd noise spike by having a timer reset the byte counter after the time it takes for one character to be received, if no data has been received.
Now linx has made this new long range receiver, which they claim to be a drop in replacement, offering much longer range. Great I think and plop one on the board, only to find that it puts out random bits like mad. The below picture is the data out from their own evaluation board when nothing is being transmissed. ( in comparison the LR receiver, their old one, outputted a clean data line with the odd random bit, which was easily taken care off in software)



now can anyone suggest a way to make this work with a hardware uart, or do we need to do a new board layout and dedicate a controller to find the desired data in this mess?

I am open to suggestions

Kasper
Guest








PostPosted: Wed Jun 30, 2004 11:24 am     Reply with quote

Your figure shows the typical digital noise in wireless connections without transmission.
Usually you have to use at least a header just before your data bits. Much better to use a LAM (Look At Me) signal and a terminator stream, too.
I use something like this:
(Note that the header consists of 0xF8 characters, the LAM is 2-byte wide -B then an O- and the terminator stream is identical to header - so the header and the termin. drives the state machine into the "Wait for LAM" state)

#int_rda
void serial_isr()
{

char mit;

mit = getc();
if (mit == 0xF8) numF8++; // count the 0xF8
else numF8 = 0;
if (numF8 > LIMIT) { // reset state machine
smSerial = 0;
return;
}
if (smSerial == 0 && mit == 'B') { // first LAM chr
smSerial = 1;
return;
} else if (smSerial == 1 && mit == 'O') { // second LAM chr
smSerial = 2; // step into the true receive part
rdstr = 0; // reset the queue
bstr = 0;
return;
} else if (smSerial == 2) { // store the data byte
serpuffer[rdstr] = mit;
rdstr++;
rdstr &= 0x1F;
rbytes++;
}
}

Keep in mind that after completion (what is defined as "smSerial = 0 AND rdstr > LIMIT" what is true if we catched the terminator and we have at least one byte in the queue) the queue contains [RealDataLength + LIMIT] bytes. Additionally set the state machine's startup state to 0xFF in early main().
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group