2020-07-06 11:25 PM
2020-07-07 12:42 AM
Why? What is the counterpart? What baudrate, at which system clock? Simplex/duplex? Any other requirements?
The general approach is timer-based bitbanging, potentially employing DMA. See AN4457.
JW
2020-07-07 12:55 AM
JW Thanks.
we are communicating different slave devices for that we need 10bit configuration.
other side device has supports the 10 bit.
Requirements:
word length : 10 bit
Stop bits : 1 & 2 stop
polarity : TX & RX vice versa.
2020-07-07 01:38 AM
W Thanks.
we are communicating different slave devices for that we need 10bit configuration.
other side device has supports the 10 bit.
Requirements:
word length : 10 bit
Stop bits : 1 & 2 stop
polarity : TX & RX vice versa.
2020-07-07 02:50 AM
A dumb guess, but still... Maybe it means "word length" of 10 bits including the start and stop bits?
2020-07-07 03:01 AM
[start]-1 [DataBits]-10bit [StopBits]-1bit/2bits
2020-07-08 01:43 PM
Solve Tx and Rx separately, using two timers. Start with Tx, that's easier. Start at low baudrate, timer generating interrupts at the barrister rate, and in timer interrupt, toggle a pin as appropriate, shifting out the transmitted value plus the framing bits.
Rx is somewhat more complex - you have to start the timer at the startbit's falling edge, detect that either as external interrupt, or, better but constrained in pins choice, use timer input capture (there a bonus that there is an adjustable filter on it). Then again in the timer interrupt, read the Rx pin and shift in the value.
Should you need higher narrated than the interiors allow, you would need to employ DMA.
JW