We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: dany
Last Updated: 2016-02-18
Package Version: 1.0.0.0
Category: Other Codes
Downloaded: 4123 times
Followed by: 1 user
License: MIT license
Library for a 4x4 keypad connected to the PIC via an PCF8574 I2c expander (Two I2c lines in stead of 8 I/O pins). This saves a lot of PIC I/O pins.
Permits also small PIC's (with low pin count) to control a keypad.
Do you want to subscribe in order to receive notifications regarding "Keypad_I2c" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Keypad_I2c" changes.
Do you want to report abuse regarding "Keypad_I2c".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1422297099_keypad_i2c_mikropascal_pic.mpkg [92.05KB] | mikroPascal PRO for PIC |
|
1422297111_keypad_i2c_other_pic.zip [111.74KB] | Other PIC Compilers |
|
1422297127_keypad_i2c_mikropascal_pic24.mpkg [74.56KB] | mikroPascal PRO for dsPIC30/33 & PIC24 |
|
1422297141_keypad_i2c_mikrobasic_pic.mpkg [92.33KB] | mikroBasic PRO for PIC |
|
1422297156_keypad_i2c_mikrobasic_pic24.mpkg [92.33KB] | mikroBasic PRO for dsPIC30/33 & PIC24 |
|
1422297173_keypad_i2c_other_pic24.zip [104.11KB] | Other PIC24 Compilers |
|
"Keypad_I2c" is a library to connect an 4x4 keypad via I2c to the PIC, using a PCF8574 expander. It uses the PCF8574 library.
In contradiction with the 4x4 keypad library from mE (connection via 8 I/O pins to the PIC), this version does not require pull down resistors (the internal ones of the PCF8574 are used in stead).
The functionality is the same as that of the mE (parallel connections) library, plus one addition: the function Keypad_I2c_PCF8574_Key_Status. It returns 16 bits (one word) with the status of all keys in the keypad: Key1 = bit 0; Key2 = bit 1;...; Key16 = bit 15. A bit with the value "1" is pressed, "0" is not pressed.
Have fun!
----------------------------------------------------------------------------------------------------------------------------------------------
2013-03-18: original version.
Connection Diagram for a 4x4 keypad. If there are less keypad columns or rows, then the free PCF8574 line(s) should be left unconnected.
View full image-----------------------------------------------------------------------------------------------------------------------------------------------
2013-03-19: added the function Keypad_I2c_PCF8574_Key_Status.
It returns 16 bits (one word) with the status of all keys in the keypad:
Key1 = bit 0; Key2 = bit 1;...; Key16 = bit 15.
A bit with the value "1" is pressed, "0" is not pressed
-----------------------------------------------------------------------------------------------------------------------------------------------
2013-03-21: removed an omission in the example for the Keypad_I2c library: the call to "Soft_I2c_Init" was forgotten (still, it worked!).
---------------------------------------------------------------------------------------------------------------------------------------------
2013-03-25: Replaced the mikroBasic package files. The target compiler in them was still mikroPascal. Sorry for the inconvenience.
----------------------------------------------------------------------------------------------------------------------------------------
2014-03-13: The mikroBasic files and zip files have been updated. All mB sources are present now (not tested if compilable though).
2015-01-26: Replaced the mB files: all mB files are compilable now (which e.g. means that all "with" statements are dealt with). I could however not link and test the libraries (no mB licence).