Arduino.ru
ITDB02 Arduino Mega
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
Надеюсь поможете с решением проблемы.
Использую Ардуино мега 2560, и через ITDB02 Arduino shield V2.0 from ITEAD подключаю ITDB02-2.4E TFT LCD module with touch. Использую код
и в который раз вижу белый экран. В чем проблема?Кто сталкивался
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
1 ты уверен что у тебя именно этот контроллер дисплея?
2 проверь соответствие пинов UTFT myGLCD(ITDB24E_8,38,39,40,41); фактическим нарисованным на плате
3 скорее всего дисплей китайский и нужно подбирать контроллер и пины настраивать
4 поробуй использовать управление через SPI или i2c не помню какой читай в справке по бибилиотеке
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
1 ты уверен что у тебя именно этот контроллер дисплея?
А где на дисплее это написано?
Я методом тыка пробовал S6D1121_8,ILI9325D_8,ILI9325D,ILI9325C они не сработали
2 проверь соответствие пинов UTFT myGLCD(ITDB24E_8,38,39,40,41); фактическим нарисованным на плате
Через шилд у меня подсоединено к аналоговым A5,A4,A3,A2 менял не работают, смотрел datasheet ардуинки эти аналоговые соответствуют 92,93,94,95 пинам, тоже пробовал не работает
3 скорее всего дисплей китайский и нужно подбирать контроллер и пины настраивать
Arduino.ru
Подключение TFT LCD дисплея ITDB02-3.2 к Ардуино Мега 2560
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
Недавно приобрёл дисплей ITDB02-3.2 для arduino mega 2560 и плату-конвертер логических уровней TFT LCD
Mega Shield V2.2. Также установил библиотеку UTFT. Но при загрузке тестового скетча дисплей просто горит белым и ничего не происходит. Перепробовал кучу библиотек и вариантов решения проблемы, но ничего не помогло. Дисплей продолжает просто гореть белым. Помогите решить эту проблему.
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
Белый цвет экрана обычно говорит о том, что не было правильной инициализации дисплея.
Дисплей мало приобрести, его еще надо правильно подключить.
Увы, Вы забыли привести схему, по которой подключали, а потому помочь Вам вряд ли возможно.
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
это преобразователь уровней, а дисплей какой?
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
Перепробовал кучу библиотек и вариантов решения проблемы
Вот с этого места поподробнее. Какова схема подключения (выложите), какие библиотеки (ссылки), какой скетч (выложите), что именно пробовали (внятно, что делалось и каков был эффект).
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
В плату arduino mega вставляется шилд-конвертер логических уровней, а в него вставляется дисплей. Подключить по другому физически невозможно.
Использовал библиотеки UTFT, Adafruit_ILI9341, а также библиотеку LCD_ID_Reader для того, чтобы узнать, на каком контроллере работает этот дисплей.
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
это преобразователь уровней, а дисплей какой?
Вот, автор пишет же:
«приобрёл дисплей ITDB02-3.2»
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
Ermolov Slava прежде чем что то постить — прочитайте правила форума и вставьте код по правилам .
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
плату arduino mega вставляется шилд-конвертер логических уровней, а в него вставляется дисплей. Подключить по другому физически невозможно.
А во-вторых, если некоторый шилд-переходник рассчитан на вполне конкретное подключение, то это совершенно не означает, что именно это конкретное и есть правильное.
Другими словами, есть далеко отличная от нуля вероятность, что подключить этот дисплей через этот шилд можно только после доработки паяльником.
Так что могу посоветовать:
1. Прозвонить тестером шилд и составить табличку какие ноги Меги соответствуют каким сигналам дисплея.
2. Поковыряться в библиотеке и найти, какое соответствие между пинами и сигналами предусматривает библиотека.
3.2TFT LCD
Contents
introduction
HY-TFT320 is a 3.2 inch TFT LCD Screen module, 320*240 (resolution), 65K color, 34pins interface , not just a LCD breakout, but include the Touch screen, SD card. So it’s a powerful extension module for your project.
This Screen includes a controller SSD1289, it’s 16bit data interface, easy to drive by many MCU like STM32 ,AVR and 8051.HY-TFT320 is designed with a touch controller in it . The touch IC is XPT2046 , and touch interface is included in the 34 pins breakout. Another useful extension in this module is the SD Card socket . It use the SPI mode to operate the SD card, the SPI interface include in the 40pins breakout.
Application Ideas
- Digital Photo Frame (DPF)
- Video terminals
- Instrumentation
- GPS
- Game consoles
- Video phones and Portable VCD, DVD
Specification:
- 3.2″ Color TFT LCD
- 320 x 240 Resolution
- 65,536 Colors (16 Bit)
- Powerful 16 Bit Microcontroller(SSD1289)
- Built-in video RAM buffer
- Integrated Resistive Touchscreen
- Integrated SD card
- 5V Operating Voltage
- LED Backlight
pin difinition
example connections with arduino board:
Display:
The UTFT library is required to be installed to get this screen model display. This library is especially designed for 3.2” TFT LCD screen using 16 bit mode. The library require the following connections.
- Connect HY-TFT320 to Arduino Mega2560
- Connect HY-TFT320 to Arduino UNO
Note: The TFT controller model needs to be declared in the initializing statement. ITDB02 myGLCD(38,39,40,41) needs to be modified as myGLCD(38,39,40,41,ITDB32S) when using Arduino Mega2560.ITDB02 myGLCD(19,18,17,16,ITDB32S) needs to be commented when using Aduino UNO. Otherwise it just show a blank screen. In practice, RS, WR, CS, RSET can be connected to any free pin. But the pin number must be in accord with myGLCD(RS,WR,CS,RST).
Touch Screen:
The LCD has a 3.2″ 4-wire resistive touch screen lying over it. The Touch libraryneeds to be installed to get it works. This library is designed for 2.4’’ TFT, 3.2” TFT LCD screen module.
- Interface the touchscreen to Arduino Mega2560:
Default pin number in example code:
Note:TCLK, TCS, TDIN, TDOUT, IRQ also can be connected to any free pin. But the pin number must be in accord with the touch screen initializing statement myTouch(DCLK,CS,IN,OUT,IRQ).
Calibrate the touch screen: The default setting is accurate for 2.4” TFT module, but you need to calibrate when using 3.2” TFT module. A program to calibrate the touch screen is included in the example. If you touch screen is inaccurate, you need to run touch_calibration. Follow the on-screen instruction to calibrate the touch screen. Better not use your finger to calibrate it, use your accessory touch pen to pressure the frontsight with stength. Then record the calibration parameters and apply them in ITDB02_Touch.cpp in your touch screen library.
SD Card:
There is built-in SD card slot in the shield, so we can use it to upload images. But the images need to be converted RAW format first. SD libraries tinyFAT and tinyFAT_16 need to be preinstalled for displaying the image.
Note: The library only supports FAT16 fomatted SD card up to 2GB, so you need to fomat your SD card to FAT16. 4GB FAT16 fomatted SD card is tested not working. Long file names are not supported. Keep your file names compliant with 8.3 standard.
Interface SD card to Arduino mega:
Touch Screen and SD Card share the MOSI and MISO, and they are controlled through T_CS and SD_CS separately.
When T_CS is enabled,Touch Screen works;when SD_CS is enabled,SD Card works.
AVR Freaks
Arduino Mega 2560 And 2.8 ITDB02 Shield
I am really struck hard with integrating Arduino Mega 2560 board and 2.8 ITDB02 Shield.
The shield is connected to board such that the SD cad slot with it is on the USB connector side. I believe that shield is properly plugged in at least. The first 2 pins (on USB connector) of Arduino is not used
Now I am using ITDB02 library where the first thing I have to initialize the data pins and others:
So in my code I have something like below:
Further I have to initialize the touch screen PINS, which as per document:
I am a bit confused here about the PINS I have to use but as mentioned the TFT shield is connected properly to Arduino — my first aim is to print a char on screen — so:
I have commented it cause I understand that it is wrong.
Uploading the program does not displays simple text on screen — which makes me understand that the lcd() params are wrong:
Please let me know what should be my params fof the ITDB02::ITDB02(int D8,int D9, int D10,int D11, int D12,int D13, int D14,int D15,int RS, int WR,int CS, int RST) constructor and Touchpin(int tclk,int tcs,int din,int dout, int irq) methods — it has been two days I am struggling to find unfortunately the screen is not displaying any text out put.
I believe that if I have these two method rightly set my display function will print character cause above are the methods to initialize and use the TFT.
Arduino TFT Interfacing © GPL3+
By using this color TFT LCD shield, we can show characters, strings, button interfacing, bitmap images, etc. on the color TFT LCD.
Intro: Arduino TFT Interfacing
TFT touchscreens are the amazing graphical interface which can be used with microcontrollers such as Atmel, PIC, STM, as it has a wide color range, and good graphical ability and a good mapping of pixels.
Today, we are going to Interface 2.4 inch TFT LCD Shield with Arduino.
This shield is for Arduino UNO, but I’ll teach how to use it with Arduino Mega for a very logical reason, the «Program Memory».
By using this color TFT LCD shield we can show characters, strings, button interfacing, bitmap images, etc on the color TFT LCD.
Step 1: Hardware and Software Requirements
To make the shield interface with the Arduino mega, we need HARDWARE :
• TFT 2.4/2.8/3.2 inch LCD
• UTFT L ibrary / spfd5408 Library
The Shield is originally made for the Arduino UNO boards, which can be used with Arduino mega.
There is two main issue while using it with the Arduino UNO: «Storage memory» and pins usage.
It is difficult to use the unused pins which are available on UNO, whereas it is better with Arduino MEGA since we have more I/O pins left.
In the next step, I’ll show how to edit the UTFT library to use the TFT shield
Step 2: Tweaking UTFT Lib
This library is the continuation of my ITDB02_Graph, ITDB02_Graph16 and RGB_GLCD libraries for Arduino and chipKit. As the number of supported display modules and controllers started to increase I felt it was time to make a single, universal library as it will be much easier to maintain in the future.
Arduino MEGA has 256kb of program memory. In addition, there are 54 pins.
Most of them are free to use, and the analog just 5 are taken from 16.
This library supports a number of 8bit, 16bit, and serial graphics displays, and will work with both Arduino, chipKit boards and select TI LaunchPads.
NOTE:Due to the size of the library I do not recommend using it on ATmega328 (Arduino Uno) and ATmega32U4 (Arduino Leonardo) as they only have 32KB of flash memory. It will work, but you will be severely limited in available flash memory for your application.
Steps :
- Download the UTFT Library
- Unzip the Library
- Open UTFT\hardware\avr in case of Arduino or depending on the microcontroller used
- Open HW_AVR_defines using Notepad
- Uncomment Line 7 to enable UNO shield for MEGA
- Save the file and Add this Library to Arduino IDE
Now we are done with this step! In the next step, I’ll show to use the library and define the pins for Arduino Mega.
Step 3: Initializing the TFT Shield
- After editing the library, Add it to the Arduino directory.
Next, I’m gonna show you how to define the right TFT module that you have
we should find its module name in the library.
- open the library file
- go to the documentation
You can see these files in the Documentation
This file shows all the functions and commands that included in this library.
This file has the information about the modules and how it’s related to the library, like pins configurations
This is our target, this file has the names of the modules and shields that are supported by this library, you can see in it a list of module names and module names for the UTFT which you should use to define your module.
Steps to Define the TFT:
Open UTFT_Supported_display_modules_&_controller file from the library
- Open UTFT_Supported_display_modules_&_controller file from the library
- Find the Models for UTFT for the Modules (shield) which you have.
- Now to define a UTFT function on the Arduino IDE, we use the command :
UTFT name(module, Rs, Wr, Cs, Rst);
Open UTFT_Requirement file from the library
From the document, we know that the pins are located on the A5, A4, A3, and A2 pins.
we use the command:
UTFT myGLCD(ITDB28, 19, 18, 17, 16); # note that pins 19, 18, 17, 16 in the Arduino Mega
UTFT myGLCD(ITDB28, A5, A4, A3, A2); # note that pins A5, A4, A3, A2 in the Arduino UNO
And done! Now you can use the library examples on the Arduino IDE with the Following changes.