trying to connect to a ST7735 1.8" TFT display

laue7272
Posts: 6
Joined: Mon Jun 19, 2017 6:41 pm

trying to connect to a ST7735 1.8" TFT display

Postby laue7272 » Sun Jun 25, 2017 3:28 am

I am trying to connect to a ST7735 display using the following library:

https://github.com/sumotoy/TFT_ILI9163C ... ease-1.0p7

I can't find wiring instruction for the ESP32 for the board I am using and I was wondering if anyone knows what pin should I use

I have attached a pict of the board I am using and the ST7735 display
Attachments
esp32 sp7735.png
esp32 sp7735.png (8.92 MiB) Viewed 33951 times

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: trying to connect to a ST7735 1.8" TFT display

Postby chegewara » Sun Jun 25, 2017 4:55 pm

Since its not tensy boars or esp8266 you will need to use this constructor:

Code: Select all

#else //All the rest
	TFT_ILI9163C::TFT_ILI9163C(const enum ILI9163C_dispType d,const uint8_t cspin,const uint8_t dcpin,const uint8_t rstpin)
	{
		_cs   = cspin;
		_dc   = dcpin;
		_rst  = rstpin;
		TFT_ILI9163C_DISP = d;
	}
And for CLK = pin18, SDA=23. At least his implementation for ssd1331 works for me this way on esp32.

laue7272
Posts: 6
Joined: Mon Jun 19, 2017 6:41 pm

Re: trying to connect to a ST7735 1.8" TFT display

Postby laue7272 » Sun Jun 25, 2017 9:31 pm

from the library instruction:
TFT side -------------------- ESP8266
- Vcc --> +3V3V(!!!!)
- Gnd --> Gnd
- CS --> D0
- RST --> D2 (optional) if not used tie to +3V3 or 4k7..10K to 3V3 (do NOT leave float!)
- A0 -> D1
- SDA --> Mosi (D7)
- SCK --> Sclk (D5)
- LED --> Some display need a resistor (see note below)

________

thank you Chegewara,
I don't have D0, A0, D7 on the NODEMCU32 board.
what pins should I use ?

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: trying to connect to a ST7735 1.8" TFT display

Postby chegewara » Mon Jun 26, 2017 12:48 am

Whatever you have unused. Just im not 100% sure that pins 33-39 will work. In my case it was 5, 16 and 17. Like VSPI pins.
Image

laue7272
Posts: 6
Joined: Mon Jun 19, 2017 6:41 pm

Re: trying to connect to a ST7735 1.8" TFT display

Postby laue7272 » Mon Jun 26, 2017 5:01 am

I modified the User_Setup.h file of the TFT eSPI library and uncommented the following lines:

#define ST7735_DRIVER
#define TFT_WIDTH 128
#define TFT_HEIGHT 160
#define ST7735_INITB
#define TFT_CS PIN_D5 // Chip select control pin
#define TFT_DC PIN_D2 // Data Command control pin
#define TFT_RST PIN_D4 // Reset pin (could connect to RST pin)
#define SPI_FREQUENCY 27000000

and connected:
CS pin on the st7735 to NODEMCU pin D5
DC on the st7735 to NODEMCU pin D2
RST on the st7735 to NODEMCU pin D4

and ran one of the examples but the display is blank !
Attachments
PastedGraphic-1.png
PastedGraphic-1.png (7.85 MiB) Viewed 33901 times

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: trying to connect to a ST7735 1.8" TFT display

Postby chegewara » Mon Jun 26, 2017 8:00 am

Could you paste part of code with tft initialization. It could looks like this:

Code: Select all

#define __CS1 	5 // or D5
#define __DC 	2  // D2
#define __RST       4  // D4


TFT_ILI9163C tft = TFT_ILI9163C(__CS1, __DC, __RST);

BorisFR
Posts: 1
Joined: Fri Apr 20, 2018 9:49 am

LilyGO - TTGO TS v1.2 configuration

Postby BorisFR » Fri Apr 20, 2018 12:24 pm

For the board TTGO TS v1.2 with 1.8'' screen, https://www.aliexpress.com/store/produc ... 43640.html
here is the configuration:

Code: Select all

#define ST7735_DRIVER
#define TFT_WIDTH 128
#define TFT_HEIGHT 160
#define ST7735_GREENTAB2
#define TFT_CS 16
#define TFT_DC 17
#define TFT_RST -1
#define TFT_MISO -1
#define TFT_MOSI 23
#define TFT_SCLK 5
//#define SMOOTH_FONT

Who is online

Users browsing this forum: No registered users and 55 guests