Software or Hardware 9 Bit

ecevitbatu
Posts: 5
Joined: Fri Apr 15, 2022 7:18 am

Software or Hardware 9 Bit

Postby ecevitbatu » Fri Apr 15, 2022 10:25 am

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.

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: Software or Hardware 9 Bit

Postby ESP_Sprite » Sat Apr 16, 2022 1:04 am

9 bits of what, from where?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Software or Hardware 9 Bit

Postby WiFive » Sun Apr 17, 2022 2:01 am

Uart you can use rmt or ulp

ecevitbatu
Posts: 5
Joined: Fri Apr 15, 2022 7:18 am

Re: Software or Hardware 9 Bit

Postby ecevitbatu » Tue Apr 19, 2022 4:59 am

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?

ecevitbatu
Posts: 5
Joined: Fri Apr 15, 2022 7:18 am

Re: Software or Hardware 9 Bit

Postby ecevitbatu » Tue Apr 19, 2022 5:04 am

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.

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: Software or Hardware 9 Bit

Postby ESP_Sprite » Tue Apr 19, 2022 6:39 am

9 bits of smoke signals?

ecevitbatu
Posts: 5
Joined: Fri Apr 15, 2022 7:18 am

Re: Software or Hardware 9 Bit

Postby ecevitbatu » Tue Apr 19, 2022 6:56 am

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

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: Software or Hardware 9 Bit

Postby ESP_Sprite » Wed Apr 20, 2022 12:56 am

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.

A001FF
Posts: 12
Joined: Sat Apr 02, 2022 3:41 pm

Re: Software or Hardware 9 Bit

Postby A001FF » Wed Apr 20, 2022 1:51 pm

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)

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: Software or Hardware 9 Bit

Postby ESP_Sprite » Thu Apr 21, 2022 1:03 am

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.

Who is online

Users browsing this forum: No registered users and 75 guests