I tried to "bruteforce" all possible address locations - no change.
The extra byte is write statement, as said in datasheet?
![]()
I tried to "bruteforce" all possible address locations - no change.
The extra byte is write statement, as said in datasheet?
![]()
PBP handles the read write bit if I remember correctly, leave your 0 out
this is my code
ADDR=78 PORTBYTE IS VALUE FOR PORTBITS
i2cwrite sda,scl,ADDR,PORTBYTE 'ENSURE ALL OFF ON POWER UP
So I think your code should be
I2CWRITE SDAM,SCLM,%01000000,[%11111111,%11111111] 'enable outputs
Meant to have said my code is for the 8 port version, the 16 port version would have another byte added after, as you have got.
"The extra byte is write statement, as said in datasheet?"
Your extra byte is a bit not byte.
Last edited by aerostar; - 22nd October 2023 at 07:39.
Yes, with 8574 I also had no issues....
That looks correct to me (an even number of bytes, one for each port), and matches the datasheet shown in post #4.So I think your code should be
I2CWRITE SDAM,SCLM,%01000000,[%11111111,%11111111] 'enable outputs
I think there is a hardware issue.
That code works with standalone module with PCF8575. But does not work with the chip directly soldered to my PCB, so I will swap the IC today later and see, if there's any difference.
I figured out the reason, and it is not the code.
For some reason, PCF8575 can't drive ULN2803.
When I run it alone, outputs change as they should do
but when I connect output to ULN2803, output voltage of PCF8575 changes only from 0 to 0.6 volts and ULN2803 does not open.
Bookmarks