Home

Awesome

AVR-UART-lib

An interrupt-driven USART (RS232) library for AVR microcontrollers, with support for multiple hardware UARTs, using ring buffers for receive/transmit. Designed especially for real-time or high throughput applications, with narrow resource limits.

Features

Notes

Flow control

This library provides a software implementation of CTS/RTS control lines (DTR/DSR respectively) to signal whether buffer is full (not an 80' style handshaking). It should be used, in order to achieve stable bidirectional >100kbps transmissions, especially when using non deterministic usb-serial converters (ft232, ch340 etc). The legendary "noise" that causes losing blocks of characters (not damaging) can also be fixed by that.

Config

ISR timmings (cycles)

ISR caseattiny2313atmega8atmega328atmega2560lgt8f88A
TX best3740404230
TX worst3841444635
RX best3636373927
RX worst4042434532
RX rts full4141444632
RX rts normal4042434532
BUFFER_SIZE = 256x-1-1-1-1
G_SREG_SAVE-4-4-4-4-2
G_Z_SAVE-6-6-6-6-2