Currently it sends the binary data down as character for each bit, thus [11111111] is actually 8 bytes of data when we could use one byte to represent it, in this case [ÿ]. From there I have added a start [H] and end [E] character and a count of characters (bytes) used for the data payload.
Thus we could have:
- [H2DDE] for two bytes of data.
- [H6DDDDDDE] for six bytes of data.
Thus the idle packet looks like [H3ÿ ÿE], where [ÿ] is equivalent to [11111111], and [ ] is equivalent to [00000000], also [ÿ ÿ] is our 3 bytes of characters.
Now that I have dcc-monitor sending what I require over the serial link, I can now focus on creating a C/C++ program to read the serial link and display in English and Hexadecimal what the dcc packets are.
No comments:
Post a Comment