2020-12-31, 09:33 AM
This is my first post on the forum.
I have search (not extensively) and I have not found my idea reflected in any post if this forum nor in the entire web as far as I have seen.
I am making a SeaTalk1 monitor ,as previous task for a remote control for my ST1000 autopilot.
Taking account of the glorious work of Thomas Knauf and others and discovering that the 9th bit was just a way of complicating things, but without any utility for monitoring purposes, (hence I can discard It without any consequences in my case), I found that I could read easily SeaTalk without charging any 9th bit library into my sketch.
Simply converting the "command" bit into a stop bit. So reading in 8N2 mode.
The bits are transmited in LSB orders in the byte structure, in this way the "command" bit is just before the stop bit.
So reading in 8N2 mode the "command" bit is "read" as stop bit instead of a data bit.
I know that a stop bit has to be high, but It seems that the routine doesnt care about the state, once It has accounted for 8 bits, so no matter if this second stop bit is high or low.
I have tested this idea in 328P (NANO and MINI PRO) and in PRO MICRO 32u4.
Run perfect.
I tried in Seeeduino XIAO but failed.
My poor knowledge of microcontrollers is not enough to discover the reason.
I encourage you all to test in your own micros and report.
I think this is an easy way to read only SeaTalk1.
I can give more details if anybody interested.
I have search (not extensively) and I have not found my idea reflected in any post if this forum nor in the entire web as far as I have seen.
I am making a SeaTalk1 monitor ,as previous task for a remote control for my ST1000 autopilot.
Taking account of the glorious work of Thomas Knauf and others and discovering that the 9th bit was just a way of complicating things, but without any utility for monitoring purposes, (hence I can discard It without any consequences in my case), I found that I could read easily SeaTalk without charging any 9th bit library into my sketch.
Simply converting the "command" bit into a stop bit. So reading in 8N2 mode.
The bits are transmited in LSB orders in the byte structure, in this way the "command" bit is just before the stop bit.
So reading in 8N2 mode the "command" bit is "read" as stop bit instead of a data bit.
I know that a stop bit has to be high, but It seems that the routine doesnt care about the state, once It has accounted for 8 bits, so no matter if this second stop bit is high or low.
I have tested this idea in 328P (NANO and MINI PRO) and in PRO MICRO 32u4.
Run perfect.
I tried in Seeeduino XIAO but failed.
My poor knowledge of microcontrollers is not enough to discover the reason.
I encourage you all to test in your own micros and report.
I think this is an easy way to read only SeaTalk1.
I can give more details if anybody interested.