Skip to main content
Renesas Electronics Corporation - June is Pride Month, a month to raise awareness of the rights and the culture of the LGBTQ+ community

Using an MCU or SoC to scan a keypad is a less-than-ideal solution for human input. It often makes sense to offload keypad scanning to a dedicated IC to reduce the power and I/O burden on larger, less efficient, and more expensive devices. Using a GreenPAK™ as a keypad scanner provides a flexible, reliable solution that won’t kill your power budget or your BOM cost. While GreenPAK with I2C can perform this function, using GreenPAK’s Asynchronous State Machine (ASM) unlocks the full potential and enables up to 54 key scanning.

GreenPAK Benefits for Keypad Scanning

 

GreenPAK Offers Lots of Flexibility

  • Integrated delays for programmable button debounce
  • ASM that can quickly and reliably scan up to 54 buttons in a 20-pin device
  • VDD that is 1.8 to 5.0 V
  • Flexible GPIO routing, ensuring the least complexity in printed circuit board (PCB) routing

GreenPAK Lowers Power Consumption

  • Being low powered allows it to operate continuously without ruining the power budget while the main microcontroller (MCU) or system on chip (SoC) is in standby

GreenPAK Enhances System Stability

  • Zero code while implementing features in hardware ensures stability
  • Integration of many components ensures fewer points of failure

 

Keypad Scanner, a Stately Design

How does it work?

1. Once powered, GreenPAK's ASM cycles through each state, sending out a logic HIGH to each row using the 8-bit ASM output in a 1-hot configuration.

2. When a key is pressed, the circuit is complete, and the HIGH signal is picked up by the corresponding column input. GreenPAK then generates an interrupt, stopping the ASM and notifying the MCU or SoC, which can be in sleep mode to save power.

3. From here, the MCU or SoC needs to simply send the I2C read commands to determine the active row and column and decode the key pressed from that information.

4. After completing the I2C read, the MCU or SoC can send a RESET signal to GreenPAK, which then releases the ASM to continue scanning.

Image
Keypad Scanner State Diagram

Keypad Scanner State Diagram

Image
48 Key Scanner GreenPAK Implementation

48 Key Scanner GreenPAK Implementation

GreenPAK can often implement multiple functions. Just one GreenPAK device can implement a keypad scanner in conjunction with other functions like glue logic, timing adjustment, reset, power sequencing, LED control, and more, depending on design requirements and resource configuration.

Below are just a few GreenPAK devices that can perform a keypad scan function.

GreenPAK Part NumberMax KeysProgrammable Debounce
SLG46533V/M16Yes
SLG46536V16Yes
SLG46537V/M54Yes
Type Title Date
Application Note PDF 499 KB
Build a 4×4 keypad encoder using an asynchronous state machine (ASM) in the SLG46537 GreenPAK IC. The design uses an 8‑state ASM macrocell to sequentially drive the keypad columns and read the row inputs, enabling reliable key‑press detection. The detected key code is then transmitted via I²C for communication with a microcontroller.
Other PDF 1.77 MB
Application Note PDF 735 KB
The SLG46620 GreenPAK programmable mixed-signal IC enables a secure door lock system with keypad entry by implementing a finite state machine for password verification and motor control. It manages multiple states for idle, open, close, and standby, ensuring reliable operation with minimal external components for compact and cost-effective access control.
Application Note PDF 522 KB
AI-generated Summary: The design demonstrates multiplexing control of a 4-digit 7-segment LED display and a 4x4 keypad scanner using a single GreenPAK SLG46538V IC, reducing MCU I/O pin usage from twenty to three. It utilizes asynchronous state machines, bidirectional I/O pins, and I2C communication for efficient data exchange. The LED digits are multiplexed rapidly, alternating with keypad scanning every ~9.7 ms. The IC generates interrupts on key presses and updates display data via I2C. The design includes transistor switching for digit control and uses internal RAM registers to store display data. Keypad scanning employs edge detectors and pull-up resistors for input detection.
4 items