Friday, May 20, 2016

Raspberry Pi and ST7735 1.8 TFT SPI LCD display.

I have written six books on the Arduino, but only one on the Raspberry Pi.  Now I am working on a second Raspberry Pi book called, "Raspberry Pi LCD Projects".  The third LCD init is this 1.8 inch 128x160 pixel color LCD.  This first picture was taken when I first got it to work doing a Red/Green/Blue test.
Then I worked on the setup configuration so that instead of using 4 bits or 5 bits per color it uses 6 bits per color or three bytes per color.  That way it matches up with the BMP file format making it very easy to display a BMP image.  Sorry but my camera does not show the colors very well.....
I used IrfanView to edit and create this 128 by 160 Raspberry Pi logo image.
At first the BMP pictures appeared to be out of sync.  The problem was that the code for this display that is listed on the Internet is wrong.  The display was not using all of its 128 pixels in the width. After a few tweaks everything came up working as it should.

Here is the video:

Here is the schematic


Observer said...

Hi bob, thanks for the video. Can you share the wiring diagram? Is your new book out? I have same display and i dont have a clue to turn it on. Please help

Bob Davis said...

"Raspberry Pi LCD Projects" is available on Amazon. I will update this blog with a schematic.

Unknown said...

Hello Bob,

I've a problem with your source code.
From PDF indentation is not correct.
The second problem is this error:
TypeError: unsupported operand type(s) for /: 'bytes' and 'int'

Your code work on Python3 ?

Thx in advance