Last chance to enter The Hackaday Prize.

Keypad input scanning by a 555 timer

[R-B] designed a 555 timer circuit to scan a keypad. Keypads are common interfaces for small projects and require row and column scanning by a microcontroller. [R-B's] setup allows you to reduce the number of pins used on the microcontroller to just two. One is an interrupt that is triggered when any of the buttons are pushed, the other reads the frequency from the 555 chip. Each button has its own resistance which alters the frequency of the 555. The microcontroller reads the frequency for 100ms using a timer. The number of timer overflows that occur during that period directly correspond to the button press (five overflows for the numeral 5, zero overflows for the numeral zero).

We usually debounce our button presses for 40 ms, this is more than twice that amount of time but still not a staggering difference. It does make us wonder if you will miss quick button presses? The only really way to know is to try this out yourself. Check out the video after the break and don’t forget to leave a comment with your own experiences in working with the circuit.

[Read more...]

Tool Tip: microcontroller timer calculator

uC_timer_calculator

In life and embedded systems timing is everything. Give [Frank's] web-based timer calculator a try. Set your system clock resolution (in hertz making sure you account for any system clock divider), select your timer resolution and prescaler, then calculate based on desired ticks, overflows, or real time. He’s built this with the AVR chips in mind but it should be handy for any family of microcontrollers.

Of course none of this is rocket science, but if you’re trying to use one timer for two differently synchronized events this can save you a lot of trial and error time.

Follow

Get every new post delivered to your Inbox.

Join 91,108 other followers