Software UART with FIFO

danni's picture
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0



Following a software UART with buffered transmit and receive.
It can be used to get a second UART or for ATtiny without UART.

It uses a timer with clear on compare feature to determine the transmission baud rate.
Another compare interrupt of the same timer was used for the receive interrupt.
To catch the start bit, the input capture interrupt was used.
On AVRs without ICP, also an external interrupt can be used, but then on high baud rates the interrupt delay should be substract from the bit scan time.