Shop OBEX P1 Docs P2 Docs Learn Events
PCA9554 vs. PCF8574 remote i/o i2c expanders — Parallax Forums

PCA9554 vs. PCF8574 remote i/o i2c expanders

RaymanRayman Posts: 14,162
edited 2007-12-11 19:07 in Propeller 1
Well, I got a bunch of PCA9554's from Digikey after Mike asserted they had them in DIP packages...
A quick glance at the data sheet and I though they were drop-in replacements as they had the exact same pinouts...

Well, I just learned that it's not as simple as that because the PCA9554s have output direction registers (like the Prop...) and polarity inversion registers that possibly need to be set...· The command structure is a hair different...

Still, I like the PCA9554 because it can source a bit and so I don't have to add a bunch of pull-up resistors...·

I suppose the direction and inversion registers are nice too...

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-12-03 21:09
    I never used a PCA9554... It sounds interesting and "as expected" by a micro controller user..

    Output with the (older) PCF8574 has to be selected by adding a pull-up to the write line, as setting the line "HIGH" means in fact TRI-state.
    Setting a line HIGH is necessary to read it as input.

    This is just for information..
  • RaymanRayman Posts: 14,162
    edited 2007-12-03 21:19
    So, it took me a few minutes, but I did this quick and dirty mod to get my PCF8574 code working with the PCA9554...

    I suppose this is really a better chip for me because I can individually control the pin I/O directions...· Also, the PCF8574·misbehaves if used improperly, and I don't think that can happen with this chip.· And, I may need polarity inversion one day, you never know...

    Post Edited (Rayman) : 12/11/2007 7:05:09 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-03 21:48
    Note that BoeBotBasic uses a PCA9554 to interface to an HM-55B compass and the code to do so is mostly in BoeBotBasic.spin.
    It does use some other objects for the low level I2C access ... the same ones that provide I2C EEPROM and SD card access.
  • RaymanRayman Posts: 14,162
    edited 2007-12-03 22:44
    Hmm.· Well, if the forum's search function worked, maybe I'd have found that!

    Still, what I have is a minimal driver.· Given the way you can't share objects very well in SPIN, I think it's better for me this way...
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-12-04 00:08
    Rayman, always use http://search.parallax.com to perform your searches of the forums, it is a·server we have with a small google engine on it and performs much better than the forums search.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-12-04 04:20
    to limit that search to this forum add this phrase: +"f=25"
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-12-04 04:33
    Firefox search plugin is very cool too.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just getting started with Propeller?

    Propeller Cookbook

    PropDOS
  • DroneDrone Posts: 433
    edited 2007-12-05 12:36
    Hi Rayman,

    I had a look at the Digikey site and can't seem to find a DIP version of the PCA9554. Downloaded the TI datasheet; can't seem to find a hint of the DIP package there either. I'm sure I'm missing something. Will you kindly post the Digikey part number for the DIP version you purchased.

    Thank You,

    David
  • RaymanRayman Posts: 14,162
    edited 2007-12-05 15:03
    David, I didn't see at Digikey at first either... Same for the DS1307. Their filter tool doesn't pick up on it... But, if you search for:

    PCA9554AN

    You'll find it...
  • DroneDrone Posts: 433
    edited 2007-12-05 17:56
    Thanks Rayman & Fred. Found the DIP.

    I download the Philips NXP datasheet instead of the TI datasheet and yes there is a DIP specified
    in the NXP DS, unlike in the TI datasheet.

    But it seems like the DIP part is being deprecated, at least by DigiKey (and NXP?)

    DigiKey page for the NXP part says:

    "Part will become a non-stocking item when stock is depleted; minimums will apply.
    Order the quantity available or the quantity available plus a multiple of the minimum order quantity"

    I should have remebered to try the likes of "AN" contactinated at the end of the part number,
    I seem to remember this results in a PDIP often, especially with traditional 74XX logic.

    Certainly DigiKey's filters need a fix.

    Thanks all for the help... & Happy Holidays!

    David
  • RaymanRayman Posts: 14,162
    edited 2007-12-05 18:33
    Oops, wait a second... I should have said to look for:

    PCA9554N

    The PCA9554AN is a variant with a slightly different I2C address...
  • RaymanRayman Posts: 14,162
    edited 2007-12-11 19:07
    Oops... Found a bug in my PCA9554 driver. My apologies to the 12 people who downloaded it... Hopefully, nobody was actually trying to use it yet... Anyway, I've uploaded the fixed zip file here and on my we site:

    http://www.rayslogic.com/Propeller/Programming/I2C/i2c.htm

    This was the problem I was working on when I fried my proto board (Apparently, because I plugged a PCF8574 into it's socket backwards [noparse]:([/noparse] ). Now that I've fixed the proto board, I found this bug in the PCA9554 driver ( ">0" should be "=>0").
Sign In or Register to comment.