Serial - bit banging
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Serial - bit banging
Hi,
is it possible to read the wakeup bit from the serial port as mentioned here to discover the first byte of a command?
Thanks a lot...
is it possible to read the wakeup bit from the serial port as mentioned here to discover the first byte of a command?
Thanks a lot...
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Serial - bit banging
According to the docs machine.UART can read 9-bit characters so I don't see why not.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Re: Serial - bit banging
I'm using the board ttgo mini32 and it seems, that is impossible to read the 9th bit.pythoncoder wrote: ↑Mon Mar 18, 2019 1:14 pmAccording to the docs machine.UART can read 9-bit characters so I don't see why not.
Is there another way to read serial in something like a RAW mode?
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Serial - bit banging
Don't quote me on this but I think ESP32 hardware serial only has 8 bit serial
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Serial - bit banging
There is no official soft UART implementation. The best option is probably to use hardware which does support it, such as any Pyboard. A soft UART could be written but would probably be restricted to low baud rates because of ESP32 latency issues.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Re: Serial - bit banging
OutoftheBOTS_ wrote: ↑Tue May 28, 2019 9:29 pmDon't quote me on this but I think ESP32 hardware serial only has 8 bit serial
What do you mean with "low baud rates"? I need only 19.2K for 2 UARTs, the third is only for upload and development.pythoncoder wrote: ↑Wed May 29, 2019 6:56 amThere is no official soft UART implementation. The best option is probably to use hardware which does support it, such as any Pyboard. A soft UART could be written but would probably be restricted to low baud rates because of ESP32 latency issues.
Can you suggest any board for my needs?
- 2 UARTs (9-bit)
- possibility to connect a SD-card for logging
- threading support to log 2 UARTs
- fast and a lot of memory would be nice
- as cheap as possible
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Serial - bit banging
A Pyboard (V1.1 or D series). Whether they meet your requirement for "as cheap as possible" is moot.
I would strongly recommend uasyncio rather than threading for reasons covered in the tutorial in this repo.
Writing a soft UART capable of handling two concurrent 19.2Kbaud streams would be a significant challenge and might not be practicable on ESP32. Unless you fancy the challenge and have plenty of time to devote to it, I'd go for the hardware solution
I would strongly recommend uasyncio rather than threading for reasons covered in the tutorial in this repo.
Writing a soft UART capable of handling two concurrent 19.2Kbaud streams would be a significant challenge and might not be practicable on ESP32. Unless you fancy the challenge and have plenty of time to devote to it, I'd go for the hardware solution
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Re: Serial - bit banging
I've allready seen the Pyboard D-series. It's nice but a lot of money. Is there a cheap alternative board too? I think the possibility to get the "9th bit" depends on the chip, not on the board? What is with this one?pythoncoder wrote: ↑Wed May 29, 2019 7:49 amA Pyboard (V1.1 or D series). Whether they meet your requirement for "as cheap as possible" is moot.
I would strongly recommend uasyncio rather than threading for reasons covered in the tutorial in this repo.
Writing a soft UART capable of handling two concurrent 19.2Kbaud streams would be a significant challenge and might not be practicable on ESP32. Unless you fancy the challenge and have plenty of time to devote to it, I'd go for the hardware solution
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Serial - bit banging
The STM32F407 MCUs have 5 UARTS (3 x USART and 2 X UART).
I prefer the STM32F407VGT6 with 1 mb of flash on the MCU and this board has another 16M-BIT of flash on a separate IC and is under $10US https://www.aliexpress.com/item/STM32F4 ... st=ae803_5
I am not sure if anyone has ported MP to this exact board but I know there is ports for STM32F407VET6 black which is the same but with only 512kb RAM on the MCU
From the reference manual the STM32F407 supports 9 bit serial by setting the M bit in the UART control register
I prefer the STM32F407VGT6 with 1 mb of flash on the MCU and this board has another 16M-BIT of flash on a separate IC and is under $10US https://www.aliexpress.com/item/STM32F4 ... st=ae803_5
I am not sure if anyone has ported MP to this exact board but I know there is ports for STM32F407VET6 black which is the same but with only 512kb RAM on the MCU
From the reference manual the STM32F407 supports 9 bit serial by setting the M bit in the UART control register
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Re: Serial - bit banging
Is it possible to use the same MicroPython version like for the STM32F407VET6 or does it need further development for this board?OutoftheBOTS_ wrote: ↑Wed May 29, 2019 11:01 pmThe STM32F407 MCUs have 5 UARTS (3 x USART and 2 X UART).
I prefer the STM32F407VGT6 with 1 mb of flash on the MCU and this board has another 16M-BIT of flash on a separate IC and is under $10US https://www.aliexpress.com/item/STM32F4 ... st=ae803_5
I am not sure if anyone has ported MP to this exact board but I know there is ports for STM32F407VET6 black which is the same but with only 512kb RAM on the MCU