ili9325 tft lcd touchscreen display module quotation
We’ve done quite a number of tutorials on the use of several displays with Arduino boards and today we will add another tutorial to that list. We will look at the ILI9325 based 2.8″ touchscreen display shown below and how it can be used with the Arduino to deliver a better user experience for your projects.
For today’s tutorial, we will use the ILI9325 driver based, 2.8″ display from Geekcreit. The display comes as a shield so it’s ready to be used for Arduino based projects. It is an 18-bit color display with a total of 262,000 different color shades. The display has a resolution of 240 x 320 pixels with individual pixel control.
Today’s project involves some very simple tasks which we will use to demonstrate the capabilities of the display. We will create a button which when touched, will trigger the Arduino to display a message on the screen. At the end of today’s tutorial, we would have gone through how to create a user interface on the touchscreen, how to detect when the screen is touched and how to display data on the screen.
The 2.8″ TFT display used for this project comes as a shield with the form factor of the Arduino Uno. This makes it easy to connect the shield to boards like the Uno, Mega and Due, as all we need to do, is plug it directly into the board, eliminating all the mess made by wires. Plug the display to the Arduino as shown in the image below.
The fact that the display comes as a shield becomes a disadvantage when its used with the Arduino Uno as it occupies almost all the pins leaving just 2 digital pins and one analog pin for other uses. This can however, be overcome by using either the Arduino Mega or Due as they both work perfectly well with the display.
The code for this tutorial is heavily reliant on a modified version of Adafruit’s TFT LCD,GFX and touchscreen libraries. These libraries can be downloaded from the links attached to them.
As mentioned earlier, our focus for this tutorial will be to demonstrate, how UI can be created on the display and interpret touches to trigger actions. To achieve this, we will develop a simple sketch which displays a Youtube subscribe button. When the subscribe button is pressed, a text is displayed on the screen.
Calibration needs to be done before the touchscreen functionality of this display can be used. To calibrate the screen, we upload the code and Open the Serial Monitor to obtain the values of the display’s edges. Click (touch) on the top left corner of the display and write down the X and Y values displayed on the serial monitor. Then we edit the code to reflect those values. The X value goes to the TS_MAXX variable and the Y value goes to the TS_MAXY variable. Next, click on the bottom right corner of the display and enter the values displayed on the serial monitor for the TS_MINX and TS_MINY variables. With this done our display is now calibrated and ready for use.
Next, we declare the colors to be used with their hexadecimal values and we create an object of the Adafruit TFTLCD library, indicating the variables used to represent the pins of the Arduino to which the display is connected.
We start by initializing the serial monitor and the display. After this, we set the orientation of the LCD and fill the screen with a black color to serve as the background.
next, we draw a white frame on the display, set the text cursor to the desired location, change its color to white, and print the “Hello” text on the screen. By following the same procedure, we display the red YouTube text as well.
With the setup function all done, we move to the loop function, the algorithm in operation for the loop section is simple, each time the user clicks on the screen, we convert the point coordinates of the touch point into pixels using the Map function. After conversion, if that point is inside the red rectangle area, it means that the user has pressed the button, so we disable the button by setting this variable to false and we clear the screen so to display the “Thank you for Subscribing” message on the screen.
Copy the code above and create a new Arduino sketct. Ensure the libraries are installed and upload the code to the setup described under the schematics section. Once the upload is complete, you should see the display come up as shown below.
Arduino library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc - GitHub - adafruit/TFTLCD-Library: Arduino library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc
The provided display driver example code is designed to work with Microchip, however it is generic enough to work with other micro-controllers. The code includes display reset sequence, initialization and example PutPixel() function.
Please see the DT028CTFT for reference designs. The schematics between the A and the C are the same with the exception that the A does not have the IPS interface.
This is a multicolored TFT LCD display with touchscreen and on-board SD card socket and 74HC245D. It is based on the ILI9325 controller and also compatible with ILI9341. This 2.4” TFT LCD Touch module is compatible with Arduino UNO and Arduino Mega boards and also works with Chipkit UNO32 and Simplecortex boards, since it can be operated at 3.3 V or 5 V.
This graphic display module is a 2.4" diagonal, full color TFT. Suitable for embedded applications, it is low-power, uses a white LED backlight, and has an integrated touch panel which has its connection brought out to the main TAB connector for the display.
It has an on-board controller and 3v single voltage for supply and logic (backlight not included), so you can easily use any modern microcontroller to interface with this display. It uses an 8 or 16 bit parallel interface, specified via connections to the display.
The connector on the CFAF240320K-024T-TS is a flex tail mated with a "COG" (chip on glass) display construction. This style of connector is designed to be soldered directly to corresponding pads on your PCB by using a hot-bar soldering machine. High volume contract manufacturers will be familiar with this type of construction and its assembly methods. There are hot-bar soldering machines made that are designed for prototype, rework or repair work of TAB connections.
I have been running into problems when I wanted to actually display something on the screen using TFT LCD library (https://github.com/adafruit/TFTLCD-Library) (and the GFX library (https://github.com/adafruit/Adafruit-GFX-Library))...
Connect the seventh pin RST (Reset) to the Arduino Reset line. This will reset the panel when the Arduino is Reset. You can also use a digital pin for the LCD reset but this will save us a pin.
(to try this I had to disconnect the touchscreens x,y analog connections because I had those on the same pins, will reroute those once the screen works)
Adafruit is also selling a shield version of you display and I think you can use this to verify you pin assignment. With this: https://github.com/adafruit/TFTshield/blob/master/schem.png
Something I noticed concerning screen rotation and touch sensitivity is that if you rotate the display orientation, the touch sensitive parts DO NOT rotate along.
In case anybody else needs it, below you can find the code I used to remap the X and Y coordinates of the touchscreen to the same orientation/dimensions of the display itself:
I just got my teensy3 displaying the graphicstest on my LCD. Your description here of how to do it was just fine, though it took me a couple of tries to get the wiring right (my fault, though)
I got this going as well thanks to your guidance. While I was fiddling with the pinouts etc. in pinmagic, I did a couple of other things, in Adafruit_TFTLCD:
inline Adafruit_GFX& operator() (uint8_t x, uint8_t y,uint16_t c) {setCursor(x,y); setTextColor(c); return *this;} //use along w Streaming.h to support: tft(col,line,color)<<"a="<
inline Adafruit_GFX& operator() (uint8_t x, uint8_t y,uint16_t c,uint8_t s) {setCursor(x,y); setTextColor(c); setTextSize(s); return *this;} //use along w Streaming.h to support: tft(col,line,color,size)<<"a="<
http://www.ebay.de/itm/New-2-4-inch-TFT-LCD-Module-display-240-x-320-Screen-ILI9325-with-touch-pen-/281090515728?pt=UK_BOI_Electrical_Components_Suppl ies_ET&hash=item41724ce310
They are not using the current library, as you guessed. I tried patching pin_magic.h with the teensy 3 mods, but more is required for the current TFTLCD library. The library now supports DUE, and the constructor does a lot of work mapping the control pins into port register access for set/clear operations. Maybe the teensy equivalent would be to use
And I measured 32.7ma at 3.3v for the TFTLCD, so I powered it from the teensy 3 3.3v pin. This is on older Adafruit TFTLCD, http://www.adafruit.com/products/335
OK, maybe I"m confused, but does that library drive the Adafruit display in 8-bit mode (as described at https://learn.adafruit.com/adafruit-2-dot-8-color-tft-touchscreen-breakout-v2/8-bit-wiring)? The TFTLCD library has the disadvantage of needing more pins, but my impression was that it could achieve a higher throughput of data to the display, or am I mistaken in that as well?
Well, this is awkward. I had a 2.8" ILI9325 screen from Adafruit working on a Teensy 3.0 a couple of years back. I just tried to rebuild the code for that and I seem to have lost some files. Specifically I"m looking for the right Adafruit_TFTLCD library (well, I think that"s all I"m looking for). The current library from Github doesn"t compile with a Teensy3, and I recall I had to edit the pin_magic file as per ZTiK.nl (earlier in this thread). But the later files from Github look different now. I don"t seem to be able to go back to an earlier branch on Github.
I can see Paul has posted an ILI9341_t3 library, but mine is an ILI9325. Has anyone got a working copy of the library that works with my combination posted somewhere? I"d rather not upgrade the hardware at this stage, the problem I have is software.