Im afraid i could not seem to find my original receiver code.. it seemed to be missing the initialisation of the RF chip.
I will enclose a little more complicated (im afraid) program that i made later on.
This basically transferred data from the USB port (picked up on the ATMEGA USART) to the RF chip (on the ATMEGA SPI) and sent it to another RF module. And collected any received RF data (signaled with the interrupt) back to the USB. I used quite a few data "packet" bytes so I could read out information as a string of ascii characters to help easily spot what information was going back and forth. I also dont use loops in the data transmition, at some point I had found that they can actually ran rather slowly and it could make a mess of the USART data transmission timing. I hope it makes some sense!!
I will enclose a little more complicated (im afraid) program that i made later on.
This basically transferred data from the USB port (picked up on the ATMEGA USART) to the RF chip (on the ATMEGA SPI) and sent it to another RF module. And collected any received RF data (signaled with the interrupt) back to the USB. I used quite a few data "packet" bytes so I could read out information as a string of ascii characters to help easily spot what information was going back and forth. I also dont use loops in the data transmition, at some point I had found that they can actually ran rather slowly and it could make a mess of the USART data transmission timing. I hope it makes some sense!!
Attachments
-
22 KB Views: 1