1.3" ST7789 LCD

I'm stupid and didn't by the official Adafruit screen. I went with This 1.3" from MakerFocus. this is the specific part I got from the Zon.

I'm trying to get this working on Seeeduino Xiao.

I
I have the following libraries installed:
Adafruit ST7735 and ST7789 Library 1.6.0
Adafruit_GFX 1.10.1

I'm trying to understand what the deal is with CS, RST, and DC

 #define TFT_CS        10
  #define TFT_RST        9 // Or set to -1 and connect to Arduino RESET pin
  #define TFT_DC         8

I'm using the 1.3" so I define the TFT like this

// For 1.14", 1.3", 1.54", and 2.0" TFT with ST7789:
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

I'm connected to SDA and SCL the pinout direct from the pins on the EVB

I have VCC of the display going to 3.3V
BLK i(backlight) s going to 5V

I don't understand what reset (RES) and DC (SPI choice) is about.

The part gets good reviews from people that already know how to use it. I'm sure it's fine. I'm the one with the problem.

I'm trying to run graphicstest.ino. It compiles, and loads, I can see the backlight is on but I don't see those sweet sweet graphics.

I know there is no SD card on this version. I honestly have no idea why id need one if I'm just going to be drawing graphics.

After all this failing.... one day I'm gonna build cool sh!t.

Wire your display with this scheme:

Number 	Pin Label 	Description
1 	GND 	(GND) LCD Power ground
2 	VCC 	(3.3V) LCD power supply is positive (3.3V)
3 	SCL 	(D8)  LCD SPI bus clock signal
4 	SDA 	(D10) LCD SPI bus write data signal
5 	RES     (D1)  LCD reset control signal(Low level reset)
6 	DC 	(D2)  LCD register / data selection control signal (Low level: register, high level: data)
7  	BLK 	(n.c.)  LCD backlight control signal (high level lighting,

if you do not need control, please connect 3.3V)

And use constructor:

// For 1.14", 1.3", 1.54", and 2.0" TFT with ST7789:
Adafruit_ST7789 tft = Adafruit_ST7789(-1, D2, D1);

If you want to turn the backlight on and off, connect BLK to a GPIO pin

David.

Thank you for taking the time to reply. Can I trouble you to help demystify exactly what this part means?

6 	DC 	(D2)  LCD register / data selection control signal (Low level: register, high level: data)

If it's low then something is supplied by register? If high then something is supplied by data? What exactly can we select and control? It seems pretty ambiguous. I must be missing something in a thread or manual.

I have answered this many times.
DC DataCommand
RS RegisterSelect
A0 Address0

all mean the same thing. This signal differentiates between a Command and regular Data.

You don't worry about it. Simply connect the appropriate wire and match in the constructor.

You concentrate on calling the graphics and text methods to implement your project.

David.

david_prentice:
And use constructor:

// For 1.14", 1.3", 1.54", and 2.0" TFT with ST7789:

Adafruit_ST7789 tft = Adafruit_ST7789(-1, D2, D1);




If you want to turn the backlight on and off, connect BLK to a GPIO pin

David.

Adafruit_ST7789.h

#ifndef _ADAFRUIT_ST7789H_
#define _ADAFRUIT_ST7789H_

#include "Adafruit_ST77xx.h"

/// Subclass of ST77XX type display for ST7789 TFT Driver
class Adafruit_ST7789 : public Adafruit_ST77xx {
public:
  Adafruit_ST7789(int8_t cs, int8_t dc, int8_t mosi, int8_t sclk,
                  int8_t rst = -1);
  Adafruit_ST7789(int8_t cs, int8_t dc, int8_t rst);

The argument order is CS, DC, RST.

You said to use "Adafruit_ST7789(-1, D2, D1)".
Should that be "Adafruit_ST7789(D1, D2, -1)" instead since RST is last and that's the one that should be -1 or does that not matter?

RST always matters on most Chinese boards. Because there is no pullup resistor.
Adafruit's trick of posting examples with no RST argument means that Chinese boards will not work.
Adafruit boards will work because there is a RST pullup on Adafruit boards.

There is no CS pin on your module. Hence -1

If in doubt, always try the bit-bang constructor first. This will verify that the display is working.
Hardware SPI will be faster but you must use the correct pins.

I strongly advise you to always connect the RST pin. And use the RST argument in the constructor.

David.