Wykres commitów

5 Commity (master)

Autor SHA1 Wiadomość Data
Peter Hinch 843d153f8f ILI9488: Add code comments re SPI clock rate. 2025-06-30 14:41:22 +01:00
Carl Pottle f6c3cf29bb Optimize ili9488 driver
I implemented several code optimizations from
a presentation by Damien George I found on youtube.
The optimizations are on a slide here:
https://youtu.be/hHec4qL00x0?t=813

1) Change __init__ to use bit 5 in madctl register
   to swap row/column for landscape mode.

2) Eliminate functions _lscopy and _lscopy_gs.
   They are not needed because the ili9488 chip
   is handling orientation.
   Results in simplification in show() and
   do_refresh().

3) Minor optimizations to _lcopy and _lcopy_gs.
   Reverse order processing bytes.
   Specific changes:
   - change while condition from 'x < length' to
     simply 'length'. This test is faster in viper.
   - use length as index into source instead of x.
     Variable x is removed.
     This requires the source and dest to be
     processed from end to beginning.
   - other optimizations from the Pycon talk
     given by Damien George.

4) Optimizations to show() and do_refresh().
   - Caching in local variables
   - Changes to support writing more pixels
     for each call to spi.write().
     Saving from this are larger on ESP32
     than on Pico and Pico 2.

The Damien George optimizations save 10 to 20 milliseconds
per screen refresh on my ESP32. I expect similar results
for Pico and Pico2.

The saving from fewer calls to spi.write() is significant
on my ESP32. 60 to 80 milliseconds.
The saving on Pico and Pico2 are smaller, 10 to 20 milliseconds.
2025-04-17 11:03:41 -07:00
Peter Hinch 332fd6d709 ili9488.py: Add acknowledgement of Carl Pottle. 2025-04-07 10:37:35 +01:00
Carl Pottle 82b263a422 Address code review feedback
Three relatively small changes:
1) Undo changes to gui/core/writer.py
2) Modify setup_examples/ili9488_pico.py to specify pins
   by number rather than string.
3) As recommended, use a 2 byte per entry color lookup table
   rather than 3 bytes (needed to undo changes in writer.py).

I ran the same tests for these changes as last time.
2025-04-04 11:28:03 -07:00
Carl Pottle 10ca0458db New driver for ILI9488 over SPI bus
ILI9488 does not support 16 bits per pixel over SPI.
It does support it over 8 or 16 bit parallel bus.
As a result, the existing ili9486 driver will work
with some ili9488 boards.

Some vendors sell boards with ILI9488 and serial to parallel
converters.
I beleive those boards will work with either the ili9486 or
this new driver.

I tested this code with the following demos:
- gui/demos/scale.py
- gui/demos/aclock.py
- gui/demos/aclock_large.py
- gui/demos/scale.py

I tested landscape and portrait in color and greyscale.
2025-04-01 16:27:20 -07:00