PDA

View Full Version : Sending/receiving data using Linx modules



Goat 403
- 6th May 2009, 14:23
I'm using 2 Pics a transmitter/receiver to send data. Pic 1 is the 16F877 for TX and Pic 2 is the 16F876 for the RX. The Linx modules are TXM-916-ES and RXM-916-ES.

I have tried serout and serin but just receive junk. I have a scope probe on the data lines for both the TX and Rx. I do see the same data on both channels. I know the data is being transmitted and received but I cannot get this data into the pic.

If anyone has used the Pic with the Linx modules before any help would be great.

Thanks

mister_e
- 6th May 2009, 15:36
Does it work without the RF modules?

Bill Legge
- 21st May 2009, 12:25
Yes, I've done it.

I think your problem may be the noise output from the receiver?

The Rx gives a steady stream of noise and one has to use the SEROUT2 and SERIN2 commands with the WAIT modifier in SERIN2 (As described in page 138 of the PBP handbook.

This SERIN2 scans the stream of noise/signal out of the Rx until the transmitted "Start of Frame" characters arrive.

I know that this approach is rather primative but Iv'e got mine to work over a good range with zero errors - but I do live in the back of beyond in a very quiet electromagnetic environment.

If I'm on the right track I'll post my code?

Regards Bill Legge

dhouston
- 21st May 2009, 13:57
I'll second what Bill wrote. Most AM receivers output a constant stream of noise in the absence of a strong signal. Their AGC circuits amplify the low level noise so it tends to be rail-to-rail. You can see some o'scope screenshots here...http://davehouston.org/rf-noise.htmYou must use some sort of STX (start of transmission) marker to distinguish signal from the noise. The simplest approach is to just use a wide pulse as STX. It sets the receiver AGC level so that the noise is suppressed and you can distinguish what immediately follows.http://davehouston.org/RFTipsTricks.htm