Quote Originally Posted by Charles Linquis View Post
Has anyone successfully read a Philips 8591 using PBP? I can "talk" to virtually any other device I have come across, but this one has me stumped. Can someone tell me what I'm doing wrong? And yes, I have pull-ups on the SCL and SDA lines!

Code is below.
---------------------------------------------------------------------

PCF8591 CON %10010000

SetupI2C:

DevAddr = 0 : DevAddr = DevAddr << 1 : DevAddr = PCF8591 | DevAddr
I2CWRITE PORTC.4,PORTC.5,DevAddr,$44,[0] ; Use internal clk, auto-increment mode
RETURN

ReadI2C:

DevAddr = 0 : DevAddr = DevAddr << 1 : DevAddr = PCF8591 | DevAddr
I2CREAD PORTC.4,PORTC.5,DevAddr,[PSByte1,PSByte2,PSByte3,PSByte4] ; Read all 4 channels

RETURN
I just read the datasheet. Check page 19, SCL freq. The PCF8591 is a 100khz device, not 400khz (or even 1mhz for that matter).
You probably have to use:
DEFINE I2C_SLOW 1
in your code to slow it down a bit.