Thu Aug 16 18:06:34 EDT 2018

Bitbang UART vs. hardware

How much more complicated is a CPU implementing a UART as a program,
compared to a hardware state machine?

- wait start
- delay 1/2
- n times
   - delay 1
   - sample
- delay 1
- check stop
- delay 1/2

Another question: since bit size will be known, why not a flat state

Here's an idea.  What is easy to do?
- flat state machines
- flat + shared counter in each stage
   or generalized: any shared abstract state machine

It seems that the important idea is to be able to share resources in
the several sub states.  If that is possible, or even natural (a
counter for instance), a state machine will be ok.

OTOH if there are states where resource sharing is not obvious, a
sequential program will be more appropriate.