2015-10-28 05:28 AM
Hello,
I have following problem with copying hex data.for
(i = 0; i < 6; i++) {
printf
(
''%02x''
, packet[i]);
// copy packet to FIFO
}
Printf copy data from packet[] to FIFO.
Everything is ok if copying data like these on first screenshot bellow (0xAA,0xBB,0xCC,0xDD).
But if copiyng different values (but with some data type - 0x01, 0x03, 0x00, 0x05) things going wrong. In the destination FIFO is 0x30, 0x30, 0x00, 0x00,... which is bad.
It is weird for me. Where can be a problem?
Thank you.
2015-10-28 06:16 AM
The protocol is not very robust to character loss, might want a space, or synchronization byte to that the digits don't slip.
If there is an issue over the wire, look at the bit timings, and intersymbol spacing (ie increase stop bits)2015-10-28 01:13 PM