1
\$\begingroup\$

I'm not a professional so I'm looking towards a simple answer to this question.

If you want to turn an LED on using a microcontroller, then you have to assign a pin on the microcontroller to the LED. Whenever the microcontroller sets the pin voltage to high, then the LED turns on.

I assume that displays should work with the same principle since they have some kind of a LED for each pixel. The problem is that if it was done the same way we turn an LED on, then for a small 320x240 screen we need 76800 microcontroller pins. It seems that the procedures should be different somehow. So how does a simple IC on an LCD tell each pixel to turn on?!

To avoid confusion I should point out that by mentioning microcontroller above, I mean the chip on the LCD module itself.

\$\endgroup\$
  • 1
    \$\begingroup\$ An LCD pixel is NOT an LED, it is a Liquid Crystal (Google it). There are displays (OLED) that are based on an LED structure. In both cases the display controller multiplexes (Google it) the signals so less pins are required. \$\endgroup\$ – Jack Creasey Nov 15 '17 at 6:19
  • 1
    \$\begingroup\$ "... for a small 320x240 screen we need 76800 microcontroller pins." No. Using multiplexing we can address each pixel by turning on its row and column. This would take 320 + 240 = 560 pins. \$\endgroup\$ – Transistor Nov 15 '17 at 6:27
  • 1
    \$\begingroup\$ Yes the IC as part of the panel that has X*3+Y number of pins, *3 because of RGB. Google for "ili lcd controller" you will find quite a few datasheets for various ILI lcd controllers and check the pin out. \$\endgroup\$ – user3528438 Nov 15 '17 at 15:06
6
\$\begingroup\$

At some level a 320x240 display usually has 320 row drivers and 240 column drivers. These drivers are almost always provided by chips integrated into the displays (often on flex PCBs around two edges of the display) with either a serial interface that supplies the data for one pixel at a time, or an intelligent controller with RAM to store the contents of the display.

The actual interface with a microcontroller ranges from 2 pins for i2c, 3-4 pins for SPI, 6-13 pins for a high level parallel interface to 30 or so pins for a pixel-by-pixel parallel interface.

OLED displays are basically the same although the interface between the driver chips and the display is different (same number of drivers required though).

\$\endgroup\$
2
\$\begingroup\$

The LCDs are having large number of pixels as you guessed it correctly. But each pixel is not directly controlled by microcontroller pin, as it is impractical which you guessed correctly.

Now, to make the design practical, the task of driving LCD pixels using microcontroller is divided in to two steps.

For the first step, there is a special purpose microcontroller, which drives each pixels of LCD and it takes care about the refresh rates and clocks and pixel matrix, address mapping and all the required complex stuff to drive the LCD properly.

While second step is that special purpose microcontroller have a capability to take commands and information from our general purpose microcontroller. So, our task is to send the command and information which is to be displayed on LCD to special purpose mcu by following predefined protocol of special purpose mcu. So, now the headache of driving each pixel has been reduced from general purpose mcu.

Mostly this special purpose mcu is already residing inside LCD while it is being manufactured.

Hope this will help.

\$\endgroup\$
2
\$\begingroup\$

Whatever special microcontroller is controlling the pixel intensity inside the lcd screen, it controls only one pixel at a time. And it updates each pixel so fast horizontally (till 320 pixels) , line by line (up to 240 lines). The entire frame is updated at a typical refresh rate 60 Hz. This happens so fast such that, the persistence of our vision (1/16 seconds or 16 Hz) gives us the idea that every pixel is controlled by the microcontroller at a single moment.

Regarding address of pixels - To decode 320 row and 240 column addresses you need only 9 pins and 8 pins respectively.

\$\endgroup\$
0
\$\begingroup\$

There are three general kinds of LCD: those with bare glass, those with a built-in driver, and those with a built-in controller. An LCD with bare glass can be driven well using logic-level microprocessor pins if it doesn't have too many segments. A non-multiplexed ("static") display with N segments will require N+1 pins. A 3:1 multiplexed display with 3N segments will require N+3 pins. Yielding good contrast with more than 3:1 multiplex will require something other than logic-level pins. Driving a static display will require flipping the state of all the pins about 30-100 times/second except when the display is totally off. Driving a multiplex display will require changing the state of the pins about 160+ times/second (lower frequencies will start to flicker).

An LCD driver will include logic to interface a display to a small number of pins, but will generally require that something continuously feed the state of all the segments. A 320x240 LCD panel I used some years back had four data pins, a dot clock, a row clock, and a frame clock. About 30,000 times/second it's necessary to feed 80 groups of four pixels and then hit the row clock. The timing of pixels within each line doesn't matter, provided all 80 groups get loaded before the row clock hits, but the rows need to be hit at a consistent rate. It's necessary to hit the frame strobe at a constant rate that should be about once every 240 rows, but could be a little slower (in my project, I think I used 250 rows so as to allow time for my firmware to reload DMA registers for the next frame).

An LCD controller will include enough internal RAM to hold all of the segments or pixels on the display and show them continuously without outside intervention. Controllers are easier to work with than drivers, but if a microcontroller is fast enough to work with an LCD driver it will often be able to perform faster display updates than would be possible using a controller. A typical graphics controller will expect a CPU to send a command meaning something like "get ready to accept pixels at coordinate 143,219, counting in the increasing Y direction until 150, and then wrapping with increasing X coordinates", and then follow that command with a suitable bunch of pixel data. Common RGB graphics chips can connect via four-wire serial interface, but will require sending sixteen bits of data for each and every pixel. Even a slow 1970s microprocessor would have no trouble showing graphics using typical integrated-controller LCD, but loading a full screen of graphics would take awhile.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.