Electronic – Emulating greyscale on a 1-bit LCD

avrglcdlcdModulationpwm

I have an LCD (the DOG-M 102×64, with a uc1701 controller) that I am driving (over SPI, but that's somewhat irrelevant) from an AVR (ATMega16 @ 8 MHz) – all in all, a fairly low spec'd screen with a low-spec'd system. The screen at hand is only capable of 1-bit display, but I would like to emulate some shades of grey with it (per-pixel).

Reading through the controller datasheet offers some ideas: there exists commands that will turn on all pixels, and another that will invert the display (not affecting the display ram).

I've searched around, and the information I came up with was in a question posted here, commenting mainly on biasing of the liquid crystal over time.
I'm also aware of Binary Code Modulation, perhaps that could be applied to this problem?

Is this technique a viable method for emulating greyscale? Has anyone done it before?

Edit: Found this resource which illustrates that the concept might be somewhat viable.

Edit: Found this resource that makes me think rapidly switching between two framebuffers (2 bit planes) might not only be a viable approach in general, but might also have some long-term negative effects on the LCD if done incorrectly.

Best Answer

About the only way to simulate grayscale using a 1-bit display is to do pixel averaging, e.g. using a square of four pixels to represent one pixel in the original image,

0 pixels on (white) = 0%
1 pixel on (light gray) = 25%
2 pixels on (medium gray) = 50%
3 pixels on (dark gray) = 75%
4 pixels on  (black) = 100%

Unfortunately, you don't have enough pixels on your screen, and the ones that are there are too big to allow this technique.

Related Topic