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
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.
Solved.
Output current of PCF8575 is not enough to drive ULN2803, so I had to add 2.2K pull-up resistors, and now it works just fine.
It makes no sense. From datasheet, page 7 and figures 6 and 10, seems that the 8575 can drive more than 25mA.
I am sure that ULN needs much less than that. Maybe you have a faulty chip? Be very careful with static discharge (ESD) problems.
Ioannis
no , it can sink 25mA ,source 300uAIt makes no sense. From datasheet, page 7 and figures 6 and 10, seems that the 8575 can drive more than 25mA.
![]()
Warning I'm not a teacher
Correct! But what about the charts on page 7?
Ioannis
Bookmarks