+ 1
How to implement an 7+1 bit UART for embedded systems? Will this work?
12 Respostas
+ 2
https://www.8051projects.net/t63403/8051-discussion-forum/uartrs232-implementation-7e1.htm
+ 1
The parity bit should be the high bit, not the low bit. It should equivalent to:
byte |= 1<<7;
But the UART chip should handle that for you. Are you making a software UART?
+ 1
Now I am a bit puzzled. Are you sure it is 7n1?
7n1 = 7 bits, no parity, 1 stop bit.
Your parity bit should be 0.
+ 1
Okay, 7e1. So set the parity bit to 1 when needed to make an even number of 1 bits.
Can you set the terminal to 7e2? That could help it accommodate for the extra bit from 8n1.
+ 1
Not possible to modify the terminal. But 7e1 and 8n1 has the same number of bits. Excuse me if I'm a bit confused, hehe.
+ 1
You may be right. In the history of UARTs, there has been confusing inconsistency like this. Setting 2 stop bits is an old trick to correct some of these mismatches with 7-bit protocol.
So, does it help to put the parity in bit7 where it belongs?
+ 1
I think it will work but now I can't check it. Thanks a lot for your time.
0
I'm working with a 8051 microcontroller. Differents modes of UART that can be configured are 8n1 and 9n1 but I have to implement a 7E1 UART by software to comunicate with a dumb terminal.
0
Was a mistake, I edit It. I mean 7E1
0
It's a pleasure to help. Let us know how it goes.
0
0
Please see my comments on the code. I think there is a minor bug, and I gave a suggestion to reduce the processing.