The most important tutorial resource for ILI9341, and any other TFT display is the Datasheet for the controller.
Eventually together with circuit diagram for the display module, and the board assembly.
Even if you use a ready-made development board with integrated display,
do not assume that members that may be willing and able to help,
have the same board, or remember the connection diagram without reference.
Please be specific, and identify the precise board design with circuit diagram,
or link to the product webpage for the board design, not just 'some Adafruit board'.
Unlike Display controllers for Alphanumeric Character LCD display, Display controllers for TFT displays are different
Display controllers for Character LCD displays are all clones of the same Controller Hitachi HD44780,
and have the same Command set, and are generally software compatible.
They may be different in some timing specifications, or in the character set that is builtin.
Display controllers for TFT display, have different Command set, even when they may be able to perform the same functions, or use the same communication interfaces.
Also, there are many more commands and options, so getting it to work by random experimentation is usually hopeless.
Although many display controller types may have Reset default settings that may work,
there are many more control registers, which may have settings for Display Clocking and format,
Oscillator or PLL configurations, Color representation, LCD Voltage settings and adjustment,
and Gamma correction settings
Although the ILI9341 display controller may support 8 bit, 16 bit, or 18 bit Parallell interface, in several different ways, and also SPI interface. It have 4 Mode bits that may be hardwired in the display module,
or on the development board. You have to know how this is configured on the board you are using.
Establishing communication between Microcontroller and Display Controller, is some times the biggest challenge in getting the controller to work.
When you are able to display One pixel, there is feedback telling wether you are doing right or wrong.
Rather than trying to embark on a long sequence of display commands, that may, or may not succeed in displaying something,
I prefer to try to Read a single Control register, to confirm whether communication is possible.
I try to Read the Device Identification register, before anything else.
Then try to Read, Write, and Read a single control register to verify communication.
As far as I can remember, all Command codes to ILI9341, is transferred as 8 bit commands,
even if 16 bit parallel transfer is used for Color Data.
8 bit Commands may be transferred using PORTE , by writing directly to LATE register,
and toggling the PMRD -> RD, PMWR -> WR, LCD_RS -> D/C, and LCD_CS# -> /CS signal lines,
even without setting up and Enabling PMP peripheral. If hardware is connected in any sensible way,
and Port SFR registers are is set up correctly.
There is driver code for ILI9341 Display Controller with PIC24 or dsPIC33 microcontrollers in:
MLA v2017_03_06, and probably in any later versions, and possibly in some earlier versions also.
the latest version is v2018-11-26
Or the archive webpage: https://www.microchip.com...pplications/mla-legacy
post edited by Mysil - 2020/12/26 01:46:45