Monochrome LCD Video Hacks Galore!

[Wenting Zhang] is clearly a fan of old school STN LCD displays, and was wondering how various older portable devices managed to drive monochrome LCDs panels with multiple grey levels. If the display controller supports multiple bits per pixel, it can use various techniques, such as PWM, in order to produce a pseudo-grayscale image. But, what if you have a monochrome-only display controller? With a sufficiently high pixel clock, can you use software on the application side of things to flip those pixels in such a manner as to give a reasonable looking grayscale image?

Simple dithering – don’t look too close!
PDM greyscale approximation in a 1-bit display

[Wenting] goes through multiple techniques, showing the resulting image quality in a clear, systematic manner. The first idea is to use a traditional dithering technique. For each pixel, it is set to black if the grey value is below some threshold. The resulting error value, is then propagated to neighbouring pixels. This error diffusion process smears the error out over the whole display, so spatially speaking, on average the pixel values correspond roughly to the original gray values. But, the pixels themselves are still either on or off. This isn’t quite enough. The next idea is to PWM the individual pixels over multiple frames, to approximate different grey levels. But, that gives a worst case effective refresh rate of 8 Hz with a PWM period of 15 frames, at 120 fps, and that flickers. Badly. One way to mitigate that is to switch to PDM (pulse density modulation) which selects different length sequences to give the same duty cycle but at higher frequency, at least for some grey values. Slightly better, but there’s more that can be done.

Simple PWM vs lookup table mapping

The thing is, our brains do weird things with the visual signals we perceive. Regions with the same gray value, will be pulsating at the same time, and the eye will be drawn to it and perceive flickering. So, the next trick was to try to decouple nearby pixels in such regions using a LFSR sequence, which did give an noticeable improvement. The real aim was to try to play video through the LCD, so after investigating spatial dithering, [Wenting] moved over to wondering if he could also dither in time, i.e. can the error in the time sequence be smoothed out in a similar manner, to make the video look better? By using a simple noise-shaper, the video looked noticeably smoother, and practically flicker free. Great results! All in all, this is a long video to watch, but so crammed with useful tricks that it is in our opinion definitely worthy of your time.

We’re no strangers to driving retro displays with modern hardware, for example CRTs, and whilst we’re thinking about retro displays, how about this retro (and quite disturbing) touch-enabled CRT from the early ’80s?

Thanks [Philippe] for the tip!

23 thoughts on “Monochrome LCD Video Hacks Galore!

    1. Interestingly, I just saw a video of a device which did exactly that. Some cheapo Tetris handheld with a white background and maybe 4 colors. Though, my intuition (which was proven wrong by this article) says the decay-rates are slow-enough that there’d be significant bleed-through as the backlight switches from color to color.
      Also, interestingly, these displays *typically* can’t be backlit due to the reflectors used, but there seem to be reflectors that reflect one polarization and pass-through another. The result being a mirrored background and a window through it (to your RGB diffuser).
      https://youtu.be/jLew3Dd3IBA

  1. While being cool this kills one benefit of these displays, energy consumption. So have that in your backmind when using this technique, you can’t send your microcontroller to sleep when using this.

    There is a reason why a 3310 of yore holds their battery for a whole week. ;)

      1. Well, you can pump roughly 900fps if you insist.
        The interface can do 4 MHz which means 4.000.000 bits per second, with a resolution of 84*48=4032 pixels.
        The only limiting factor here could be how fast the PCD8544 updates the LCD itself.

  2. Isn’t “monochrome” the wrong word here? Monochrome means one hue and any number of bits per pixel. It looks to me that the article is about binary 1 bit displays, as in the video title. The definitive work on this is “Digital Halftoning” by Ulichney in the 1980’s.

    1. Monochrome probably means different things in different contexts. With regard to digital images, monochrome often means 1-bit images, vs. greyscale which means multi-bit, single-channel images.

      Also, the key thing here is that the display isn’t just showing a static image, but rather a dynamic one. That opens up many more possibilities.

      1. Yes, the jargon has a strong drift in tech these days. But “chrome” is color in Greek and chromatic means of color. Mono-chrome is single color. I would stick with the root word. A green Apple II display is monochrome. The Apple uses it as a 1 bit binary display but the green monochrome monitor is analog in brightness and there were adapters to produce “green scale” images or gray scale with a different monitor.

  3. I bet the Videonow generation since they’re all grown up would love to a see a remastered Sponge Bob in 50 shades of grey…

    … err wait, google Videonow not the rest of that, rule 34 is a harsh mistress… you naughty little thing.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.