The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

How to use GPB0 - 7

by Rahatmaini on Sun Feb 17, 2013 9:13 pm

On the MCP23017 chip, I know how to use the GPA0 - 7 expansion pins, but I do not know how to use the GPB pins.

Here is how GPA pins are initialized
Code: Select all | TOGGLE FULL SIZE
mcp.pinMode(0, OUTPUT);

Now how do I use the other 8 pins of the 16 pin expander?

Thanks Adafruit
Posts: 165
Joined: Wed Aug 29, 2012 4:15 pm

Re: How to use GPB0 - 7

by adafruit_support_rick on Sun Feb 17, 2013 10:09 pm

pinMode accepts pin numbers from 0 to 15. GPIOA are 0 through 7, GPIOB are 8 through 15.
User avatar
Posts: 10724
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY