I am using Arduino Pro micro and PCF8575 I2C expander module (similar like this). However I am wondering why PCF8575 input pull-up doesn't work. If I don't connect any IO-pins of PCF8575 module, shouldn't below code print 1111111111111111 because of input pull-up? However it prints 0000000000000000. The library I use is this.
Posting a schematic would help. Also what value of pull ups are you using on the I2C bus. Run the scanner just to make us happy:-) It should read the same every time.
Pull up resistors on the PCF8575 pcb are 10kohm (between VCC - SCL and VCC - SDA). I2CScanner prints "I2C device found at address 0x20" everytime. Schematic is this:
Hi
I don't have the micro arduino nor the PCF8575, but I have an arduino mini and a PCF8574 which is similar to PCF8574.
I'm going to mount here on the breadboard and see what goes with your code.
I am going to take a SWAG because I do not use a library for that part. That is what it should be reading. When it is initialized the output pins are written as one's. This is because it is a quasi I/O port with week pull up fets and a N-fet as the output driver. Try writing alternating 0x55 and 0xAA between the reads, the bits will switch each time you write the alternate value.
I measured pins states with DMM and it shows that they are at LOW state (= 0V). I used the code from my first message. I also tried to loop this code to see if pcf8757.digital.ReadAll() mixes something but it didn't change anything and DMM measured still 0V in all 16 IO-pins.