MCP23016 I/O expander - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 43 of 43
  1. #41
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    I tried reading from the INTCAP instead of the GPIO with much better results.

    Got more tests to do.

    EDIT: Nope, not that, nevermind...

    Robert
    Last edited by Demon; - 23rd October 2005 at 22:44.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #42
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Robert,

    As I'm not using the MCP23016 I haven't read the entire datasheet.

    But looking at your schematic there is one thing that may cause strange effects:

    you have switches to VDD, but no PullDown Resistors.
    So when the switches are open the MCP's inputs are floating.

    (I would prefer to have the switches connected to GND and have PullUps to VDD)

    I
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #43
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Thumbs up

    ARGH!

    Thanks Ralph! I can't believe I missed that. Pull-up resistors is one of those things that I watch out for in all switches.

    But I've been so busy learning new stuff on this circuit that I've totally forgotten what I consider to be a basic thing. I was so sure I had misunderstood something in the MCP23016 datasheet, or wired an I2C device improperly, a pull-up resistor never dawned on me.

    The circuit works beautifully now.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. I/O extender
    By mychangl in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 20th November 2008, 14:56
  2. MCP23016 I2C serial I/O expander chip
    By GeoJoe in forum Serial
    Replies: 7
    Last Post: - 31st October 2007, 15:39
  3. MCP23016 I/O expander with PBP?
    By Jon Chandler in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd August 2005, 09:32
  4. I2C I/O Expander PCF8574 hanging?
    By NavMicroSystems in forum Serial
    Replies: 12
    Last Post: - 4th August 2005, 02:26
  5. managing the I/O ports of the 16F84A
    By skyler_91600 in forum mel PIC BASIC
    Replies: 7
    Last Post: - 28th April 2005, 03:52

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts