system
September 30, 2014, 4:36am
1
Hi Guys.
I just got three screens from buydisplay.com . I want to test them all. However i want to start with 2.4 inch TFTM024-3 display. On their website they have provided C sample code and also the schematic diagram.
ER-TFTM024-3 is 2.4"tft lcd touch shield qvga 320x240 dots,ili9341 controller,available for touch panel controller,sd card slot,font chip,flash,serial+parallel.
Price: USD 8.6
I want to use the screen with 4-wire SPI interface (which the screen supports). However i cant seem to understand why so many wires are needed (as per their schematic) for a 4-wire SPI
Schematic:
Has anyone used these screens before who can help me understand how to use them?
I want to use Arduino Mega to interface them.
They have interfaced a Font chip as well. How to use that too?
MarekB
September 30, 2014, 9:41am
2
From a brief look I think you only need these pins connected to Arduino if you just want to display stuff (somebody correct me if I am wrong):
RESET
LCD_/CS - chip select
D/C(SCL) - clock
/WR(D/C) - data/command
LCD_SDA
and I assume also BL_ON/OFF to control the backlight (if you want to control it programatically).
The others are for SD card, Touch screen, Flash memory and Fonts.
system
September 30, 2014, 6:44pm
3
Thanks MarekB. I will hook it up soon.
There is one more little hiccup. Seems that the TFT runs off 3.3 volts where as Mega provides 5.
How to connect them together? Is it possible that the TFT drains enough amps to kill my mega?
Using a few resistors can work or do i need a proper regulator IC?
elac
September 30, 2014, 7:37pm
4
Mega has 3.3V out, and you can use a CD4050 or similar for data lines.
system
October 1, 2014, 5:52pm
5
I just tested, Mega sends 5V with digitalWrite() command.
Can it be that i add a few resistors in line between the Mega and the screen to drop 1.7V ? Like this:
5V ==== 3.3V
Where ==== is a resistor, something like 340 ohms?
elac
October 2, 2014, 4:16pm
6
Resistor in series no, but you can try a voltage divider circuit.
The Mega has a 3.3V pin to power the screen, and try the voltage dividers on the data lines.
Best best is use an IC.
system
October 11, 2014, 11:14am
7
I have solved the voltage issue with the IC 74HC4050
It converts the 5v signal to 3.3v which is what i need in order to operate the Display.
However after hooking up everything (like 2 dozen wires) the display doesn't show up anything. Only the backlight works.
Can someone please help me. This is very frustrating
Here is the display library i ported attached and the Arduino Mega program
I have tried uncommenting different sections of the code but i am unable to get even a dot on the screen.
This is the screen i am using QVGA 2.4"TFT LCD Touch Shield 320x240 Serial Module Display,ILI9341
TFT_9341TP.h (140 KB)
tft_2_4_test.ino (614 Bytes)
MarekB
October 11, 2014, 8:15pm
8
I would say that most probably you hooked up something wrong.
system
October 12, 2014, 1:12am
9
I have hooked the wires
RESET
LCD_/CS - chip select
D/C(SCL) - clock
/WR(D/C) - data/command
LCD_SDA
Made a PCB out of it. So its very less clutter now.
I was thinking maybe there is something wrong in the code i have ported?
system
October 12, 2014, 10:23am
10
Ok so i am able to run the Adafruit Library demo successfully.
These two libraries are required:
However, the screen is quite slow.
Here are the benchmarks from the graphics test example.
ILI9341 Test!
Display Power Mode: 0x0
MADCTL Mode: 0x0
Pixel Format: 0x0
Image Format: 0x0
Self Diagnostic: 0x0
Benchmark Time (microseconds)
Screen fill 29512200
Text 1556724
Lines 14790932
Horiz/Vert Lines 2420708
Rectangles (outline) 1544448
Rectangles (filled) 61271172
Circles (filled) 8769832
Circles (outline) 6463788
Triangles (outline) 4692276
Triangles (filled) 20305692
Rounded rects (outline) 3026052
Rounded rects (filled) 66769548
Done!
I have tried the Highly optimized ILI9341 (320x240 TFT color display) library - Page 3 Library but it doesn't compile. Perhaps it only works with some shields or Teensy 3.1 controller or something.
elac
October 12, 2014, 1:04pm
11
I could never get that library to work correctly either, gave up trying after using the modified Adafruit_ILI9341 library by KurtE.
system
October 12, 2014, 1:28pm
12
Thanks elac.
I actually did a quick run of the library and here are some of the benchmarks. Its actually slower than the original one:
ILI9341 Test!
Display Power Mode: 0x0
MADCTL Mode: 0x0
Pixel Format: 0x0
Image Format: 0x0
Self Diagnostic: 0x0
Benchmark Time (microseconds)
Screen fill 29776760
Text 1571968
Lines 14936656
Horiz/Vert Lines 2436816
Rectangles (outline) 1554964
Rectangles (filled) 61819400
I have started a new thread as this one is actually solved and going in different direction. Please kindly reply there, thank you.
Link to the latest thread : ILI9341 slow on arduino - Displays - Arduino Forum