Square wave generator and frequency meter

...at least we got some basic interrupt protocol fixed...