Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Jan 8, 2024
1 parent 18a0a8d commit 98cb9f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.4.1] - 2023-09-23
- Update readme with advanced interrupts insigts
- Update readme with advanced interrupts insights
- kudos to ddowling for testing.
- add example
- fix URL examples
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# PCF8574

Arduino library for PCF8574 - 8 channel I2C IO expander
Arduino library for PCF8574 - 8 channel I2C IO expander.


## Description
Expand Down Expand Up @@ -53,8 +53,8 @@ or in the write mode at the acknowledge bit after the high-to-low transition of
So there are three scenarios how the INT is reset.

1. pins revert to original state (lesser known).
2. read from PCF8574 (well known)
3. write to PCF8574 (well known)
2. read from the device (well known)
3. write to the device (well known)

This implies that polling the PCF8574 can miss an INT in scenario 1. (see #48)
In practice if you have faster polling than your signals changes this would not
Expand Down Expand Up @@ -229,7 +229,8 @@ It is advised to use pull-up or pull-down resistors so the lines have a defined

#### Must

- keep in sync with PCF8575
- update documentation.
- keep in sync with PCF8575 (as far as meaningful)

#### Should

Expand All @@ -249,3 +250,4 @@ donate through PayPal or GitHub sponsors.

Thank you,


7 changes: 5 additions & 2 deletions examples/PCF8574_performance/PCF8574_performance.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PCF8574 PCF(0x38);

uint32_t start, stop;

volatile uint8_t x;


void setup()
{
Expand All @@ -27,12 +29,12 @@ void setup()
delay(100); // time to flush Serial


for (long clk = 100000; clk < 800000; clk += 100000)
for (long clk = 100000; clk < 800000; clk += 50000)
{
// setup and measure
Wire.setClock(clk);
start = micros();
int x = PCF.read8();
x = PCF.read8();
stop = micros();

// output results
Expand Down Expand Up @@ -62,3 +64,4 @@ void loop()


// -- END OF FILE --

0 comments on commit 98cb9f6

Please sign in to comment.