BigEd wrote:
Would an @ and a space, as a pair, perhaps twice, always be enough to force sync? Or space and backspace, which might be better yet? Things with a single 1, in this case $08, $20, $40.
The simplest sequence that always syncs up is a single NUL character, which will cause a framing error in a mis-synced receiver, which will then sync up to the stop bit. Another possibility is an 0xFF byte, which will not cause a framing error, but the latter part of the byte and the real stop bit will be seen as line idle, so the receiver will sync to the following start bit.
If we restrict the possibilities to printing characters, @ then space is a good choice. This would produce the sequence:
Code:
_ _ _ _ _ _ _ ^ _ ^ _ _ _ _ _ _ ^ _ _ ^
…which, if we assume it sees the middle of the @ as a frame error, causes a mis-synced receiver to sync either with the correct stop bit of the @ or the set data bit of the @. In the latter case it will see a framing error on the space, and sync with the correct stop bit of the space. All subsequent characters are then guaranteed to be in sync, so the sequence does not need to be repeated.
Yet another possibility is to transmit using 2 stop bits (8N2) but continue to receive using 8N1 - if it's initially out of sync, that means it'll move towards sync by at least one bit position per byte. On the 6850 this would be word-format selector 100 rather than 101. This would also cause the 6850 to expect 2 stop bits on data sent by the PC, but the datasheet suggests that the 6850 checks only for the
first stop bit.