Hi all,
I've been working on transmitting and receiving bytes between 2 microcontrollers and for the next step I'm going to connect my RF modules.
but first I'm having a lot of trouble with the syncronization pulses that I'm sending before the actual data.What I'm doing is that I'm transmitting the the byte through RB0 of the PIC16F877A, and right shifting so that all of the byte will be sent, with a 250 us bit duration (or 2 KHz clock frequency) as I'm connecting my RF module's transmit pin to RB0.
On the RX side, the receive pin of the RF module is connected to RB0 of the RX microcontroller, and accordingly the bits are leftshifted and finally inverted to obtain the original byte's value.
Now I applied it on a simulator and the code works pretty fine, however, when I apply it on the real thing, the output aka RX byte is a whole different thing!!!!
I think the problem is in the syncronization between Tx and Rx. I'm gonna post both of the programs, and I appreciate all the help I can get.
thx in advance.
regards
I've been working on transmitting and receiving bytes between 2 microcontrollers and for the next step I'm going to connect my RF modules.
but first I'm having a lot of trouble with the syncronization pulses that I'm sending before the actual data.What I'm doing is that I'm transmitting the the byte through RB0 of the PIC16F877A, and right shifting so that all of the byte will be sent, with a 250 us bit duration (or 2 KHz clock frequency) as I'm connecting my RF module's transmit pin to RB0.
On the RX side, the receive pin of the RF module is connected to RB0 of the RX microcontroller, and accordingly the bits are leftshifted and finally inverted to obtain the original byte's value.
Now I applied it on a simulator and the code works pretty fine, however, when I apply it on the real thing, the output aka RX byte is a whole different thing!!!!
I think the problem is in the syncronization between Tx and Rx. I'm gonna post both of the programs, and I appreciate all the help I can get.
thx in advance.
regards