Page 1 of 1

Connect screen via GPIO

Posted: Sat Feb 08, 2014 6:15 pm
by mrded
Hello,
I just bought LCD screen which connects via gpio. And I'm a bit confused with some ports.

It has following connections:
* 8 LED + (common anode LED backlight)
* 7 VDD (+3.3 V Supply)
* 6 / RST (reset pin can be directly connected to +3.3 V provincial IO)S
* 5 RS (command / data indication feet)
* 4 / CS (chip select pin can be directly connected to GND province IO)
* 3 SCI (serial data pin, which is the SPI MOSI)
* 2 SCL (serial clock pin, which is SCK)
* 1 GND (ground)

Can someone help me with connection it to my Raspberry Pi (Model B rev 2)?
Do I need to install extra drivers to make it work?

Thank you!

Re: Connect screen via GPIO

Posted: Sat Feb 08, 2014 6:39 pm
by mahjongg
electrical connections seem straightforward enough. as its a 3v3 device not much else than wires to the GPIO headers are needed.

But yes, you do need a specific driver, best would be one that copies the screen buffer to the LCD, like this one has: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=48967

I would use a series resistor for the backlighting, unless you can confirm its built into the module already.

Re: Connect screen via GPIO

Posted: Sat Feb 08, 2014 7:38 pm
by mrded
@mahjongg thank you for your answer.

I got wires to the GPIO already. Problem is I don't know how to connect it.

By my understanding, it should be connected like it (format: Screen - GPIO):
* 1 GND - 6 GND
* 2 SCL - 21 MISO or 23 SCLK (???)
* 3 SCI - 19 MOSI
* 4 / CS - ???
* 5 RS - ???
* 6 / RST - ???
* 7 VDD - 1 3V3 POWER
* 8 LED - 26 CE1
I would use a series resistor for the backlighting, unless you can confirm its built into the module already.
Unfortunately I cannot confirm it. Maybe more info about my screen will make more sense for you.

Re: Connect screen via GPIO

Posted: Tue Feb 11, 2014 12:59 am
by mahjongg
no real info to be found there, just an "infomercial". What would be needed, even for such a basic question as this is is a data sheet, but there is none to be found there.

I wonder WHY the advertisement has a picture of the raspberry PI on the screen (photoshopped I suppose) as there seems to be no driver for the device! Technically the device may indeed be "compatible with a PI", but thats just theory without a driver.

Drivers for devices like this do not fall out of the air, the person who sells the 2.8" display had to write one for it!

Just connecting up the display, even if you do it the right way, won't make it "just work". Ask the people where you bought it to provide a driver for it!

Re: Connect screen via GPIO

Posted: Tue Feb 11, 2014 11:40 am
by notro
The product page: http://www.ebay.co.uk/itm/201004236109 contains this text: 2.2 inch IPS TFT LCD
A google search: "2.2 inch IPS TFT LCD" gives this: http://www.aliexpress.com/item/Hitachi- ... 91299.html
Those two look similar.

A google search: MZTX06A gives this project: https://github.com/yaolet/mztx06a. It's a userspace driver that syncs /dev/fb0 to the display.
Maybe that can help you.

I had a look at the source code too see if github.com/notro/fbtft/wiki could be used, but the GRAM update window function is not supported by FBTFT.

Re: Connect screen via GPIO

Posted: Tue Feb 11, 2014 11:19 pm
by mrded
Got a bit more information from a supplier.
Picture and mztx06a library: https://github.com/yaolet/mztx06a

Re: Connect screen via GPIO

Posted: Wed Mar 12, 2014 3:43 pm
by alxxer
This picture still does not help. Can anyone give a more detailed info.

Thanks

Re: Connect screen via GPIO

Posted: Sun Feb 01, 2015 11:41 pm
by NITROgaming
I purchased this screen off eBay for 18$, tried to hook it up today with the driver from the mztx06a library (the screen in the picture matches mine) and all I can get is a white screen. The pictures only show 7 hookup wires yet there are 8 connections. Any assistance would be appreciated because this screen fits perfectly down to the millimeter in my case. Tried it out on a raspberry pi a+ using the original corresponding 26 pins (to the b rev 2 pictured in mztx06a).

What I purchased:
http://www.ebay.com/itm/2-2-034-inch-TF ... 4897.l4275

Re: Connect screen via GPIO

Posted: Sun May 17, 2015 12:29 pm
by madaerodog
Hey guys, I've figured it out for the rPi A+, it's the same for B+ as well. Here is the correct way to wire them:
the left is display, right the rPi connector

1. GND - GND
2. SCL - GPIO 11 SPI_SCLK
3. SCI - GPIO 10 SPI_MOSI
4. CS - GPIO 7 SPI_CE1
5. RS - GPIO 9 SPI_MISO
6. RST - 3.3V
7. VDD - 3.3V
8. LED+ - 3.3V if you want back-light to be strong

a little pic for proof, now I am working to make it load at boot, I have used the driver provided by yaolet on github

Re: Connect screen via GPIO

Posted: Sun May 17, 2015 10:06 pm
by NITROgaming
madaerodog wrote:Hey guys, I've figured it out for the rPi A+, it's the same for B+ as well. Here is the correct way to wire them:
the left is display, right the rPi connector

1. GND - GND
2. SCL - GPIO 11 SPI_SCLK
3. SCI - GPIO 10 SPI_MOSI
4. CS - GPIO 7 SPI_CE1
5. RS - GPIO 9 SPI_MISO
6. RST - 3.3V
7. VDD - 3.3V
8. LED+ - 3.3V if you want back-light to be strong

a little pic for proof, now I am working to make it load at boot, I have used the driver provided by yaolet on github
This is great news, I can finish my A+ project now, thanks!

Re: Connect screen via GPIO

Posted: Sun Dec 27, 2015 9:04 pm
by NITROgaming
madaerodog wrote:Hey guys, I've figured it out for the rPi A+, it's the same for B+ as well. Here is the correct way to wire them:
the left is display, right the rPi connector

1. GND - GND
2. SCL - GPIO 11 SPI_SCLK
3. SCI - GPIO 10 SPI_MOSI
4. CS - GPIO 7 SPI_CE1
5. RS - GPIO 9 SPI_MISO
6. RST - 3.3V
7. VDD - 3.3V
8. LED+ - 3.3V if you want back-light to be strong

a little pic for proof, now I am working to make it load at boot, I have used the driver provided by yaolet on github
Okay so I tried using this today, installed the driver and hooked up the screen according to your pins. Upon booting the pi the screens backlight turns on. One its finished make the file according to the git no messages. When i run sudo ./mtx06a, it responds:
bcm2835 init now
Raspberry pi mztx06a lcd testing...
http://jwlcd-tp.taobao.com

It just sits there until i press ctrl c to stop it... what am i doing wrong?

Re: Connect screen via GPIO

Posted: Wed Dec 30, 2015 1:32 am
by NITROgaming
Okay so I got the screen going finally and at boot by editing rc.local and adding this:

Code: Select all

/home/pi/mztx06a/src/mztx06a &
And it runs in the background at all times now

It works great until I try to open something like emulation station (I am using this screen in a game boy). The screen will not show the GUI at all, when launching a game the launch code appears but not the game, and upon exiting it crashes the pi. The main question would be is there anyway to get this screen to show graphics/ES? Am I doing something wrong? missing something?

Re: Connect screen via GPIO

Posted: Sat Feb 06, 2016 2:31 pm
by yanniks
Does this driver still work on Debian Jessie? I'm trying to get my monitor up and running for several hours now but the only thing that works is the backlight. :(