Something I've been wondering for a while is how / if it is possible to use components with more pins than exist on the Arduino board. For example, I'm looking at an lcd display chip which uses 40 pins. Obviously I can get a display with less pins or an arduino with more, but at some point this problem will arise again. What is the solution?
Look at how many pins are actually need for your purpose. It's rarely all of them. If it really is all of them get a different display.
Steve
There are hardware ways to expand the number of I/O pins. I2C port expanders and (SPI) shift registers are a couple of ways. Also, in some instances (keyboards, LED matrix), multiplexing can save pins.
JamThom:
Something I've been wondering for a while is how / if it is possible to use components with more pins than exist on the Arduino board. For example, I'm looking at an lcd display chip which uses 40 pins. Obviously I can get a display with less pins or an arduino with more, but at some point this problem will arise again. What is the solution?
Find solution here Is there a way to have more than 14 Output pins on arduino? - Arduino Stack Exchange
Post a link to the display you are considering. You may have other problems than the number of pins and finding a library to drive it may be difficult.
Using port expanders to drive a graphic LCD will be miserably slow, this is not a viable option (it's fine with character lcds like the 1602 and 2004 ones, and I guess black and white low res displays, as the amount of data involved is tiny - a color graphical display involves 3+ orders of magnitude more data) - for these, you must have them connected to pins on the microcontroller. The mega is one example of an arduino board with enough pins.
A display with that many.pins is likely to have other complications as noted by others. Full color lcds are usually not a great match for the arduino ir other.microcontrollers because of the large.amount of data involved relative to the ram and flash on an arduino; they are a better fit for raspberry pi and similar single board computers (though these generally want normal displays with hdmi interface)
6v6gt:
Post a link to the display you are considering. You may have other problems than the number of pins and finding a library to drive it may be difficult.
I wasn't considering anything specific, just wanted to know. That said, I'm curious what extra complications would exist if I had to use, for example, [link this?
JamThom:
I wasn't considering anything specific, just wanted to know. That said, I'm curious what extra complications would exist if I had to use, for example, [link this?
That would not be so bad because there is some documentation. It is an 8 character 14 + 2 segment display with 32 exposed segment pins and 4 bank select pins. The + 2 are the the decimal point and the high comma separator. You could drive it with four 8 bit shift registers and 4 transistors. To display every segments would require 4 cycles so the multiplexing strategy would be need some consideration.
AFAIK driving multiplexed LCD without dedicated hardware is quite difficult. You need AC voltage with as small DC component as possible and you need more than two voltage levels. I believe this is the reason naked LCDs are rarely used in hobby products.
Calling the datasheet linked there "documentation" is being pretty generous, seeing as it provides no information on the interfacing....
And yeah, driving a naked LCD like that is usually really painful - that's why almost every LCD used in hobby electronics is used with a board that provides a convenient interface. When they're used in commercial products, there's usually a specialized driver IC on the board too.
Ok. Maybe it is not quite so easy as I implied. Here is an evaluation kit for the maxq2010 microcontroller which incorporates this LCD and includes a schematic. The maxq2010 drives it directly.
https://datasheets.maximintegrated.com/en/ds/MAXQ2010-KIT.pdf