Is there a possibility for a library user to make size/perf choices? #2057
Replies: 4 comments 1 reply
-
The library is not optimised for the WIO so uses the slower Arduino core SPI calls. Font rendering is already optimised and caching is not supported. Due to the way RLE is compressed caching will have a tiny effect. The performance is likely dominated by SPI transaction speed. On an ESP32 a font 4 character is rendered with background in less than 0.3ms (SPI) or 0.09ms (8 bit parallel) which is faster that the TFT frame refresh period of circa15ms. Run the TFT_Char_times sketch and report the times your are getting. |
Beta Was this translation helpful? Give feedback.
-
The maximum SPI clock rate for the SAMD51 is 24MHz and the ILI9341 will work at that rate, so set the frequency in your setup file to that value. Online documents indicate there is a CPU clock boost mode that increases the CPU clock from 120MHz to 200 MHz but I do not know if this is supported by the Arduino environment or whether this impacts the maximum SPI clock rate. |
Beta Was this translation helpful? Give feedback.
-
The fillRect in the sketch completes in 5ms this indicates a 12 Mbps data rate. It may be that you are already using a 24MHz SPI clock and that the Arduino board library SPI calls are slowing the achievable rate to 12MHz, in that case the only option is to try boosting the CPU clock. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using this library on an Arduino WIO.
I'm displaying a few (sometimes rapidly) changing values on the WIO screen in size 4 font.
Whenever a value changes, I overwrite the previous in white color font and the new one in black color font. (This is faster than drawing a white rectangle over the previous field)
I understand from the .h file, that this library is also optimized for small-size environments and only has the 2-size font loaded, while the 4-size (and larger) fonts are RLE to save space and rendered only if needed.
I'm now looking for improved performance, space for fonts is not a problem. My perf problem is that the WIO is too long busy updating TFT.
A simple solution (for me) would be to have the 4-font loaded, or even just the numbers 0-9 preloaded. Or cached or whatever.
Is there any way for a library user to do this?
Below an extract of the section of the .h file that defines size 2 and 4 fonts.
Thanks for any advise
Beta Was this translation helpful? Give feedback.
All reactions