HWSUART module (hardware-assisted software UART)

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
Jerry Messina
Swordfish Developer
Posts: 1235
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

HWSUART module (hardware-assisted software UART)

Post by Jerry Messina » Sun Nov 04, 2018 4:07 pm

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.

Post Reply