Page 1 of 1

Software or Hardware 9 Bit

Posted: Fri Apr 15, 2022 10:25 am
by ecevitbatu
Hello, I am trying to read 9 bits with esp32 software or hardware, can you show me a way around this? You can share your samples with me.

Thanks.

Re: Software or Hardware 9 Bit

Posted: Sat Apr 16, 2022 1:04 am
by ESP_Sprite
9 bits of what, from where?

Re: Software or Hardware 9 Bit

Posted: Sun Apr 17, 2022 2:01 am
by WiFive
Uart you can use rmt or ulp

Re: Software or Hardware 9 Bit

Posted: Tue Apr 19, 2022 4:59 am
by ecevitbatu
WiFive wrote:
Sun Apr 17, 2022 2:01 am
Uart you can use rmt or ulp
9 bits receiver with RMT or UPL and an example?

Re: Software or Hardware 9 Bit

Posted: Tue Apr 19, 2022 5:04 am
by ecevitbatu
ESP_Sprite wrote:
Sat Apr 16, 2022 1:04 am
9 bits of what, from where?
I use two processor. One of them is ESP and the other is a different processor uart and these are connected to each other. The other processor is giving 9 bits of data.

Re: Software or Hardware 9 Bit

Posted: Tue Apr 19, 2022 6:39 am
by ESP_Sprite
9 bits of smoke signals?

Re: Software or Hardware 9 Bit

Posted: Tue Apr 19, 2022 6:56 am
by ecevitbatu
ESP_Sprite wrote:
Tue Apr 19, 2022 6:39 am
9 bits of smoke signals?
Incoming data is in the form of 9N1

Re: Software or Hardware 9 Bit

Posted: Wed Apr 20, 2022 12:56 am
by ESP_Sprite
Okay, so it's UART then?

In that case, refer to WiFives statement. The UART is incapable of receiving 9-bit data, so you'd have to use some other peripheral.

Re: Software or Hardware 9 Bit

Posted: Wed Apr 20, 2022 1:51 pm
by A001FF
I think it is possible to receive or send 9 bytes using the parity bit.
SERIAL_8E1
But is it possible to set the parity bit manually on ESP UART ?
(parity = Mark / Space)

Re: Software or Hardware 9 Bit

Posted: Thu Apr 21, 2022 1:03 am
by ESP_Sprite
Well, you'd have to change the parity mode for each byte sent/received... which is fairly inefficient, as the UART normally uses a FIFO, but you'd have to bypass that (change parity, send 1 byte, wait until the fifo is empty etc) on Tx. Not sure how Rx would work.