Shop OBEX P1 Docs P2 Docs Learn Events
Microchip MCP23X GPIO expander — Parallax Forums

Microchip MCP23X GPIO expander

tigershark35tigershark35 Posts: 60
edited 2006-10-04 15:43 in BASIC Stamp
Hi, does anyone have any code or suggestions to look for code for this IO expander.· I have found code for the 8 bit shift register that Parallax sells, but I have one of these chips and am not good enough to interprete what I need from the spec sheet.

I want to have up to 16 outputs from a serial input from a stamp. I want to use as few pins as possible.

Thanks

Comments

  • NewzedNewzed Posts: 2,503
    edited 2006-10-03 21:44
    The MCP23016 is an I2C chip and works best with a BS2p or a BS2pe.· It will tun on a BS2 or BS2E, but it requires a special program.· What Stamp are you using?· I have codes for the BS2pe and the BS2.

    Sid



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Need a TV Module?

    Newzed@aol.com
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-03 21:46
    Hello,
    ·
    ·· 16 outputs can be gotten easier using the 74HC595 Shift Register using only 3 I/O lines.· The MCP23X will require more code to do the same work.· Of course this is assuming you’re just trying to make certain pins HIGH/LOW.· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • tigershark35tigershark35 Posts: 60
    edited 2006-10-04 12:29
    Thanks Chris and Sid. I have one a sample of the MCP23X so I thought I would give it a try. I would like to see the code Sid. But Chris - i have some of the 74HC595 s on order and have seen the code from one of the experiments.

    Thanks
    JG
  • tigershark35tigershark35 Posts: 60
    edited 2006-10-04 12:30
    Oh, I forgot, I am using a BS2

    JG
  • NewzedNewzed Posts: 2,503
    edited 2006-10-04 12:47
    JG, here is the code for a BS2.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Need a TV Module?

    Newzed@aol.com
  • tigershark35tigershark35 Posts: 60
    edited 2006-10-04 15:43
    Thanks
    JG
Sign In or Register to comment.