Page 1 of 1

MandelZoom - esp32-s3 ILI9488 parallel

Posted: Fri Aug 28, 2026 12:08 pm
by mnfisher
I was playing with esp32-s3 - initially I hoped to do this on an EBlock3 - but I had to move it to an esp32-s3 board with parallel connected ILI9488 display (see CopyFrame for the why!)

So using Ben's very smart board (and I suspect the EBlocks second esp32 is much the same as this...) See https://www.ebay.co.uk/itm/285173803237

My plan was to use multiple cores to speed up the Mandelbrot generation - so here we have two, and I use fixed point arithmetic for speed.

At a couple of points - I use 64 bit arithmetic to avoid overflow.

The main loop splits the total area to be displayed into 'chunks' - and pushes each of these to a queue. Two worker tasks (one pinned to core 0, one to core 1) pull a chunk from the queue and calculate the region. When all the chunks are done - the main loop calls CopyFrame - which writes the entire frame as a single 'window'. It then waits for a 'touch' - and zooms onto that 'centre' (by a fixed zoom factor - a drag box would be better!) Zoom is a little 'rough' and the palette could do with some honing!

It allows zooming by quite a few cycles - but needs reset to, well, reset - ideas for a better interface?

It outputs some info to UART (touch position, time to generate frame) - if you want to experiment with single core - comment out one of the xTaskCreate in initialise - it might also be fun to create more tasks and see what the performance penalty is (or remove the 'pinned to core' - and again see if there is a performance hit?

Ben - the superbright LED came on at some point - which pin is it connected to?
mandel1.jpg
mandel1.jpg (44.93 KiB) Viewed 105 times
mandel2.jpg
mandel2.jpg (65.5 KiB) Viewed 105 times

Martin

Re: MandelZoom - esp32-s3 ILI9488 parallel

Posted: Fri Aug 28, 2026 12:25 pm
by mnfisher
On the EBlocks3 board - one esp32 seems to just handle the display (accepting 'commands' via UART(?) like the SCADA hosts?) - it would be possible (maybe) to utilise the cores on both MCUs - and pass display data across the UART before a final 'write' to the display?
The actual 'chunks' passed to tasks - have a small descriptor - and although the data for the display is fairly large - and would need to be handled by the 'display' esp device on being transmitted by the other - this would be relatively straightforward - for example pass job descriptors for half the display to the second device?

Re: MandelZoom - esp32-s3 ILI9488 parallel

Posted: Fri Aug 28, 2026 2:11 pm
by BenR
That's very cool Martin, I can send the source for the EB3 display module if that would help. Maybe there's a nice easy way to be able to stream high pixel data and certainly for yourself it provides more you can do with the EB3 kit.

The RGB LED pin is GPIO38 of the ESP32S3 which on the EB3 display module and on my ESP32S3 display is the SD CS/D3 pin. So talking to the SD card has the possibility to bring the LED on if it gets the right sequence of pulses.

I did think about exposing the LED as a feature on the EB3 display module but not sure how useful that is and it potentially clashes with the SD card layer which certainly is useful.