Skip to content

Commit

Permalink
Sync I2CKeyPad 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Jul 15, 2024
1 parent 75fcf18 commit 77fc99f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,38 @@ It might take some trying to get the correct pins connected.
```


## I2C

### I2C addresses

This library uses a PCF8575 chip.

| Type | Address-range | Notes |
|:-----------|:---------------:|:-------------------------:|
| PCF8575 | 0x20 to 0x27 | same range as PCF8574 ! |

Be careful to select an unique I2C address for every device on the bus.


### I2C multiplexing

Sometimes you need to control more devices than possible with the default
address range the device provides.
This is possible with an I2C multiplexer e.g. TCA9548 which creates up
to eight channels (think of it as I2C subnets) which can use the complete
address range of the device.

Drawback of using a multiplexer is that it takes more administration in
your code e.g. which device is on which channel.
This will slow down the access, which must be taken into account when
deciding which devices are on which channel.
Also note that switching between channels will slow down other devices
too if they are behind the multiplexer.

- https://github.com/RobTillaart/TCA9548



## Interface

```cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/I2Ckeypad8x8_demo01/I2Ckeypad8x8_demo01.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "Wire.h"
#include "I2CKeyPad8x8.h"

const uint8_t KEYPAD_ADDRESS = 0x38;
const uint8_t KEYPAD_ADDRESS = 0x20;

I2CKeyPad8x8 keyPad(KEYPAD_ADDRESS);

Expand Down

0 comments on commit 77fc99f

Please sign in to comment.