Uncategorized

***Question***

> SPI 2.8″ TFT LCD ILI9341
>
> Rpi3B OK?

***Answer***

Well, 60% chance OK.

*First thing first – check out spec and schematic.*

[![touch screen 01][1]][1]

[![touch screen 2][2]][2]

The OP’s question is clear, and his reference web links are very good. So I followed his links and jot down a picture of the wiring.

[![touch screen wiring][3]][3]

The drive/library referred by the OP is a couple of years old, and no longer supported. So I need to google to catch up.

so I googled and found everybody is using the ILI19341 de facto standard. That means all ILI19341 are more or less the same and can be used with any such driver. I searched AliExpress and found the following typical goody.

[![ILI19341 touch screen][4]][4]

I google to catch up and the the found the following tutorial looking good.

[ILI9341 Raspberry Pi guide – pi0cket 2019feb26][5]

It gives a clear wiring (see Reference below), and the detailed instructions and commands to switch between HDMI mon and TFT screen.

One thing I am not that happy is the following:

***You cannot use HDMI monitor and TFT touch screen at the same time!***

***Update 2019may14hkt1700***

[![touch mon][6]][6]

***Update2019may14hkt2107***

[![2.8″ touch screen pinout][7]][7]

[![32 pin socket][8]][8]

[![rpi spi pinout][9]][9]

***Update 2019may15hkt1519***

[![touch lcd wiring][10]][10]

[![touch screen module][11]][11]

*/ to continue, …*

***References***

[Velleman SPI 2.8″ TFT LCD ILI9341 Spec – Velleman][12]

[Velleman SPI 2.8″ TFT LCD ILI9341 Schematic – Velleman][13]

[Wiring up a ILI9341 TFT Touch Screen – Rpi Forum Discussion 2015][14]

[Wiring up a ILI9341 TFT Touch Screen Post – Lallafa 2013][15]

[MI0283QT-9A 320x240px Touch Screen with ILI9341 display driver spec – Mikroe][16]

[MI0283QT-9A 320x240px Touch Screen with ILI9341 display driver User Manual – Mikroe][17]

[Linux Framebuffer drivers for small TFT LCD display modules (development ceased) – 2015][18]

[AliExpress 240 x 320 2.8″ SPI TFT LCD Touch Screen (Touch Pen) ILI9341 White SPI Series – US$10][19]

> ***AliExpress ILI9341 240 x 320 2.8″ SPI TFT LCD Touch Screen***

> 2.8 ” SPI, 36.72mm W X 48.96 mm H, 8.5 x 4.8 cm/ Conductive element: active matrix a-si TFT IC Driver: ILI9341, Backlight: White LED

> Visualization direction: 6 hours, Depth of color: 262 K / 65 K

> Resolution): 240 RGB * 320 5V, use with 3.3 V or 5 V logic

[ILI9341 Raspberry Pi guide – pi0cket 2019feb26][5]

> Moduole Power = 3V3
>
> Wiring (BCM Mode)
>
> SCK – Rpi SPI Clok (GPIO 11)
>
> MISO – Rpi SPI MISO (GPIO 9)
>
> MOSI – Rpi SPI MOSI (GPIO 10)
>
> CS – Rpi SPI CE0N (GPIO 8)
>
> RST – Rpi GPIO GEN 6 (GPIO 25)
>
> BL – Rpi GPIO GEN 1 (GPIO 18)
>
> DC – Rpi GPIO GEN 5 (GPIO 24)

[Touch Screen VMA412 User Manual][20]

[Ilitek ILI9341 a-Si TFT LCD Driver 240 RGB x 320 262K Color V1.02][21]

[AdaFruit 2.8″ TFT LCD with Touchscreen Breakout Board User Guide][22]

[AdaFruit 2.8″ TFT LCD with Touchscreen Breakout Board Pin Out / SPI Mode][23]

[AdaFruit 2.8″ TFT LCD with Touchscreen Breakout Board w/MicroSD Socket – ILI9341 US$30][24]

[A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3 and Zero – Last commit 2019Apr][25]

[User Manual For 2.8″ TFT Touch Shield for Arduino with Resistive Touch Screen (TF028)][26]

[User Manual For 2.8″ TFT Touch Shield for Arduino with Resistive Touch Screen][27]

[ILI9341 Raspberry Pi guide – pi0cket 2019feb26][5]

[Wave Share 3.2 inch 320×240 Touch LCD User Manua][28]

[SPI – Serial Peripheral Interface Pinout][29]

[SPI – raspberrypi.org][30]

[Using SPI0 and SPI1][31]

[WaveShare 5″ Touch LCD Setup Question and tlfong01’s Answer][32]

[WaveShare 7″ Touch LCD Setup Question and tlfong01’s Answer][33]

[Hitachi HD44780U Dot Matrix LCD Controller Datasheet Rev. 0.0][34]

[HD44780U 4×20 LCD Controller 4-bit Interface Python Program Example][35]

AdaFruit PiTFT Plus Assembled 320×240 2.8″ TFT + Resistive Touchscreen $35
https://www.adafruit.com/product/2298

[1]: https://i.stack.imgur.com/NkTHI.jpg
[2]: https://i.stack.imgur.com/jVwB4.jpg
[3]: https://i.stack.imgur.com/fRM3V.jpg
[4]: https://i.stack.imgur.com/6ZW89.jpg
[5]: https://pi0cket.com/ili9341-raspberry-pi-guide/
[6]: https://i.stack.imgur.com/UZqmn.jpg
[7]: https://i.stack.imgur.com/iBZeC.jpg
[8]: https://i.stack.imgur.com/DeDWc.jpg
[9]: https://i.stack.imgur.com/mLubs.jpg
[10]: https://i.stack.imgur.com/NJXM7.jpg
[11]: https://i.stack.imgur.com/Pcq7i.jpg
[12]: https://www.velleman.eu/products/view/?id=435582
[13]: https://www.velleman.eu/downloads/29/vma412_diagram.pdf
[14]: https://raspberrypi.stackexchange.com/questions/19373/wiring-up-a-ili9341-tft-screen-touch
[15]: http://lallafa.de/blog/2013/03/watterott-display-on-raspberry-pi/
[16]: https://www.mikroe.com/tft-proto-board
[17]: https://download.mikroe.com/documents/add-on-boards/other/display/tft-proto/tft-proto-manual-v200.pdf
[18]: https://github.com/notro/fbtft
[19]: https://fr.aliexpress.com/item/32946670119.html?spm=a2g0w.search0604.3.97.412e24d0WYuY5Z&ws_ab_test=searchweb0_0%2Csearchweb201602_9_10065_10068_319_10059_10884_317_10887_10696_321_322_10084_453_10083_454_10103_10618_10307_537_536%2Csearchweb201603_51%2CppcSwitch_0&algo_expid=719a2dea-a817-4fa8-bc03-0967df7d2f22-13&algo_pvid=719a2dea-a817-4fa8-bc03-0967df7d2f22
[20]: https://www.velleman.eu/downloads/29/vma412_a4v02.pdf
[21]: https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf
[22]: https://learn.adafruit.com/adafruit-2-dot-8-color-tft-touchscreen-breakout-v2
[23]: https://learn.adafruit.com/adafruit-2-dot-8-color-tft-touchscreen-breakout-v2/pinouts
[24]: https://www.adafruit.com/product/1770
[25]: https://github.com/juj/fbcp-ili9341
[26]: http://www.produktinfo.conrad.com/datenblaetter/1500000-1599999/001525436-an-01-en-AUSFUEHRLICHE_ANL_320X240_COLOUR_TFT_LCD.pdf
[27]: https://class.ece.uw.edu/474/peckol/doc/TFT-Display/2.8inch%20touch%20screen%20user%20manual%EF%BC%88Arduino-EN%EF%BC%89V1.00.2017.03.22.pdf
[28]: http://www.belchip.by/sitedocs/18326.pdf
[29]: https://pinout.xyz/pinout/spi
[30]: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
[31]: https://raspberrypi.stackexchange.com/questions/82835/i-want-to-use-spi0-and-spi1
[32]: https://raspberrypi.stackexchange.com/questions/96777/hdmi-gpio-dual-screen
[33]: https://raspberrypi.stackexchange.com/questions/96486/connect-touch-screen-3-5-lcd-and-mcp3008-at-the-same-time/96497#96497
[34]: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
[35]: https://raspberrypi.stackexchange.com/questions/98611/raspberry-pi-with-4×20-lcd-and-pi4j-display-something/98622#98622

 

1

 

It is possible to connect this LCD TFT screen to the raspberry 3 model B please ? I don’t understand the schematic for SPI connection. Any help is welcome thank you.

I have follow this answer but it does not help me.

Probably this library can help me for the driver, but I do not know how to connect that.

products

vma412_diagram

enter image description here

vma412_diagram / datasheets – ILI9341

enter image description here

 New contributor
  • the SPI could be used only for the SD card …. what does the user manual say? – jsotola 2 days ago
  • @jsotola, Thank you for your answers. Sorry for the “anymore” word , I’m not really English and I meant: “did not help me more than that”. For SPI I have read SPI can be use for preserve GPIO pin . For SPI I read that SPI can be used to preserve GPIO pins. But I start so I can also misinterpret. In the user manual I have not found any specification about SPI, except in the diagram. – Ephemeral yesterday
  • @jsotola, Finally, the features of SPI are in manual mode: serial interface 3 lines / 4 lines, but only for SD cards? good question. – Ephemeral yesterday
  • Many thanks for the very detailed signal routing chart. I am glad to have found one more missing jigsaw piece – the relation between the signals “DC” and “SCL”. I never have guessed that these two logical signals share the same physical line! – tlfong01 36 mins ago   

 

3

 

Question

SPI 2.8″ TFT LCD ILI9341

Rpi3B OK?

Answer

Well, 60% chance OK.

First thing first – check out spec and schematic.

touch screen 01

touch screen 2

The OP’s question is clear, and his reference web links are very good. So I followed his links and jot down a picture of the wiring.

touch screen wiring

The drive/library referred by the OP is a couple of years old, and no longer supported. So I need to google to catch up.

so I googled and found everybody is using the ILI19341 de facto standard. That means all ILI19341 are more or less the same and can be used with any such driver. I searched AliExpress and found the following typical goody.

ILI19341 touch screen

I google to catch up and the the found the following tutorial looking good.

ILI9341 Raspberry Pi guide – pi0cket 2019feb26

It gives a clear wiring (see Reference below), and the detailed instructions and commands to switch between HDMI mon and TFT screen.

One thing I am not that happy is the following:

You cannot use HDMI monitor and TFT touch screen at the same time!

Update 2019may14hkt1700

touch mon

Update2019may14hkt2107

2.8

32 pin socket

rpi spi pinout

Update 2019may15hkt1519

touch lcd wiring

touch screen module

/ to continue, …

References

Velleman SPI 2.8″ TFT LCD ILI9341 Spec – Velleman

Velleman SPI 2.8″ TFT LCD ILI9341 Schematic – Velleman

Wiring up a ILI9341 TFT Touch Screen – Rpi Forum Discussion 2015

Wiring up a ILI9341 TFT Touch Screen Post – Lallafa 2013

MI0283QT-9A 320x240px Touch Screen with ILI9341 display driver spec – Mikroe

MI0283QT-9A 320x240px Touch Screen with ILI9341 display driver User Manual – Mikroe

Linux Framebuffer drivers for small TFT LCD display modules (development ceased) – 2015

AliExpress 240 x 320 2.8″ SPI TFT LCD Touch Screen (Touch Pen) ILI9341 White SPI Series – US$10

AliExpress ILI9341 240 x 320 2.8″ SPI TFT LCD Touch Screen

2.8 ” SPI, 36.72mm W X 48.96 mm H, 8.5 x 4.8 cm/ Conductive element: active matrix a-si TFT IC Driver: ILI9341, Backlight: White LED

Visualization direction: 6 hours, Depth of color: 262 K / 65 K

Resolution): 240 RGB * 320 5V, use with 3.3 V or 5 V logic

ILI9341 Raspberry Pi guide – pi0cket 2019feb26

Moduole Power = 3V3

Wiring (BCM Mode)

SCK – Rpi SPI Clok (GPIO 11)

MISO – Rpi SPI MISO (GPIO 9)

MOSI – Rpi SPI MOSI (GPIO 10)

CS – Rpi SPI CE0N (GPIO 8)

RST – Rpi GPIO GEN 6 (GPIO 25)

BL – Rpi GPIO GEN 1 (GPIO 18)

DC – Rpi GPIO GEN 5 (GPIO 24)

Touch Screen VMA412 User Manual

Ilitek ILI9341 a-Si TFT LCD Driver 240 RGB x 320 262K Color V1.02

AdaFruit 2.8″ TFT LCD with Touchscreen Breakout Board User Guide

AdaFruit 2.8″ TFT LCD with Touchscreen Breakout Board Pin Out / SPI Mode

AdaFruit 2.8″ TFT LCD with Touchscreen Breakout Board w/MicroSD Socket – ILI9341 US$30

A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3 and Zero – Last commit 2019Apr

User Manual For 2.8″ TFT Touch Shield for Arduino with Resistive Touch Screen (TF028)

User Manual For 2.8″ TFT Touch Shield for Arduino with Resistive Touch Screen

ILI9341 Raspberry Pi guide – pi0cket 2019feb26

Wave Share 3.2 inch 320×240 Touch LCD User Manua

SPI – Serial Peripheral Interface Pinout

SPI – raspberrypi.org

Using SPI0 and SPI1

WaveShare 5″ Touch LCD Setup Question and tlfong01’s Answer

WaveShare 7″ Touch LCD Setup Question and tlfong01’s Answer

Hitachi HD44780U Dot Matrix LCD Controller Datasheet Rev. 0.0

HD44780U 4×20 LCD Controller 4-bit Interface Python Program Example

AdaFruit PiTFT Plus Assembled 320×240 2.8″ TFT + Resistive Touchscreen $35https://www.adafruit.com/product/2298

 

  • Thank you very much, I have already seen (hover over) all the tutorials provided but I do not understand how to connect “BL” (from ILI9341 Raspberry Pi guide – pi0cket) for example, I can not see it on the diagram (that you kindly highlighted me). Another remark is for pin SPI_SDO, SPI_SDA there is NC / SPI_, the NC scares me … – Ephemeral yesterday
  • Ah, no problem. Perhaps I can draw a diagram to explain it better. – tlfong01 yesterday
  • It would be with great pleasure but I would not want to take up too much of your time. – Ephemeralyesterday
  • Ah I see your problem. They are using hard to understand geek language. “NC” usually means “No Connection”. “BL” usually means “Back Lit”. The module has 4 white LED which can back light the background. No problem for me drawing anything. It take me very littl time. – tlfong01 yesterday
  • Thank you very much again for all your explanations. I think at this time, GPIO9 -> LCD_RD , GPIO10 -> LCD_WR, GPIO8 -> LCD_CS but for RESET and RS (Register Select ?) no definition on pinout shematic for the raspberry. Maybe these pins can be any pin gpio (declared in the driver source file?) raspberry pinout – Ephemeral yesterday

Not the answer you’re looking for? Browse other questions tagged    or ask your own question.

  • Thank you very much, I have already seen (hover over) all the tutorials provided but I do not understand how to connect “BL” (from ILI9341 Raspberry Pi guide – pi0cket) for example, I can not see it on the diagram (that you kindly highlighted me). Another remark is for pin SPI_SDO, SPI_SDA there is NC / SPI_, the NC scares me … – Ephemeral yesterday
  • Ah, no problem. Perhaps I can draw a diagram to explain it better. – tlfong01 yesterday   
  • It would be with great pleasure but I would not want to take up too much of your time. – Ephemeralyesterday
  • Ah I see your problem. They are using hard to understand geek language. “NC” usually means “No Connection”. “BL” usually means “Back Lit”. The module has 4 white LED which can back light the background. No problem for me drawing anything. It take me very littl time. – tlfong01 yesterday   
  • Thank you very much again for all your explanations. I think at this time, GPIO9 -> LCD_RD , GPIO10 -> LCD_WR, GPIO8 -> LCD_CS but for RESET and RS (Register Select ?) no definition on pinout shematic for the raspberry. Maybe these pins can be any pin gpio (declared in the driver source file?) raspberry pinout – Ephemeral yesterday
  • Yes, it is confusing. I am trying to make some educational guesses, as in the coming updated picture. BTW, my answer is not just for you, but a follow up of other touch screens answers for newbies. For me it is just like a jigsaw puzzle, which is my hobby of playing electronics toys. Now I am going to meet a friend for supper. So see you tomorrow. Have a nice project! – tlfong01 yesterday   
  • I can not thank you enough. Have a good dinner. I will work with the elements of your updated answer. – Ephemeral yesterday
  • @Ephemeral I googled more touch LCD user guides and found all of them similar. So I have drafted a basic wiring diagram as updated. I think you can find the SPI signal lines at the Arduino shield plug CON 1, and one more CS signal line for micro SD card at the bottom side of the PCB. (Main SPI line are shared between LCD and sd card。) I could not find any BL line in your board. Perhaps your board has no back lit. Or you can try searching for it. I am going to gym then supper. See you late evening or tomorrow. Good luck! – tlfong01 22 hours ago   
  • Again, thank you very much. For ‘BL’, I can see LEDA on pin 16 and LEDK on pin 17 (LEDA seems to be the only pin needed on the diagram), but I really do not understand the pin mapping for the final board. And then what would LEDK be used for ? … Have a good supper. – Ephemeral 20 hours ago
  • For SPI it means that I can not make a display request and a request to access the SD card at the same time ? Can we say that this works in half-duplex ? – Ephemeral 20 hours ago
  • Ah. LEDA means LED Anode, which means Positive. LEDK means LED Cathode, Negative side. So if you connect Anode (to be very safe, use 1k in series to limit current) to 3V3, and Cathode to Gnd, the back lit LED should light up. – tlfong01 19 hours ago   
  • Ah, let us consider one device at a time. A SPI operation is almost always write and read at the same time, sort of mouth talking and ears listening at the same time. So it is full duplex, if you wish to use this term half/full duplex. Same for SD card, you write and read at the same time. Now you can read a byte from LCD and then write the byte to SD. But this has nothing to do with half or full duplex, I think, not very sure, again. You need to wiki for SPI, and also google Rpi newbit tutorials on SPI and I2C etc, to clarify. – tlfong01 19 hours ago   
  • Thank you for all your clarifications. For the lighting the schema of the diodes watches a schema with a pin named ‘A’ and 4 Leds in parallel. It seemed to me that LEDA could have been used for this pin. Yes, you’re right, I’m going to read the ILI9341 data sheet provided by adafruit to read a bit more about SPI and I2C. But I do not know if it will allow me to find the connection for the spi clock, the back light etc … because everything is on the diagram of the screen finally. – Ephemeral 18 hours ago
  • Ah, the four most important spi wires you want is located in CON1. Look for this plug in my picture updated yesterday. – tlfong01 18 hours ago   
  • Yes I will look even more carefully. After thinking, in fact, I should not rather look at your last schema which is much clearer for me and my level because I can not find a match for the clock for example apart from in your last scheme. If I understand what you told me before then I just miss the pin for the back light. But I am beginning to doubt my ability to properly configure the outputs in the driver source since I can not easily understand a simple connection and associate the technical terms. – Ephemeral 18 hours ago
  • Yes, I agree. If you cannot guess the meaning of terms BL = Back Lit, and LEDA, LEDK mean Anode and Cathode, then it is very difficult to do it all by yourself. But then if you read AdaFruit’s newbie tutorials on touch LCD, you might find things not that difficult. Or if you search Amazon’s touch LCD for Rpi, you might also find it easy. Your problem is now you want to change an Arduino shield to Rpi compatible, that is indeed very difficult. Suggestion: watch what I do this weekend, then decide to give up for now and come back later, after learning SPI basics. – tlfong01 17 hours ago   
  • Thank you. I understand you, but I am simply confused because I have a little experience of programming with SPI. On the original vellman diagram, you have highlighted 5 ‘wires’, on the diagram of lallafa’s 4 ‘wires’ are highlighted. When I program an ATtiny (which happened to me once or twice) with SPI I use 4 ‘wires’. I do not try to make all the features of the screen, touchscreen, access to the SD card etc but rather to do a simple SPI link is to write text to start,I have this screen on hand so I thought maybe it’s possible to just connect to the raspberry. – Ephemeral 17 hours ago
  • Ah, you only need 4 wires for the LCD – CLK, MOSI, MISO, CS. The 5th wire is CS for the SD card. So actually we don’t need to bother the SD card, or even the back lit, just play with LCD to start with. As I said, you can just sit back, do nothing and watch how do I test the very basic SPI thing over the weekend, … – tlfong01 16 hours ago   
  • Thank you very much for everything. – Ephemeral 16 hours ago
Please avoid extended discussions in comments. Would you like to automatically move this discussion to chat?

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: