My brain was fried, so I thought I would pass it on to the community.
When sending 1 character to my embedded system, he sequentially thinks that he is getting 2 characters. The first character received, it seems, is matched with the transmitted character (in some unknown way), and the second received character is always 0xff.
Here is what I noticed:
Tx char (in hex) Rx character (in hex), I left out the second byte (always ff) 31 9D 32 9B 33 99 61 3D 62 3B 63 39 64 37 65 35 41 7D 42 7B 43 79
I check my watch, and it seems to them that everything is in order. The only difference between this non-working version and the previous version is that I now use the RS485 chip.
I traced the signal to the MCU, and it looks fine (confirmed the value of the bits on the RX pin)
embedded serial-port rs485
Mike
source share