UART missmatching start bit

Hi,
I've been working with a software serial implementation for Attiny13A ir order to have a debugging tool, in fact it is Nerd Ralph asm routine exactly. Looking the datastream in an oscilloscope looks right, all the timing is precise and repeatable. The problem comes when I connect my serial-usb receiver and I look on the terminal (I tried arduino serial monitor, Putty, and Terminal.exe and all gives the same response).

My program sends ASCII character 48, but always on the PC I am receiving ASCII character 96.
It seems that the serial terminal is missmatching the first LOW bit (the start bit) as part of the 8 bit payload of the message.

I think the circuit and the software is allright, looking on the oscilloscope looks right, so there must be a problem with the adapter or the serial teminal
Any ideas of where this problem is coming from?
Thank you in advance
Lucas

Share those…

You say "17241 baud" but the scope shows about 58-1/3 microseconds per pulse which is closer to 17142.9 baud. That's way less than 10% off so it should be OK.

Are you sure your PC can do 17241 baud? Many are limited to a list of standard baud rates. The closest might be 14400. That is 19% off of the desired value and might cause misreads.

1 Like

Hi john, thanks for the repply
In terminal.exe you can set custom baudrates, this example was tested with 17100 baud.
I've tested it in arduino serial with 19200 baud, and in Putty I've set 17100 too to test.
The three terminals give the same response, I send ASCII 48, but I recive ASCII 96.

Try sending other characters to see if there is a pattern to the errors. Your assumption that the start bit is being counted as a data bit may be incorrect (and that would result is a framing error since the 'stop' bit would be LOW and not HIGH).

why aren't they both the same speed?

have you tried setting them (both) to a more conventional speed (e.g.19200)?

The Attiny13A is emitting at 17100 baud aproximately. What I was changing was the baudrate of the serial terminal. Arduino serial plotter does not have any custom baudrate setting, so I had to choose the closest to my need

I've tried 3 more examples, you were right John, it wasn't what I was thinking, I have no clue of what is going on here :woozy_face:

Example 1 - emitting 85 (01010101) - receiving 248(11111000) - baudrate 17100

Example 2 - emitting 170 (10101010) - receiving 247(11110111) - baudrate 17100

Example 3 - emitting 125 (01111101) - receiving 247(11111110) - baudrate 17100

Any ideas?
I think the Attiny13A side software is ok, the oscilloscope makes sense with the data I was emitting