AN-1179 Multiplexing a 4-Digit LED Drive and a 4x4 Keypad Scanner
This application note demonstrates a practical solution for four-digit 7-segment LED display control
and a 4x4 keypad scanner.
It will also demonstrate sending and receiving data via the I2C bus
using one GreenPAK™ IC.
To connect the four-digit LED display and a 4x4 keypad to a microcontroller (MCU), one typically
needs twenty I/O pins. However, using the
GreenPAK SLG46538V
IC allows us to save MCU hardware
resources by using only three I/O pins. The main components used in the design are the
asynchronous state machine (ASM), bidirectional I/O pins, the I2C serial communication block, and
the combination function macrocells.
Theory of Operation
The basic idea of this app note is to use the bidirectional pins of the SLG46538V IC. This makes it
possible to use the same ports simultaneously to connect to the cathodes of the digital LED display
and to the sixteen keys, arranged in four rows and four columns. The LED display control and the
keyboard scanning control occur at different times in multiplexing mode.
The
basic
scheme is
shown in Figure 1, and Figure 2 shows a timing diagram of the multiplexing mode.
Figure 1. External connections of the SLG46538V GreenPAK IC
© 2022 Renesas Electronics Corporation
Need help?
Do you have a question about the AN-1179 and is the answer not in the manual?
Questions and answers