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.
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?