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
![]()
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!
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 ...
_______________________________________________
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!
Bookmarks