Go Down

Topic: Digital and analog pin expander on arduino leonardo (Read 638 times) previous topic - next topic

TaNium

Hello everyone

For my project I need more digital and analog pins but I have laying around pin expander IC's I want to use them for it. I've got 1 MCP23016 wich is a digital expander and 1 MCP3008 wich is a analog expander. Using other arduino boards is not an option for me. If this is not possible I maybe can use 2 leonardo's but i first want to see if this is possible to use the expanders. Also I want to use an LCD 16*2 screen in I2C on my leonardo. Please make a schematic for me how I need to put it togheter.

Many thanks,
TaNium

Grumpy_Mike

#1
Jun 26, 2018, 07:09 pm Last Edit: Jun 26, 2018, 07:10 pm by Grumpy_Mike
Quote
MCP3008 wich is a analog expander
No it is not. It is an A/D converter.

So how many pins of each do you need?

TaNium

Sorry that it isn't and pin expander on the site where I bought it it says so but if I like in the datasheet you are correct I need atleast 4 analog pins (without the I2C connection) and about the digital pins i think with the IC I have euneugh

Grumpy_Mike



TaNium

Thank you but is it possible to use an I2C LCD display with the digital pin expander? If so how do I do this?

Grumpy_Mike

Quote
s it possible to use an I2C LCD display with the digital pin expander
Yes.

The MCP23016 is an I2C device, just connect it to the same wires as your I2C LCD display. The I2C lines are a bus and can have 127 devices connected to it, each device should have a different address. You can select the MCP23016's address on the I2C bus by three logic level inputs. Just connect these to 5V or ground to select your address to avoid the address of the display. See the data sheet for details. Chances are that they don't clash anyway.

TaNium


Go Up