Différences entre versions de « Ecran tactile 2.8" TFT »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 8 : Ligne 8 :
 
[[Fichier: TftTouch-Show.jpg]]
 
[[Fichier: TftTouch-Show.jpg]]
  
Spice up your Arduino project with a beautiful large touchscreen display shield with built in microSD card connection. This TFT display is big (2.8" diagonal) bright (4 white-LED backlight) and colorful (18-bit 262,000 different shades)! 240x320 pixels with individual pixel control. It has way more resolution than a black and white 128x64 display. As a bonus, this display has a resistive touchscreen attached to it already, so you can detect finger presses anywhere on the screen.
+
Agrémentez votre Arduino avec ce magnifique shield écran tactile de grande taille incluant un lecteur de carte microSD. Cet écran TFT est grand (2.8" de diagonale) lumineux (rétro éclairage à 4 LED super-brillantes), '''coloré''' (262.000 couleurs, 18 bits) et assignation individuelle de chaque point (pixel) des 240x320 pixels disponibles. Cet écran dispose d'une résolution bien supérieure aux affichages noir et blanc 128x64 beaucoup plus répandu sur le marche. En bonus, cet écran est déjà équipé d'un écran tactile résistif, vous pouvez donc détecter la pression d'un doigt partout sur cet écran.
  
The shield is fully assembled, tested and ready to go. No wiring, no soldering! Simply plug it in and load up our library - you'll have it running in under 10 minutes!
+
Ce shield est complètement assemblé, testé et il est prêt à l'emploi. Pas de raccordement, pas de soudures! Branchez le simplement sur votre Arduino et chargez la librairie AdaFruit correspondante - vous serez productif en moins de 10 minutes!
  
This display shield has a controller built into it with RAM buffering, so that almost no work is done by the microcontroller. The shield does require a lot of pins: 12 lines total for the display, 13 total if you use the microSD card
+
Cet écran tactile dispose de son propre contrôleur incluant sa propre une mémoire tampon (RAM buffering), le micro-controleur n'a donc presque rien à faire.  
 +
 
 +
Ce shield nécessite beaucoup de broches pour fonctionner: 12 pin au total pour l'affichage, et 13 si vous utilisez le lecteur de carte MicroSD (''voir la foire aux questions à ce sujet'')
  
 
[[Fichier: TftTouch-Back.jpg]]
 
[[Fichier: TftTouch-Back.jpg]]
  
Of course, we wouldn't just leave you with a datasheet and a "good luck!" - [https://github.com/adafruit/TFTLCD-Library we've written a full open source graphics library that can draw pixels, lines, rectangles, circles and text]. We also have [https://github.com/adafruit/Touch-Screen-Library a touch screen library that detects x, y and z (pressure)] and example code to demonstrate all of it. The code is written for Arduino but can be easily ported to your favorite microcontroller!  
+
Bien entendu, nous n'allons pas vous laisser avec une fiche technique et "Bonne Chance pour la suite" - [https://github.com/adafruit/TFTLCD-Library AdaFruit à écrit une librairie graphique open-source capable de dessiner des pixels(point), lignes, rectangles, cercles et textes]. AdaFruit fournit également [https://github.com/adafruit/Touch-Screen-Library un librairie tactile pour détecter les coordonées x, y et z (la pression)] ainsi que des exemples de code met en pratique tous ces éléments. Le code est écrit pour Arduino et peut être porté assez facilement vers votre micro-contrôleur favoris!  
  
 
Si vous voulez acheter cet article, [http://mchobby.be/PrestaShop/product.php?id_product=16 il est disponible chez MC Hobby].
 
Si vous voulez acheter cet article, [http://mchobby.be/PrestaShop/product.php?id_product=16 il est disponible chez MC Hobby].

Version du 13 juin 2012 à 06:41

Présentation

Quel magnifique produit que le "2.8" TFT touch screen shield" d'AdaFuit

TftTouch-Show.jpg

Agrémentez votre Arduino avec ce magnifique shield écran tactile de grande taille incluant un lecteur de carte microSD. Cet écran TFT est grand (2.8" de diagonale) lumineux (rétro éclairage à 4 LED super-brillantes), coloré (262.000 couleurs, 18 bits) et assignation individuelle de chaque point (pixel) des 240x320 pixels disponibles. Cet écran dispose d'une résolution bien supérieure aux affichages noir et blanc 128x64 beaucoup plus répandu sur le marche. En bonus, cet écran est déjà équipé d'un écran tactile résistif, vous pouvez donc détecter la pression d'un doigt partout sur cet écran.

Ce shield est complètement assemblé, testé et il est prêt à l'emploi. Pas de raccordement, pas de soudures! Branchez le simplement sur votre Arduino et chargez la librairie AdaFruit correspondante - vous serez productif en moins de 10 minutes!

Cet écran tactile dispose de son propre contrôleur incluant sa propre une mémoire tampon (RAM buffering), le micro-controleur n'a donc presque rien à faire.

Ce shield nécessite beaucoup de broches pour fonctionner: 12 pin au total pour l'affichage, et 13 si vous utilisez le lecteur de carte MicroSD (voir la foire aux questions à ce sujet)

TftTouch-Back.jpg

Bien entendu, nous n'allons pas vous laisser avec une fiche technique et "Bonne Chance pour la suite" - AdaFruit à écrit une librairie graphique open-source capable de dessiner des pixels(point), lignes, rectangles, cercles et textes. AdaFruit fournit également un librairie tactile pour détecter les coordonées x, y et z (la pression) ainsi que des exemples de code met en pratique tous ces éléments. Le code est écrit pour Arduino et peut être porté assez facilement vers votre micro-contrôleur favoris!

Si vous voulez acheter cet article, il est disponible chez MC Hobby.

Caractéristiques

  • Affichage LCD de 2.8" de diagonale (TFT)
  • Résolution de 240x320 points, couleurs 18-bits (262.000 couleurs)
  • Contrôleur ILI9325 (fiche technique - datasheet) ou ILI9328 (fiche technique - datasheet) incluant une mémoire vidéo tampon (RAM)
  • Interface digital 8 bits, plus 4 lignes de contrôle.
  • Utilise les broches/pins digitales de 5 à 13 et analogique de 0 à 3.
  • Ce qui signifie que vous pouvez utiliser les broches/pins digitales 2, 3 et analogique 4 et 5. La broche 12 est disponible si vous n'utilisez pas la carte microSD
  • Fonctionne avec un Arduino '328 (Mega pas encore supporté)
  • 5V compatible! Commandable avec une logique 3.3V ou 5V
  • Régulateur LDO 3.3V - 300mA intégré (Low-Drop Out = à faibles pertes).
  • Rétro éclairage à 4 LEDs blanches. Actif par défaut mais vous pouvez connecter un transistor sur la pin digitale pour contrôler le rétroéclairage.
  • Ecran résistif 4-fils

FAQ: Foire Aux Questions

Pourquoi utiliser l'interface parallèle?

I was just looking through the datasheet and I notice there is an SPI interface available. Why do you use the parallel interface? SPI would be better fewer pins! Even though the display driver supports SPI, we have not found any displays that could use it - the pins are simply not available on the display connector. Also, SPI would be incredibly, frustratingly slow for such a large screen. If you need an SPI display, AdaFruit propose également check out many of our other offerings, nearly all support SPI-like protocols!.

Comment accéder au broches libres?

All the pins are used! How can I connect anything to the Arduino??

We suggest using a protoshield (with stacking headers) or a proto-screwshield to access the unused pins (2, 3, and analog 4 and 5). You can connect various i2c sensors or analog sensors to analog 4&5. You can also connect an i2c port expander to get more I/O pins. If you desperately need more pins, and you're careful, you can use the 8 datapins while the TFT isn't being written to - they are high-z and unused as long as the WR and RD pins are high

Démarrer sans assemblage

Ce shield est vraiment facile à utiliser. Il n'y a qu'a le raccorder et c'est parti.

TftTouch-Snap.jpg

Because the TFT is exactly the same size as an Arduino, we preassemble the shield in the factory. To use, simply place it onto your Arduino. No wiring, no soldering!

TftTouch-Mega.jpg

Test du LCD

We have a library with example code ready to go for use with these TFTs. The library is not incredibly fast and optimized but its a good start and can easily be ported to other micrcontrollers. However, we'll assume you're using an Arduino

Visit our github repository and click on the Downloads button in the top right corner to download a zip of the library and examples. Uncompress the folder and rename it TFTLCD make sure that inside that folder is the cpp and .h files. Then copy it to your arduinosketchfolder/libraries folder. See our tutorial for more details.

You will also need to get the GFX graphics core and click on the Downloads button in the top right corner to download a zip of the library and examples. Uncompress the folder and rename it Adafruit_GFX make sure that inside that folder is the cpp and .h files. Then copy it to your arduinosketchfolder/libraries folder.

//comment or uncomment the next line for special pinout! 
#define USE_ADAFRUIT_SHIELD_PINOUT

Restart the Arduino software. You should see a new example folder called TFTLCD and inside, an example called graphicstest. Upload that sketch to your Arduino. You should see a collection of graphical tests draw out on the TFT

TftTouch-graphictest.jpeg

Librairie Adafruit GFX

The TFT LCD library is based off of the Adaftui GFX graphics core library. GFX has many ready to go functions that should help you start out with your project. Its not exhaustive and we'll try to update it if we find a really useful function. Right now it supports pixels, lines, rectangles, circles, round-rects, triangles and printing text as well as rotation.

Check out the GFX tutorial for detailed information about what is supported and how to use it!

DODO: A TRADUIRE tutorial

Exemple: le Paint tactile

The LCD has a 2.8" 4-wire resistive touch screen glued onto it. You can use this for detecing finger-presses, stylus', etc. You'll need 4 pins to talk to the touch panel but we reuse some of the pins for the TFT LCD! This is because the resistance of the panel is high enough that it doesn't interfere with the digital input/output and we can query the panel in between TFT accesses, when the pins are not being used.

Visit our github repository and click on the Downloads button in the top right corner to download a zip of the library and examples. Uncompress the folder and rename it TouchScreen make sure that inside that folder is the cpp and .h files. Then copy it to your arduinosketchfolder/libraries folder. See our tutorial for more details.

DODO: A TRADUIRE tutorial

We connect the 4 pins as follows:

  • Y+ is connected to Analog 1
  • Y- is connected to Digital 7
  • X+ is connected to Digital 6
  • X- is connected to Analog 2

Now start up the tftpaint_shield example in the TFTLCD library. The right hand side will have 'color boxes' you can press to select which color you want to draw with. If you press the area to the left where the screen ends, it will erase the screen.

Images depuis la Carte SD

There is a built in microSD card slot into the shield, and we can use that to load bitmap images! You will need a microSD card formatted FAT16 or FAT32 (they almost always are by default)

You'll also need to download our SD library modifyied to allow faster reads (these changes will be added to arduino v23) but for now you can download the new library here. Download the library by clicking the Downloads button and uncompressing the folder. Replace the files in your ArduinoIDE/libraries/SD folder and restart the IDE.

FOR MEGA ARDUINOS edit the SD/utility/Sd2Card.h file after installing and uncomment the line that says #define MEGA_SOFT_SPI 1 to allow the Mega to use the same pinout for SD cards as the Classic Arduinos

Download this tiger bitmap and save it to the microsd card! (Image by Shane Gorski )

Start up the IDE and select the tftbmp_shield sketch. Upload it to your Arduino to see the tiger!

Start up the IDE and select the tftbmp_shield sketch. Upload it to your Arduino to see the tiger!

TftTouch-Tiger.jpg

To make new bitmaps, make sure they are less than 240 by 320 pixels and save them in 24-bit BMP format! They must be in 24-bit format, even if they are not 24-bit color as that is the easiest format for the Arduino. You can rotate images using the setRotation() procedure.

Contrôler le rétro-éclairage

By default, we assume you'll want the backlight on all the time. However, you may want to PWM control or otherwise turn off the LED backlight to save power. You can do this with a simple hack. On the back, look for the two backlight jumpers. Cut the trace between the VCC jumper using a sharp knife and then solder the jumper labeled Pin 3. Then you can use Digital 3 to control the backlight

TftTouch-BackLight.jpg

Ressources

Où Acheter

L’Écran tactile 2.8" TFT est disponible chez MC Hobby.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com