68HC11 Sample Code - Detecting Logic Edges, basic input-capture facilities

Simple input-capture program to detect falling-edges on a pin, and to count them via an input-capture interrupt. Change one line to capture rising edges, or to capture both edges!

Uses on-chip SCI for commands/responses.
Uses PORT A pin 0 (input-capture #3) to detect falling edges.
Uses PORT B pin 2 to generate pin-transitions under program control. A loopback wire from 68HC11 PB2 to PA0 is thus required.

Runtime commands:

Source Code:

Mike Spooner, 24th April 2017