Keyboard Scanner; Theory Of Operation; Idle; Scan - Infineon AIROC CYBLE-343072-02 Manual

Hide thumbs Also See for AIROC CYBLE-343072-02:
Table of Contents

Advertisement

AIROC™ Bluetooth® LE module

Keyboard scanner

9
Keyboard scanner
The keyboard scanner is designed to autonomously sample keys and store them into buffer registers without the
need for the host microcontroller to intervene. The scanner has the following features:
• Ability to turn off its clock if no keys are pressed.
• Sequential scanning of up to 160 keys in an 8 × 20 matrix.
• Programmable number of columns from 1 to 20.
• Programmable number of rows from 1 to 8.
• 16-byte key code buffer (can be augmented by firmware).
• 128 kHz clock that allows scanning of full 160-key matrix in about 1.2 ms.
• N-key rollover with selective 2-key lockout if ghost is detected.
• Keys are buffered until host microcontroller has a chance to read it, or until overflow occurs.
• Hardware debouncing and noise/glitch filtering.
• Low-power consumption. Single-digit µA-level sleep current.
9.1

Theory of operation

The key scan block is controlled by a state machine with the following states: Idle, Scan, and Scan End.
9.1.1

Idle

The state machine begins in the idle state. In this state, all column outputs are driven high. If any key is pressed,
a transition occurs on one of the row inputs. This transition causes the 128 kHz clock to be enabled (if it is not
already enabled by another peripheral) and the state machine to enter the scan state. Also in this state, an 8-bit
row-hit register and an 8-bit key-index counter is reset to '0'.
9.1.2

Scan

In the scan state, a row counter counts from 0 up to a programmable number of rows minus 1. After the last row
is reached, the row counter is reset and the column counter is incremented. This cycle repeats until the row and
column counters are both at their respective terminal count values. At that point, the state machine moves into
the Scan-End state.
As the keys are being scanned, the key-index counter is incremented. This counter value is compared to the
modifier key codes stored in RAM, or in the key code buffer if the key is not a modifier key. It can be used by the
microprocessor as an index into a lookup table of usage codes.
Also, as the nth row is scanned, the row-hit register is ORed with the current 8-bit row input values if the current
column contains two or more row hits. During the scan of any column, if a key is detected at the current row, and
the row-hit register indicates that a hit was detected in that same row on a previous column, then a ghost
condition may have occurred, and a bit in the status register is set to indicate this.
9.1.3

Scan End

This state determines whether any keys were detected while in the scan state. If yes, the state machine returns
to the scan state. If no, the state machine returns to the idle state, and the 128 kHz clock request signal is made
inactive.
Note The microcontroller can poll the key status register.
9.2

Mouse quadrature signal decoder

The mouse signal decoder is designed to autonomously sample two quadrature signals commonly generated by
an optomechanical mouse. The decoder has the following features:
• Three pairs of inputs for X, Y, and Z (typical scroll wheel) axis signals. Each axis has two options:
Preliminary Datasheet
29 of 58
002-33419 Rev. **
2021-07-22

Advertisement

Table of Contents
loading

This manual is also suitable for:

Airoc cyble-333073-02Airoc cyble-333074-02

Table of Contents