Forum Index
Matrix Keypad Interface Using I2C

 
Author Message
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 07 June 2007, 0:16 AM    Post subject: Matrix Keypad Interface Using I2C

I've created an example of how to connect a matrix keypad to a ZX using a PCF8574A I/O expander on the I2C bus. If you have other I2C devices already attached, the keypad can be added without using any additional I/O lines.

The circuit schematic for the connection and example source code are attached. The code implements auto-repeat but does not handle "multi-key rollover". It implements a polling technique but you could use the interrupt output of the PCF8574A to implement an interrupt-based interface. I haven't thought through how you would implement auto-repeat in this case but it could probably be done using WaitForInterval() to implement the check for the key-still-down condition.



i2c_matrix_keypad.zip
 Description:
Keypad Interface Source Code

Download
 Filename:  i2c_matrix_keypad.zip
 Filesize:  2.9 KB
 Downloaded:  950 Time(s)


i2c_matrix_keypad.jpg
 Description:
Interface Schematic

Download
 Filename:  i2c_matrix_keypad.jpg
 Filesize:  39 KB
 Downloaded:  1004 Time(s)

Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group