Download Print this page
Renesas AN-1179 Instruction Manual
Renesas AN-1179 Instruction Manual

Renesas AN-1179 Instruction Manual

Multiplexing a 4-digit led drive and a 4x4 keypad scanner

Advertisement

Quick Links

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

Advertisement

loading
Need help?

Need help?

Do you have a question about the AN-1179 and is the answer not in the manual?

Questions and answers

Summary of Contents for Renesas AN-1179

  • Page 1 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™...
  • Page 2 A standard 7-segment LED display can show numbers from 0 to 9, some letters of the alphabet, and a decimal point. The display has a common anode for each digit. In order to light up any segment, a logic LOW level signal has to be transmitted to its cathode. © 2022 Renesas Electronics Corporation...
  • Page 3 ASM block, and are defined by the connection matrix output RAM. These eight outputs are connected to the following pins through the internal matrix: PIN13 (seg. a), PIN16 (seg. b), PIN18 (seg. c), PIN19 (seg. d), PIN3 (seg. e), PIN5 (seg. g) and PIN10 (seg. dp). © 2022 Renesas Electronics Corporation...
  • Page 4 These data are stored in the registers and displayed until they are overwritten via I2C again, or the IC is rebooted. In the latter case, these registers will resume the default value (‘0xFF’, stored in the NVM). © 2022 Renesas Electronics Corporation...
  • Page 5 In keypad scanning mode, the 4-bit LUT1 sets the output to a logic LOW level, which switches the PIN3, PIN5, PIN7, and PIN10 pins into digital input mode. These PINs are configured with10 kΩ pull-up resistors. © 2022 Renesas Electronics Corporation...
  • Page 6 The total time for the display scanning modes is approximately 9.7 ms, but if necessary this can be increased or decreased. To do this, the 'CLK’ predivider value and ‘OUT0’ second divider value in the OSC0 macrocell must be changed via I2C: © 2022 Renesas Electronics Corporation...
  • Page 7 This solution can be used to develop devices such as an electronic code door lock, signaling devices, simple programmable power supplies, or clocks and timers. In addition, this device can be realized as a “shield” board for Arduino or other platforms. © 2022 Renesas Electronics Corporation...
  • Page 8 Renesas' products are provided only subject to Renesas' Terms and Conditions of Sale or other applicable terms agreed to in writing. No use of any Renesas resources expands or otherwise alters any applicable warranties or warranty disclaimers for these products.