2.4 inch ILI9341 display SPI connection with arduino nano 3.0

Hello.
I'm looking for ability to speed up connection between nano and display. By now I'm using LCDWIKI library and get slow refreshing rate which eliminating to use this configuration.
Display works as on vid:

Is there any ability to make display usable with nano 3.0 or I need to use some other CPU's ? (with HW SPI or else) ?
Shift level resistors - 10kOhms.

Your sincerely
Marek Wojciechowski

That is incredibly SLOW.

You can get a reasonable speed with the Nano but much better with an STM32 BluePill, BlackPill, Nucleo, ...
Or with a Teensy4.0

David.

I see there is a driver library for ili9341 and STM32F103C8T6 ...
Can i use this libs for run this lcds with touch screens ? (i need touch for my works)

thanks !

Hello.
I don't think Nano is not enough for 2.4 inch tft ILI9341 lcd driver.
I'm using Bodmer library GitHub - Bodmer/TFT_ILI9341: A fast Arduino IDE compatible graphics and fonts library including a driver for the ILI9341 based TFT displays. with Platformio.
w TFT_ILI9341.cpp changed SPI_CLOCK_DIVIDER from 4 to 2. (line 205) but not much increased speed of drawing. Voltage divider build on resistors as on page : https://www.instructables.com/Arduino-TFT-display-and-font-library/
See vid: Nano 3.0 with Bodmer library 2.4 inch tft Ili9341 (atmega 328p) - YouTube

Your sincerely
Marek Wojciechowski

Your video shows typical performance for a 16MHz ATmega328P.

TFT_ILI9341 should be fine.
There are many other ILI9341 SPI libraries.

Your projects will run fast enough. But if you seriously require faster operation, use ARM or ESP32/ESP8266 boards.

Bodmer supports ESP and STM32 with his TFT_eSPI library (which will impress you)

David.

ILI9341_due could work with that combination

TFTLCDCyg:
ILI9341_due could work with that combination

Yes, impressive docs :slight_smile: I have to implement it.

I suggest that you look at GitHub - cbm80amiga/ILI9341_Fast: Fast ILI9341 Arduino library optimized for AVR
He comes from Warsaw and has some good projects too.

I have always assumed that Marek Buriak came from Poland. But he might live in Ireland.
Incidentally, ILI9341_due runs on both Uno and Due. Obviously the faster performance comes with the Due.

David.

David.
Thanks for adv Marek Buriak library.
At first sight both are using dedicated registers for ili9341 so where is diff ? Time, optimizing ?

Your sincerely
Marek Wojciechowski

I suggest that you run all the examples that come with each library.
See what they can do.

Write your own project that uses one of theses proven libraries.
From memory, they both use conventional GFX graphics but have more advanced text handling.

You can port most GFX-style projects fairly easily.
The Porting process will give you good experience in using libraries.

I suggest that you don't worry about how these libraries work until you have experience and confidence in just using them.
By all means study their source codes. And ask questions. But only when you have experience in their use.

Actually, the ILI9341 controller is pretty easy to use. e.g. write commands to control registers, write pixel data.
However the AVR Nano can only handle this sequentially (and at limited speed).
ARM and ESP can write using DMA (and as fast as the ILI9341 can receive). And process your application logic at the same time.

David.

Sometimes we resort to small-format plates, thinking of a minimalist project. It is also true that the cost and immediate availability, leads us to get what we have at hand.

But when it comes to putting the pieces together and seeing the result, we inevitably look for a little more performance and we have to rethink everything again. We repeat the process ... but this time thinking about whether a library will help us see what we want.

MCU AVRs are very good to learn, but when it comes to getting serious, if we don't master their secrets, we get stuck and look at ARM in some of its flavors.

If you are looking for minimalism and speed, from my point of view there are teensy 4, teensy 4.1, and some STM32: F407, F429, F746 or F767

With AVR and with optimizations in the library you will not see more speed than the one proposed in the optimized libraries suggested here.

Thank You guys for great replying.
I've took nano because project is minimalistic. I need to prepare ozone generator countdown timer. To do it I don't need to use platform as arm64 which is in my scope too (Jetson nano). I need intuitive controlling panel for working time of some devices as pumps, generators or fan. That's it without any fireworks.

Your sincerely
Marek Wojciechowski

The library should be giving much better performance than that with a Nano. If you run the graphics test the results should be similar to column 3 for an ILI9341 display.

This table is here.

It looks like you are running with a very slow SPI clock rate. Run at 8MHz.

Ah, I see you are already using the refeenced library in post #3 so that is the best performance you will get.

The fonts are optimised for Nano type processors so try the other examples. The trick is to only update the parts of the screen that change.

For example an UNO (same processor and a Nano is driving this ILI9341 display.

Decide what you wish to display and try it on the Nano, you can then port the sketch to a faster processor if you need to.

Guys.
I'm using div 2 for clock divider so maybe there is some other parameter to change to speed it up. I don't know.
I've started with wrong tutorial to connect ili9341 to nano 3.0.
Take a look at https://mytectutor.com/2-4-ili9341-tft-touch-screen-with-arduino/ . It was as stick in wheel !!!!
On this page is recomended to use 10KOhms resistors for shift lever from 5V to 3.3V. Hm it doesn't do it and Nano is working with ili9341 on 5V signals level ! Everything works fine correctly to set up SPI on 3.999.999 Hz clock for SPI as highest value. Over this value (using 10KOhms resistor without drop down line to GND over 1k2 resistor) I was not able to use DIV4 or DIV2 parameter in Clock divider for SPI. Because of overvoltage on signals ?
Sorry for indolence in this case : when I've measured voltage using 10KOhms resistor I've got 5V. Normal state. There is no dividing !!!!! Kirchoff's rules broken.
Question is : ILI9341 is able to work with 5V signal level but on low SPI conection speed ?
Cbm80amiga library I have found counterdown timer almost fully suitable for my purpose LowPower Arduino Countdown Timer with HX1230 LCD - YouTube. I would like to implement it on ILI9431.
About ILI9341_due library. I can not find it on Platformio repositories for libraries. By now I'm not fluent wih Platformio. Maybe it is good to implement this library on Platformio beside of Arduino IDE ?
About Bodmar libraries : can I get links to full documentation of functions (with some examples if it is possible) ?
About meters example, it runs on my nano : Meters by Bodmer library ILI9341 with atmega 328p (Nano 3.0) - YouTube

Your sincerely
Marek Wojciechowski

If you go the minimalist way I think of two suggestions, the teensy 4.1 is 3.3 V you just have to connect your ILI9341 directly, if the nano is still in your mind despite its speed, build the voltage dividers with SMD resistors:

Nice picture! Did you ever try with a hot-air gun? or are the SMD resistors blown away?

Good suggestion, but my last hot air gun was lost a few months ago at move-in. I hope to get a replacement soon, as it is badly needed.

SMD resistors were an experiment as I ran out of CD4050BE and wanted to experiment with some SMD resistors.

PD: A thousand apologies for how disastrous the welds look XD, lately I'm not very fine with the soldering iron

I am looking for a robot or a surgical kind of manipulator to help me with soldering. :slight_smile:

My hot air gun still waits for me to practice these kind of tasks; I even bought a SMD kit for practicing. But buying things is not enough.

And I hope someone will create an affordable kind of 3-D printer for PCBs (additive PCB creator).

Does anyone have some input or ideas?

Jean-Marc

I'm decided to use libraries as below:

for as simple as it can to write code (and squeeze all inside small atmega328p memory).
Code is here :

How it works :

I have question

  • how can I minimize flickering mostly on set up time menu ?
    I was not digging so deeply into Bodmer library so maybe You have suggestions for me ?
    It is still evaluation version of this timer, I have o implement + - buttons.
    By this I have next one question;
    is there any library for inc or dec controlling + button and - button (setting time). Dynamicly changing speed of inc/dec values depends on how long is active state on button ?

Your sincerely
Marek Wojciechowski
Using Superbutton library I can simple operate buttons to receive button's single double or longer state.