mrded
Posts: 5
Joined: Sat Feb 08, 2014 5:47 pm

Connect screen via GPIO

Sat Feb 08, 2014 6:15 pm

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!
Attachments
$_57-2.JPG
$_57-2.JPG (45.29 KiB) Viewed 10957 times
$_57.JPG
$_57.JPG (48.79 KiB) Viewed 10957 times

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12669
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Connect screen via GPIO

Sat Feb 08, 2014 6:39 pm

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.

mrded
Posts: 5
Joined: Sat Feb 08, 2014 5:47 pm

Re: Connect screen via GPIO

Sat Feb 08, 2014 7:38 pm

@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.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12669
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Connect screen via GPIO

Tue Feb 11, 2014 12:59 am

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!

notro
Posts: 695
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: Connect screen via GPIO

Tue Feb 11, 2014 11:40 am

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.

mrded
Posts: 5
Joined: Sat Feb 08, 2014 5:47 pm

Re: Connect screen via GPIO

Tue Feb 11, 2014 11:19 pm

Got a bit more information from a supplier.
Picture and mztx06a library: https://github.com/yaolet/mztx06a
Attachments
_4.JPG
_4.JPG (60.14 KiB) Viewed 10780 times

alxxer
Posts: 1
Joined: Wed Mar 12, 2014 3:41 pm

Re: Connect screen via GPIO

Wed Mar 12, 2014 3:43 pm

This picture still does not help. Can anyone give a more detailed info.

Thanks

User avatar
NITROgaming
Posts: 18
Joined: Fri May 17, 2013 12:01 am
Location: North America-U.S.A-Kentucky
Contact: Website

Re: Connect screen via GPIO

Sun Feb 01, 2015 11:41 pm

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
Visit my site at www.n2o1gaming.weebly.com to download my music and see some cool projects!

madaerodog
Posts: 3
Joined: Mon Jul 09, 2012 10:33 am

Re: Connect screen via GPIO

Sun May 17, 2015 12:29 pm

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
Attachments
IMG_20150517_140804.jpg
IMG_20150517_140804.jpg (52.43 KiB) Viewed 9326 times

User avatar
NITROgaming
Posts: 18
Joined: Fri May 17, 2013 12:01 am
Location: North America-U.S.A-Kentucky
Contact: Website

Re: Connect screen via GPIO

Sun May 17, 2015 10:06 pm

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!
Visit my site at www.n2o1gaming.weebly.com to download my music and see some cool projects!

User avatar
NITROgaming
Posts: 18
Joined: Fri May 17, 2013 12:01 am
Location: North America-U.S.A-Kentucky
Contact: Website

Re: Connect screen via GPIO

Sun Dec 27, 2015 9:04 pm

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?
Visit my site at www.n2o1gaming.weebly.com to download my music and see some cool projects!

User avatar
NITROgaming
Posts: 18
Joined: Fri May 17, 2013 12:01 am
Location: North America-U.S.A-Kentucky
Contact: Website

Re: Connect screen via GPIO

Wed Dec 30, 2015 1:32 am

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?
Visit my site at www.n2o1gaming.weebly.com to download my music and see some cool projects!

yanniks
Posts: 8
Joined: Wed Dec 19, 2012 7:04 pm

Re: Connect screen via GPIO

Sat Feb 06, 2016 2:31 pm

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. :(

Return to “Interfacing (DSI, CSI, I2C, etc.)”