Calling MCP23016 pins
Newzed
Posts: 2,503
I have an MCP23016 with a lot of lines working.· I need to monotor the state of just of of the pins.· Can I write
if GP0.7·= 128 then do something?
12 of the pins on the chip could be in any state but I am only concerned about the state of GP0.7
Sid
if GP0.7·= 128 then do something?
12 of the pins on the chip could be in any state but I am only concerned about the state of GP0.7
Sid
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
if GP0>=128 then dosomething.·
This statement is true only of GP0.7 is
high.· If it is NOT true, then GP0.7 must be low.
Sid
To many this seems like a lot of work, but after 20 years of programming I can assure you that it saves the programmer time, and is immensely helpful when that same programmer wants to share his/her code with others.· It's also helpful when you change a circuit design as a couple changes in your definitions section is easier than hunting through a long listing for "magic numbers."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office