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 gray 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 grayscale 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 gray value is below some threshold. The resulting error value, is then propagated to neighbor 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 gray 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 gray 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, ie 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!

Leave a Comment