garbage from RF modules

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello avrfreaks!

this question seems to be a bit old, and had already been asked several times on many forums, including avrfreaks itself. i have been reading all those for quite some time.

but still i need to discuss it once again here. there are a few things i still don't get.

lets say that i interfaced an RF-Rx module with an atmega by connecting the data-out pin of the RF-module with the RX pin of the atmega. i also have a LCD module interfaced with the same atmega.

lets say, i have Tx system located elsewhere.

now, a common problem encountered while using RF-modules , what i have come to know through the internet, is that the RF-Rx keeps on catching various noise signals from the atmosphere, even if no data is being transmitted from the receiver side. this is no big deal since the basic RF modules generally use ASK modulation and demodulation.

lets come back to our receiver setup. lets have an overview of the program burnt into the atmega at the receiver side. the atmega simply utilizes the RXC interrupt and displays the data received from the Rx over the LCD module.

when i power ON the receiver setup, the LCD displays a continuous stream of garbage even if there is no transmission from the Tx side.

giving out garbage values by the RF-Rx is not the question. but how is the UART accepting it as a valid data? since we know that the UART has its own specific protocol for communication. it first looks for the start bit, then it knows that some specific number of succeeding bits (5,6,7,8 or 9) are data bits, and then there are one or two stop bits, according to the settings.

another question!
distinguishing valid signals from noise/garbage is something that can be dealt with. but since the Rx is continuously receiving garbage values and forwarding it to the UART, the RXC interrupt is continuously occurring. this means that the uC will be continuously stuck in RXC interrupts, since the garbage is continuously received. that is, it won't be able to do something else but executing RXC ISR. is that so? is that really the case?

This topic has a solution.

Long live my MASTER.

Last Edited: Fri. Oct 16, 2015 - 01:43 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For these modules, using the usart is not the best solution. Most commercial products do not do it this way - they bit bash their own protocol.
It is not hard to fool the usart into detecting a false start on noise. The rate of rxc interrupts is limited by the baud rate set for the usart - it has to receive 10 bits before interrupting. So at 1200 baud, you can only get 120 interrupts per second.