PDA

View Full Version : Pcf8574



larryt
- 4th December 2004, 19:37
I have been using a Phillips PCF8574 in a PIC16F876 circuit (via I2C)
quite successfully for several years. Picbasic works great with these
two.

However, when I substitute the Texas Instrument PCF8574 ic for the
Phillips one it no longer writes to the chip. I can read the TI chip
fine but cannot output to it.

What is going on? Aren't these two compatible with Picbasic?

Thanks for your help

Larryt

Melanie
- 4th December 2004, 20:10
They should be compatible. This sounds like a Hardware thing rather than a software incompatability.

1. Are you sure you haven't got a dud chip?

2. There may be minor hardware differences between the chips... compare the datasheets, one thing immediately springs to mind...

2a. There may be a WRITE PROTECT pin on the chip... ensure that it is WRITE ENABLED (usually that pin needs to be grounded, - check with your Datasheet, and ensure it's not floating).

2b. Check the pull-up's on the Clock and data lines... your new chip might be less tollerant than your old one. 4K7 is the usual for 100-400kHz I2C data speed. Internal weak pull-up's just don't cut it with I2C.

larryt
- 4th December 2004, 20:16
Thanks Melanie but I have tried all the above. I have about 100 of the TI chips and none work. I also tired the pullup resistor changes too.

I have tried comparing the data sheets and find no real differences. I also tried the Picbasic commmands for slowing the clock even though I am using a 4 mHz rock.

Tried the obvious - now I am looking for something hidden.

Larryt

mister_e
- 4th December 2004, 21:11
are A0-A2 well connected(ground or vdd)??? There's no Writeprotect on tehse ICs, that's suppose to work like a charm. is there any cold solder or bad socket contact ??? Try decrease pull ups to let's say 750 ohms.

larryt
- 4th December 2004, 21:20
Steve,

I have tried the TI chips in many other circuits where the Phillips ones work (PCF8574).

We manufacture several different products using the Phillips PCF8574 with the PIC16F876 using I2C and Picbasic and thought that a viable substitution would be the TI part.

It has to be something obvious however, trying different pull-up resistors on the I2C bus has had no effect. I still can't write to the TI chip. I can read it fine.

I was wondering if, for some reason, the TI chip was waiting for an acknowledge from the PIC chip or something - something that the Phillips chip didn't require before writing to the output of the chip.

Larryt

mister_e
- 4th December 2004, 21:24
i didn't compare both datasheet on that. maybe some addressing,control words are different. i don't know if TI chips are slower than philips, can you try adding PAUSE 50 (about) after a I2CWRITE ? i'm sure it's not a hardware problem now.