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
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.
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).
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