Using the MAX7359 for Multifunctional and Gaming Keys on PDAs/Smartphones: A Programming Guide

Category: Telephone, cellular phone and intercom
Manufacture: Maxim Integrated Products
Datasheet: Download this application note

Keywords: PDA, multi-functional, gaming key, gaming control, key switch controller, add-on, smart phone, keypad control, auto-increment, key release detection, GPO
Using the MAX7359 for Multifunctional and Gaming Keys on PDAs/ Smartphones: A Programming Guide
Abstract: The keypad control properties of cell phone chipsets are often stretched to their limits when an operating system or application needs to detect multiple keypresses (e.g. Ctrl-Alt-Del and gaming controls). The MAX7359 is an ideal add-on key-switch controller for implementing multifunctional and gaming keys on a PDA/smartphone QWERTY keypad. The MAX7359 can be connected to the cell phone chipset through an IC interface, and simple program coding can be used to select a set of desired features.
Overview of the MAX7359
The MAX7359 is a low-power-consumption, special-purpose key-switch controller suitable for cell phones, printers, and other portable applications. Up to 64 keys can be implemented with this device. Separate keypress and release codes are assigned for every key. Multiple keys can be pressed simultaneously and/or held and released in different orders. Up to 16 keypress and release entries can be held in a FIFO register. Key-activity information collected by the MAX7359 is read through a simple IC interface at one keypress or release entry per byte. To enhance the device's noise immunity, the detection of a keypress can be debounced. In other words, each pressed key is scanned twice within a very short time interval before it is detected. To reduce power consumption, the MAX7359 consumes only 1.2A in sleep mode while waiting for key activities. Upon a keypress, the controller wakes up in less than 200s to collect the keypress/release information. After a specified key-activity idle time of between 0.256s and 8s, the device re-enters sleep mode. Note that key FIFO information can be accessed even in sleep mode. To relieve the host from permanent attention, an interrupt signal can be generated once a key is pressed or when the FIFO has reached a predefined amount of entries. The interrupt signal can be cleared by reading the device through the IC interface or when the FIFO is emptied. The MAX7359 is an enhanced version of the MAX7349 with a 1.8V to 3.3V supply-voltage range. Figure 1 shows the typical connection of the MAX7359 to a host through the IC interface. Because of the open-drain ports on the IC interface, the MAX7359 is capable of interfacing to a host with a different supply voltage.
Figure 1. Connecting the MAX7359 through an IC interface.
Programming the MAX7359
Key-activity information is contained in the FIFO, and the desired operational features are defined by other registers inside the controller. The register address of the FIFO is 0x00. The configuration register's address is 0x01, while the rest of the operational features are defined by registers with addresses from 0x02 through 0x06. The contents of a MAX7359 register can be specified using an IC write command and verified using an IC read command. An IC write command starts with the device address of the controller, which can correspond to 0x70, 0x74, 0x78, or 0x7C depending on the specific connection of the AD0 pin, followed by the register address. Following the register addresses, there may be some data bytes. If there is only one data byte present, it will be stored in the register as specified by the preceding byte. When there is more than just one data byte, the first byte is stored in the register as specified, and the next byte is stored in the register whose address is one number higher, and so on. This operation is based on the controller's register address autoincrement feature. In other words, a write command with 0x70, 0x01, 0x0A, and 0x00 will store the 0x0A byte in register 0x01 and the byte 0x00 in register 0x02. The register address autoincrement feature applies to all writable registers for both write and read commands, with the exception of the FIFO address 0x00. An IC write command with no data bytes following the register address is normally used to set the register address for the next read command. An IC read command starts with the device address of the MAX7359, and is followed by one or more data bytes. When there is only one data byte, data is retrieved from the register specified by the preceding write command with no data byte. Otherwise, it is retrieved from the last register accessed by a write or read command. When there is more than one data byte, the first byte is retrieved from the register as specified, and the register address autoincrement mechanism applies to the rest of the data bytes, except for the FIFO register. In other words, repeated reading of FIFO register 0x00 does not require address resetting. During power-on reset, the MAX7359 is readied for operation with key-release detection, keypress wake-up, and autoshutdown features enabled (default settings). Additionally, there are only two columns active for key-switch control and a total of 16 available keys. The rest of the six columns/GPO (general-purpose output) ports are in GPO

0-C     D-L     M-R     S-Z