PDA

View Full Version : DEV_DISPLAY_128X64 with I2C I/O Expander: Has anyone done this?



EasternStarGeek
01-28-2013, 01:14 PM
Dear folks,

I am considering getting a LCD Graphics unit (DEV_DISPLAY_128X64) but was wondering if anyone has ever attempted to use it with an I2C I/O port expander like the MCP23017?

It would be an interesting challenge to figure this out, but before I proceed, can you think of any issues that might get in the way?

I am a big fan of the Teensy 2.0 and 3.0, and I would like to make this work in order to free up I/O pins for other tasks.

Many thanks!

sumotoy
01-28-2013, 10:36 PM
Have you read the Nick Gammon article? (http://www.gammon.com.au/forum/?id=10940) He uses MCP23S17 (for SPI) and MCP23017 (for I2C) for driving a graphical LCD on duino's. Pay attention that several old graphical LCDs works only at 5V (you will have to use a level converter).Consider that a graphical LCD can be slow used with I2C so prolly better use MCP23Sxx series that uses a special addressing feature on CS pin that it's extremely useful when you need several port expanders on same wires, in this way you just use one wire more than I2C but faster and you can still add several other GPIOs. Gammon's code should work as is, maybe some minor modifications to avoid avr/pgmspace.h, I don't remember well but maybe not works with T3.

EasternStarGeek
01-30-2013, 12:30 PM
Many thanks, sumotoy!

Yes, I am aware that the I2C approach can be a little pokey, but I will try the MCP23S17 approach. BTW, that chip is perfectly happy at 3.3V, so I will do that and avoid level-shifters. On to the article...

ZTiK.nl
02-20-2013, 07:18 AM
I don't remember well but maybe not works with T3.

Do you mean that the MCP23017 might not work on a Teensy 3, or that the combination of display/expander/T3 might not work?

The reason I'm asking is because I have a MCP23017 here, and am planning to use this to connect some sensors.

I could simply try and find out when I get to it, but it would be a shame if I destroy it on first use.
Although, as far as I can find out, it can operate from 2.7-5.5V so that shouldn't be a problem...

(sorry for reviving a 'closed' topic, seemed like the best place to ask)

sumotoy
02-20-2013, 08:35 PM
I have a lot of experiences with MCP23xxx GPIO expanders, even on Teensy3, and works at 5v or 3.3v with no problems!

ZTiK.nl
02-21-2013, 12:53 AM
I have a lot of experiences with MCP23xxx GPIO expanders, even on Teensy3, and works at 5v or 3.3v with no problems!

Excellent :)
Thank you for verifying!