Now I am testing two xbee communication quality.
So I transmit 6bytes followed by a 1ms rest at 115200 baud from PIC16F877 to TX xbee. And rx data quality is bad. sometime it is fine. And it is always shifting in the middle of rx data not at the beginning. Moreover it shits twice or five times. One byte one time. So i am in despair.
Now I process and judge rx data quality according tx data value. But in final experiment, tx data value is not fixed and always changing. What should I do?
Can you help me to find a way to solve the shifting in the middle of rx data?
About probable way, I think that a clear frame header is really needed and necessary.
But I don’t know what the best frame header.And what should I do?
someone suggested me to add a parity. And XOR calculation to every bytes sent in PIC code. What do you think of it?
Test result
first 115200 is available.
second the result of Test :
PIC output rest 20ms.
5000BYTE , so error rate=0;
17220byte, so error rate=0;
PIC output rest 10ms.
10140bytes, so error rate=0;
11832bytes, er=0;
PIC output rest 5ms.
12000bytes, move forward.
PIC output rest 1ms.
16200bytes, er=0;
32400bytes,er=0;
then it shifts in the middle of received data.(in attachment);
51000bytes, er=0 after I shift whole rx data.
54000bytes, er=0
104940bytes, er=0 after cut the first part and ending according to tx standard data.
160000bytes, shifting happen in the middle of tx data.