>> I think I grok the cases where the chip is used as either 8 bits >> of input or 8 bits of output, but I am clueless about section 7.3, >> where it talks about using some pins as inputs at the same time that >> other pins are used as outputs. The reference to Figure 15 isn't >> helping. It sounds like the chip is mainly intended to be used as an >> "all inputs" or "all outputs" device, but it has some voodoo that >> can make it pretend to do mixed I/O if you line up various planets... > >It looks like when you want a pin to act as an input, you must >set it HIGH (which also is the power on state). In that case an external >device may pull the pin HIGH or LOW (and when LOW, sink the >current from the 100uA currect source. You probably should take >care not to write a LOW to that pin in this case... Correct. each pin has an internal high value pull up just like can be enabled on the PIC RB pins, except it cannot be turned off on the PCF8574. >When using a pin as output, you just send a HIGH or LOW to that >pin as you want. But note that when HIGH, it can only source 100uA >(I think)... Correct, but this is plenty for most purposes. In my case this is plenty to drive a ULN2803 to sufficiently high to make relays come on. >Now, the thing I don't understand, is the extra FET that, when ON, >shorts the 100uA current source and ties the pin hard HIGH. But >this might be an missunderstanding... This is pulsed when the port output is driven to a "1" state, to give a rapid pullup to any capacitive load that may be on the port. However it is not left on so that the 100uA source can be used to allow the port as an input port. This is really quite a nice chip to get an easy to use 8 bit port on an I2C bus. You can have up to 8 of the non-A version, and up to 8 of the -A version, giving the potential for 16 ports. The only difference between the two versions is the base address on the I2C bus. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads