After going through the given code with the supplied board uMirf from sparkfun I had a query on the config setup for transmit and receive.
When going to setup the Transmit and Receive you have to set TX_CE=0,TX_CS=1 and then load the config bits in. Then when setting up the receiver you set RX_CE=0,RX_CS=1 and then load the config bits in.
As these pins are the same for the TX and RX on the supplied sparkfun board does this mean that the Transceiver must be configured each time before transmit or receive as it appears to me that the inital config bits setup is cleared each time the transmit or receive is configured??? There is only one bit change between them so can I change that particular bit without having to go through each configure function???
I’am using a PIC18F4620 running at 40MHz and communicating with a PIC18F2520 running at 20Mhz.
First, you only need to reconfig when switching between TX and RX.
Second, I seem to remember Nate trying to do the last-bit config change some time ago. If I remember right, I don’t think he had any luck doing it, but you could always try it and tell us what you find.
I guess when trying to change that last bit it may try to clear all of the config bits, although on second thoughts it is only one bit of the config array, so if I make the config array global I can affect the last bit of the array from both receive and transmit functions.
i have had success and failure with the last bit problem
going from rx to tx is fine
going from tx to rx sometimes does not work well
in my experiance, i think it is good to load all config every time you want to recieve a packet. this has improved my packet rate at large diatances but i dont know why. on the other hand, switching to tx is by moving in one bit is not a problem