Go Down

Topic: UNO - shield MEGA - TFT 2.4" (Read 2535 times) previous topic - next topic

vidalv

Jun 10, 2014, 04:44 pm Last Edit: Jun 10, 2014, 05:55 pm by vidalv Reason: 1
Bonjour à tous, je voudrais utiliser un écran TFT 2.5" Sainsmart 240X320 (pas de références) livré avec un shield Sainsmart MEGA (sans ref aussi) le tout sur mon ARDUINO UNO. Acheter sur Amazon il est parait-il compatible. Si je branche le tout sur mon PC, le TFT s'illumine en blanc, j'ai cherché sur le Net sans succès et pour cause, le shield MEGA n'interface pas les même signaux sur le UNO, si quelqu'un à déjà fait l'expérience je suis preneur, si non quel shield dois-je utiliser avec ce TFT ? Merci. Vincent.

lolocaledo

Bonjour,
Quelles librairies utilises tu ?
Comment as tu déclarer ton TFT dans ton code ?


vidalv

lolocaledo, c'est bien ce que je voudrai savoir, il y a une multitude de codes sur le site Sainsmart, ceci étant j'ai eu une piste avec la boutique qui m'a vendu le kit,  il propose, sous ce lien : http://www.sainsmart.com/zen/documents/20-011-978/,  j'ai essayé le code et il y des erreurs, ou j'en fait, comme j'utilise un board ARDUINO UNO il y a une recommandation pour mettre des staps entre DB0 - DB7, sur la carte interface entre le UNO et l'afficheur TFT 2.4".   Peut-être mon setup n'est pas correcte, dans le fichier readme.txt il y a :
"1.Wire jumper cables of the CTE Shield to DB0-DB7
2.Put the UTFT folder into the IDE1.5.6 libraries folder. Then run IDE.
Open the File /Examples/UTFT/Arduino£¨AVR£©/UTFT_Textrotation_Demo.ino .  Download the ino file into the UNO ,Then reset the board  The graphics could be seen then."

J'ai mis 8 straps sur la gauche (opposé au trou) de la carte CTE, en suite j'ai chargé le code dans :
C:\Program Files\Arduino\libraries\IDE1_5_6\UTFT\examples\Arduino (AVR)\UTFT_Bitmap et voici une partie des codes erreurs :

In file included from UTFT.cpp:38:
/UTFT.h:151:42: error: hardware/avr/HW_AVR_defines.h: No such file or directory
UTFT.cpp:44:34: error: hardware/avr/HW_AVR.h: No such file or directory
UTFT.cpp:48:42: error: hardware/avr/HW_ATmega328P.h: No such file or directory
UTFT.cpp:81:25: error: memorysaver.h: No such file or directory
UTFT.cpp:342:42: error: tft_drivers/hx8347a/initlcd.h: No such file or directory
UTFT.cpp:345:42: error: tft_drivers/ili9327/initlcd.h: No such file or directory
UTFT.cpp:348:42: error: tft_drivers/ssd1289/initlcd.h: No such file or directory
UTFT.cpp:351:43: error: tft_drivers/ili9325c/initlcd.h: No such file or directory
UTFT.cpp:354:51: error: tft_drivers/ili9325d/default/initlcd.h: No such file or directory
UTFT.cpp:357:47: error: tft_drivers/ili9325d/alt/initlcd.h: No such file or directory
UTFT.cpp:360:44: error: tft_drivers/hx8340b/8/initlcd.h: No such file or directory
UTFT.cpp:363:44: error: tft_drivers/hx8340b/s/initlcd.h: No such file or directory
UTFT.cpp:366:41: error: tft_drivers/st7735/initlcd.h: No such file or directory
UTFT.cpp:369:42: error: tft_drivers/pcf8833/initlcd.h: No such file or directory
UTFT.cpp:372:43: error: tft_drivers/s1d19122/initlcd.h: No such file or directory
UTFT.cpp:375:42: error: tft_drivers/hx8352a/initlcd.h: No such file or directory
UTFT.cpp:378:46: error: tft_drivers/ssd1963/480/initlcd.h: No such file or directory
UTFT.cpp:381:46: error: tft_drivers/ssd1963/800/initlcd.h: No such file or directory
UTFT.cpp:384:49: error: tft_drivers/ssd1963/800alt/initlcd.h: No such file or directory
UTFT.cpp:387:42: error: tft_drivers/s6d1121/initlcd.h: No such file or directory
UTFT.cpp:390:42: error: tft_drivers/ili9320/initlcd.h: No such file or directory
UTFT.cpp:393:42: error: tft_drivers/ili9481/initlcd.h: No such file or directory
UTFT.cpp:396:42: error: tft_drivers/s6d0164/initlcd.h: No such file or directory
UTFT.cpp:399:42: error: tft_drivers/st7735s/initlcd.h: No such file or directory
UTFT.cpp:402:46: error: tft_drivers/ili9341/s4p/initlcd.h: No such file or directory
UTFT.cpp:405:46: error: tft_drivers/ili9341/s5p/initlcd.h: No such file or directory
UTFT.cpp:433:40: error: tft_drivers/hx8347a/setxy.h: No such file or directory
UTFT.cpp:436:40: error: tft_drivers/hx8352a/setxy.h: No such file or directory
UTFT.cpp:439:40: error: tft_drivers/ili9327/setxy.h: No such file or directory
UTFT.cpp:442:40: error: tft_drivers/ssd1289/setxy.h: No such file or directory
UTFT.cpp:445:41: error: tft_drivers/ili9325c/setxy.h: No such file or directory
UTFT.cpp:448:49: error: tft_drivers/ili9325d/default/setxy.h: No such file or directory
UTFT.cpp:451:45: error: tft_drivers/ili9325d/alt/setxy.h: No such file or directory
UTFT.cpp:454:42: error: tft_drivers/hx8340b/8/setxy.h: No such file or directory
UTFT.cpp:457:42: error: tft_drivers/hx8340b/s/setxy.h: No such file or directory
UTFT.cpp:460:39: error: tft_drivers/st7735/setxy.h: No such file or directory
UTFT.cpp:463:41: error: tft_drivers/s1d19122/setxy.h: No such file or directory
UTFT.cpp:466:40: error: tft_drivers/pcf8833/setxy.h: No such file or directory
UTFT.cpp:469:44: error: tft_drivers/ssd1963/480/setxy.h: No such file or directory
UTFT.cpp:472:44: error: tft_drivers/ssd1963/800/setxy.h: No such file or directory
UTFT.cpp:475:47: error: tft_drivers/ssd1963/800alt/setxy.h: No such file or directory
UTFT.cpp:478:40: error: tft_drivers/s6d1121/setxy.h: No such file or directory
UTFT.cpp:481:40: error: tft_drivers/ili9320/setxy.h: No such file or directory
UTFT.cpp:484:40: error: tft_drivers/ili9481/setxy.h: No such file or directory
UTFT.cpp:487:40: error: tft_drivers/s6d0164/setxy.h: No such file or directory
UTFT.cpp:490:40: error: tft_drivers/st7735s/setxy.h: No such file or directory
UTFT.cpp:493:44: error: tft_drivers/ili9341/s4p/setxy.h: No such file or directory
UTFT.cpp:496:44: error: tft_drivers/ili9341/s5p/setxy.h: No such file or directory
In file included from UTFT.cpp:38:
UTFT.h:200: error: 'bitmapdatatype' has not been declared
UTFT.h:201: error: 'bitmapdatatype' has not been declared
UTFT.h:220: error: ISO C++ forbids declaration of 'regtype' with no type
UTFT.h:220: error: expected ';' before '*' token
UTFT.h:221: error: 'regsize' does not name a type
UTFT.cpp: In constructor 'UTFT::UTFT(byte, int, int, int, int, int)':
UTFT.cpp:238: error: 'P_RS' was not declared in this scope
UTFT.cpp:239: error: 'B_RS' was not declared in this scope

etc ....

J'ai du nommé le répertoire IDE1.5.6 IDE1_5_6 si non impossible de charger la librairie.

je continue de voir ça.

Merci.

fdufnews

Quote
j'ai chargé le code dans :
C:\Program Files\Arduino\libraries\IDE1_5_6\UTFT\examples\Arduino (AVR)\UTFT_Bitmap

Il faut copier UTFT directement dans librairies.
C:\Program Files\Arduino\libraries\IDE1_5_6\UTFT\examples\Arduino (AVR)\UTFT_Bitmap

vidalv

En effet, avec le chemin UTFT ça charge, sauf que ça rentre pas dans mon UNO, "too Big" !!! Si non pour d'autre j'ai ça :
UTFT\UTFT.cpp.o: In function `UTFT::_hw_special_init()':
/hardware/avr/HW_ATmega328P.h:4: multiple definition of `UTFT::_hw_special_init()'
UTFT.cpp.o:C:\Program Files\Arduino\libraries\UTFT/hardware/avr/HW_ATmega328P.h:4: first defined here
UTFT\UTFT.cpp.o: In function `UTFT::LCD_Writ_Bus(char, char, unsigned char)':
/hardware/avr/HW_ATmega328P.h:6: multiple definition of `UTFT::LCD_Writ_Bus(char, char, unsigned char)'
UTFT.cpp.o:C:\Program Files\Arduino\libraries\UTFT/hardware/avr/HW_ATmega328P.h:6: first defined here
UTFT\UTFT.cpp.o: In function `UTFT::_set_direction_registers(unsigned char)':
/hardware/avr/HW_ATmega328P.h:95: multiple definition of `UTFT::_set_direction_registers(unsigned char)'
UTFT.cpp.o:C:\Program Files\Arduino\libraries\UTFT/hardware/avr/HW_ATmega328P.h:95:

etc ... Pas évident de trouver le bon sketch !
PS: J'ai enlevé les straps ça change rien.

fdufnews

J'ai compilé ce matin le sketch UTFT_Textrotation_Demo.ino et il était de taille correcte.
As-tu réussi à le faire tourner?

vidalv

Oui celui la compile et se charge, après appuis sur le reset écran blanc.
Je suis pas sur que le shield est compatible, sur un cote il y as des straps à souder,
JP1 à JP5 et seul JP2 et JP4 sont reliés.  Une idée la dessus ?

Go Up