8-bit Microcontroller Multiplexing Led Drive & A 4x4 Keypad.

 • 16 Key Pushbutton Pad in 4 x 4 Matrix
• Four Digit Multiplexed LED Display with Flashing Colon
• Industrial Real Time Clock Timer
• Controls ON/OFF Times for Two Loads
• Tactile Feedback via Piezo Sounder
• Flashing Display to Indicate Power-down Event
• Dual Function I/O Pins
• Minimum External Components
• Efficient Code
• Complete Program Included for AT90S1200 BR>• Suitable for any AVR MCU with 20 Pins or More
Introduction
This application note describes a comprehensive system providinga4x4keypadas
input into a Real Time Clock Timer with two outputs. This system control external
loads, and a four digit mulitplexed LED Display The application is designed to show
the versatility of the AVR port configuration, and the efficiency of the rich instruction
set. The application will run on any AVR with 20 pins or more, although due consider-
ation will have to be given to stack initialization and table placement. The program has
been structured within the confines of the three level deep hardware stack at the
AT90S1200 and could be better structured in the other AVRs with software stack.
Theory of Operation
The connection of a 4 x 4 keypad, a piezo sounder, two LED loads and a four digit
multiplexed Display would normally require 23 I/O lines. This application shows how
this CAN be reduced to 15 with a bit of ingenuity, allowing the smaller 20-pin AVR to be
used. The circuit diagram is shown in Figure 1 and is complete apart from the Oscilla-
tor components, which have been omitted for clarity.
The four keypad columns are connected to the low nibble of port B and the four key-
pad rows are connected to the high nibble. The same eight bits also directly drive the
segment cathodes of the four digit LED Display via current limit resistors R13-20. The
pins thus serve a dual function, acting as outputs when driving the LED Display and
I/O when scanning the keypad. This is accomplished by using the programmable
nature and large current drive capabilities of the AVR ports to good effect.
application notes                    New application notes
Download application notes and circuits


8-bit Microcontroller Multiplexing Led Drive & A 4x4 Keypad. application circuits
8-bit Microcontroller Multiplexing Led Drive & A 4x4 Keypad. application circuits



Related Electronics Part Number
Hot categories