Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Mirmit
#66124 Hi there,

I have a project where I'm looking at receiving motor commands in an hoverboard. The hoverboard main board send commands to motor control board using UART communication using a strange configuration - at least not usual. It uses a speed of 23600 bauds and send data on a 9 bits, 1 start and 1 stop.

I ideally would need 2 port to receive information for the two motors.

Do you think these can be achieved on ESP8266?

I haven't see such configuration in ESP8266 datasheet for the hardware UART.

Thanks
User avatar
By btidey
#66129 I don't think you are going to achieve that using the UART hardware. You might be able to get the baud rate close but the registers only allow for 5,6,7,8 bit data.

You may be able to do it by software simulation of the UARTS using regular GPIO pins.

TX could probably be done using an interrupt driven bit bang. Rx could use interrupts driven by GPIO pin changes.

The ISRs need to be fairly efficient at these baud rates.

The TX can be helped by generating the set of delays needed outside of the ISR along the lines I use for Infra red remote controller driving. See BitTX library in https://github.com/roberttidey/IRBlasterWeb

SImilarly RX can lower ISR load by saving just delay times in the ISR and decoding in the foreground.