MandelZoom - esp32-s3 ILI9488 parallel
Posted: Fri Aug 28, 2026 12:08 pm
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?
Martin
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?
Martin