Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Matrix Keypad Interface Using I2C

 
Post new topic   Reply to topic    Forum Index -> Files
Author Message
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

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

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:  4078 Time(s)


i2c_matrix_keypad.jpg
 Description:
Interface Schematic

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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> Files Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 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