It’s possible to find surplus LCDs in all kinds of old hardware. Photocopiers, printers – you name it, there’s old junk out there with displays going to waste. Unfortunately, unlike the displays on sale at your favourite maker website, these often lack a controller and can be quite difficult to drive. [pataga] took on the challenge to drive a LCD of unknown provenance, using the power of the ESP32.
The LCD in question is a 240×160 monochrome device, that was initially being driven successfully with a Microchip PIC24 with a dedicated LCD driver peripheral. This allowed [pataga] to study the display interface under working conditions with the help of an oscilloscope. Inspiration was then taken from a project by [Sprite_tm], which used the I2S peripheral to drive a small LED display without placing load on the CPU.
Using the ESP32’s I2S peripheral in parallel mode makes it possible to shift data out in the correct format to drive the LCD without bit-banging IO pins and using up precious CPU time. This leaves processor cycles free to do interesting things, like generating 3D images using [cnlohr]’s routines from the Channel 3 project. There’s a little extra work to be done, with the frame signal being generated by an external flip flop and some fudging with the arrangement of various registers, but it’s a remarkably tidy repurposing of the I2S hardware, which seems to be the gift that keeps on giving. (Here it is spitting out VGA video through a resistor DAC.)
Code is available on Github for those looking to get at the nuts and bolts of the hack. It’s another build that goes to show, it’s not the parts in your junk box that count, but how you use them.
It is hard to read, hire proofreader or corrector. Or I am just getting lazy at reading
That’s a nice project and I’m glad to see it here, but i’m not too sure all the project relying on the I2S peripheral of the ESP32 should be considered a “I2S hack” especially with the ESP32 TRM showing the use of the I2S peripheral for driving an LCD screen. Again, nice to see the article here just the title might be a bit misleading.
If some people are interested in this: I’ve recently spent quite a lot of time modifying the Marlin firmware to support I2S for driving stepper drivers using some shift registers. Using the I2S DMA it’s possible for the steppers to reach a very high step rate very accurately without having to use the timer and interrupt (the way it’s currently done). The code for this is now in the mainline bugfix-2.0.x branch of Marlin.
What you’re describing sounds quite similar to this : https://hackaday.com/2016/09/06/run-a-reprap-on-an-esp8266/
There’s some good tech info on the offered link, clarified here it’s on the esp32 forum:-
https://www.esp32.com/viewtopic.php?f=13&t=3256
Thanks for posting and link, cheers
Parallel I2S is one of the surprisingly useful features of the ESP32!
Not that surprising for driving LCDs, since this “I2S LCD mode” had its own section in the ESP32 documentation (and sample code available) for 18 months now… but here, this is (ridiculously) “posted in classic hacks” anyway !
Nice work but did they have to use that photo?
What’s wrong with that photo?
Some people (err males for most part) just don’t remember their youth thinking about Bo Derek or maybe caught in Dudley Moore’s existential pre Viagra dilemma ;-)
This is a picture which was accepted as a test image by JPEG consortium back in a day to verify image compression algorithm and tweak its parameters. Somewhat similar to what Tom’s Diner song is for mp3. So somehow on a deeper level it kind of makes sense..:)
Oh Len(n)a! The story behind that picture is also quite a read. Especially the part where she attended an image processing conference :-D
Good grief.
” Unfortunately, unlike the displays on sale at your favourite maker website, these often lack a controller and can be quite difficult to drive. ”
Some due to the custom nature of the product.
Well, It can’t be that difficult if you can do it on 8-bit ATmega328P/32u4, without I2S and DMA ? :). Shameless plug: https://hackaday.io/project/164225-arduino-clglcd. Actually, I learned a lot from this project before ‘porting it’ to Arduino