Page 1 of 1

HWSUART module (hardware-assisted software UART)

Posted: Sun Nov 04, 2018 4:07 pm
by Jerry Messina
The HWSUART uses hardware functions to assist in creating a 'software' bit-banged UART.
There are a few implementations provided, each of which uses different device features.

I've had this code floating around for a while, so I figured I'd clean it up and post it on the User Module wiki HWSUART

The simple one only requires TMR0 and the T0CKI pin, so it should work with most devices.
The others are written around an 18FxxK22 so they might require changes for other chips.

They all provide an input buffer that allows you to receive data asynchronously, making the UART much more usable in most applications.