One Button demo

The requirement is a simple way to enter a string of digits to configure a PIC project.

Press the button, pause to move onto the next digit. Use a long press for zero, and very long press to reset.


Button and Output: comments and data
Entered Digits:

One Button

EVENT:


Pressed Timer Released Timer Inactivity Timer

Pointer:

Timers:

Counters:


One Button demo - Theory

This page is a demo of a simple one button interface. The user presses the button and releases it. Time is used to qualify the presses and releases. A short press increments the current digit, if there has been a long release between, then move onto the next digit.

This is fine expect that entry of zero and reset is difficult. Add a timer that is run while the buttor is pressed and blinks.

A short press increments the current digit, if there has been a long release between, then move onto the next digit.

A short release means keep on the same digit,

A long press means enter 0

A very long press means reset

A very long release also resets due to inactivity.

Updated by Doug Rice, 25th October 2005