Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] SPI interface ESP8266-12e and ILI9341 3.2" 320 x 480 display

Status
Not open for further replies.

wogoos

Member level 2
Joined
Apr 20, 2010
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,909
Dear readers
I am working on a home automation controller and want to use a display with an ILI9341 controller. These controllers are having a library at github. You can find it here. . A picture of the display is found below the orange PCB.
In the header file of the the library i found that for the ESP8266 the following signals are defined : _cs, _dc, _rst, _mosi, _miso, _sclk these are the signals you find at the 2.2" orange display header.
I want however **broken link removed** based on the same controller. The blue PCB picture below shows this display. The header is different compared with the header of the orange. This is also the case for the signal naming. My problem is to identify the corresponding signals at the blue header. A picture of this header is added below including a picture of the display.
My question is there any one who has experience with this SPI based display and can you help me identifying the cs, _dc, _rst, _sclk signals at the yellow header of this blue display.
Thanks for your help.
Oscar Goos

ILI9341 2.2inch display.jpg ILI9341 display 3.2.jpg ILI9341 display 3.2 02.jpg
 

Hi,

Read the documentation. Without it you won't bring the display to operate.

You can clearely see MOSI and MISO, surronded by f_cs, VDD, GND, clk, t_cs.
I assume these are the libes you need.
Maybe t_cs is for touch controller.

Klaus
 

Hi,

Read the documentation. Without it you won't bring the display to operate.

You can clearely see MOSI and MISO, surronded by f_cs, VDD, GND, clk, t_cs.
I assume these are the libes you need.
Maybe t_cs is for touch controller.

Klaus

Thanks Klaus, your correct I did notice these signals but I cant relate them to the signals as mentioned in the header file, _cs, _dc, _rst, _mosi, _miso, _sclk. MOSI en MISO are clear to me the others are trial and error. To do that I decided to see if someone on EDA knew more about it. Thanks for the response so far.
 

For the blue PCB display UTFT and UTouch libraries will work.
 

For the blue PCB display UTFT and UTouch libraries will work.
Thanks for your reply. Can you tell me what SPI mode this Display works and which display pin I connect with what ESP-12e pin, I preferably use a 3 Wire SPI interface.
Thanks
 

I can see that SPI lines are mentioned at the yellow header. Post a high resolution image showing just the yellow header and the table showing pin details. I will then mark the SPI pins and post it back.
 

I can see that SPI lines are mentioned at the yellow header. Post a high resolution image showing just the yellow header and the table showing pin details. I will then mark the SPI pins and post it back.
This is touch screen SPI. Not related to ILI9341 anyhow.
He should read the manual for ILI9341. SPI pins shared to DBxx pins.
 

Dear readers
I am working on a home automation controller and want to use a display with an ILI9341 controller. These controllers are having a library at github. You can find it here. . A picture of the display is found below the orange PCB.
In the header file of the the library i found that for the ESP8266 the following signals are defined : _cs, _dc, _rst, _mosi, _miso, _sclk these are the signals you find at the 2.2" orange display header.
I want however **broken link removed** based on the same controller. The blue PCB picture below shows this display. The header is different compared with the header of the orange. This is also the case for the signal naming. My problem is to identify the corresponding signals at the blue header. A picture of this header is added below including a picture of the display.
My question is there any one who has experience with this SPI based display and can you help me identifying the cs, _dc, _rst, _sclk signals at the yellow header of this blue display.
Thanks for your help.
Oscar Goos

View attachment 132821 View attachment 132822 View attachment 132823

Hi all, I'm a little further with my investigation on Display interfaces. Something I didn't know and know now is that a display module exist oftenly out of three functions: a display controller a Touch screen controller and and Serial data memory controller. If you want to access these three you need to address the three individual interfaces. The capability of the controller determines the type of interface.
A ILI9341 display controller supports various interfaces selected by IM[0..3] hardware signals. SPI mode0 is one of them but parallel is also sported. it depends on the implementation of the IM[0..3] bits how the controller expects its command data.
A XPT2046 touch screen controller works with a SPI interface.
An SD card it self has an SPI type interface and doesn't need much external control other than a chip select.
Conclusion: Technically it is possible to have all interfaces implemented based on SPI but this depends on the settings of ILI9341 IM[0..3] bits.
Now about the cards that I want to use:
This card has a 34 pin header. Checking on various sites I found two sites who describes these headers in reasonable detail but each in a different way. The sites are : geeetech wiki 3.2TFT_LCD and aliexpress 3.2inch 320x240 Screen Touch SPI LCD ILI9341 TFT
Summarising what these sites explain I depicted in the picture below

The table named pin naming 01 is from the PCB at aliexpress, table Pin naming 02 and 03 comes from geeetech wiki. Table 02 and 03 are copied from geeetech wiki exept for the DB00..15. At geeetech wiki the the counting of databits is weird because DB09 is missing and counting stats at DB01 and stop at DB017. In the tables I have assumed that this must be DB00...DB16.
Table #03 is according to me the correct naming and shows clearly the Touch, SD memory SPI interface and a SPI or parallel TFT interface. The website ali express gives a strong impression that the interface is SPI but i have my doubts so I'm gone contact the seller.

If any one sees incorrect information or can add info that better understand TFT memories please feel free to help me on this. I hope it helped other who are struggling with TFT interfaces
regards
 

Pin no 1, 30, 32 and 34 are the SPI lines for the TFT. For Touch screen it is different.
 

Hi all,
I have finished my first part of my project regarding a display. I decided to start with a MCUfriend 3.5" ILI9488 display sticked on a arduino duemilanuevo module. After having found the right libraries I got it to work and after investigating the code I decided to write a peace of code that can send commands to the display and displays the send values. This means the code generates a certain layout on the TFTscreen but values come in over the Tx Rx interface. The picture below is the result showing a layout for monitoring various electric parameters of various resources like battery, PC panels and grid.
I used the following libraries
Code:
#include "Adafruit_GFX.h" // Hardware-specific library
#include <MCUFRIEND_kbv.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>

One of the problems I had was overwriting the text on a GLCD display with a new text. For some reason there is no function that allows me to overwrite text on a GCLD meaning removing the old text and have it replaced by a new text. I tried the tft.setTextColor(c, bg); function but for some reason the gb color didn't work. I don't know if this is and error of that library. I did manage to implement the function by first overlaying the text with a rectangle with the same gb color as the screen and followed by the new text. That eventually worked.
An other weird phenomenon I had was use of colors. I copied the predefined 565coded colors form and other demo program there were
Code:
// Predefined 565 Colors
#define	BLACK		0x0000
#define	BLUE		0x001F
#define	RED		0xF800
#define	GREEN		0x07E0
#define CYAN		0x07FF
#define MAGENTA		0xF81F
#define YELLOW		0xFFE0
#define WHITE		0xFFFF

For some reason I need to use color BUE to have YELLOW letters on the screen. For the backround I used CYAN to have a RED color. Every thing seem to work right but from my perspective I conclude that the Color codes are correct but the naming are mixed up. However this table is from a standard demo code that is used million of times so is this this and error in the demo code or is there a problem with my HW/SW. A YouTube video with a similar set up shows the right colors, the only difference I use a duemilanove and the video uses a Arduino UNO. I haven't figured this out yet what the issue is.
If some one can tell me why this tft.setTextColor(c, bg); function is not working regarding background collor (bg) or what my color problem is help is appreciated.
Total code use is around 27700 KB so I have 10% left over for some other nice features.

DSC02970.JPG\
 

For some reason I need to use color BLUE to have YELLOW letters on the screen. For the background I used CYAN to have a RED color
You need Green and Red (background) to make Yellow. Cyan is a bluish-green color. Is the code for the colours correct?
 

For some reason I need to use color BLUE to have YELLOW letters on the screen. For the background I used CYAN to have a RED color
You need Green and Red (background) to make Yellow. Cyan is a bluish-green color. Is the code for the colours correct?
I meant to add that it looks like the red and the blue are swapped over.
 

Hi,

Then only: white, black, green is correct, all others are wrong.
But you only said yellow and blue (which makes no sense to me)

Maybe 1 and 0 are swapped (inverted)
What coding is used: 5-6-5 or 5-5-5?

Klaus
 

Hi,

Then only: white, black, green is correct, all others are wrong.
But you only said yellow and blue (which makes no sense to me)

Maybe 1 and 0 are swapped (inverted)
What coding is used: 5-6-5 or 5-5-5?

Klaus

Hi klaus, Thanks for your response,
No all colors work but their names seem to be mixed up. The videos show the same program with the same 3.5 ILI9488 module but with the correct colors. The only difference I have is that I work with and arduino DUEmilenuovo instead of a UNO. Pin wise these modules are the same with the same processor ATMega 328. So I cant explain this phenomenon. According the libraries the color coding is 565, and i used the same libraries and color code table as used in the demo software shown in the video.
Hope you can give some other suggestion to check out.
regards Oscar
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top