I'm learning to work with Arduino and I decided to work with a TFT display (driver ST7735S, I connect to Arduino Uno), but I encountered a problem in the form that my contacts are labeled differently than in all the examples I looked at (example - no MOSI contacts/ MISO and CLK, instead of BL - BLK), because of which I am confused and cannot connect the screen correctly - please, help)
Display photo:
-
what are the pin labels?... you only said what they are not, which is not very useful ... please update you postjsotola– jsotola2024年03月17日 17:42:54 +00:00Commented Mar 17, 2024 at 17:42
1 Answer 1
Connections
Connections as follows:
- BLK -> 5V
- CS -> D10 (or anything, i.e. D9 - just change the
#define
below) - DC -> D9 (or anything, i.e. D8 - just change the
#define
below) - RST -> D8 (or anything, i.e. D7 - just change the
#define
below) - SDA -> D11
- SCL -> D13
- VDD -> 5V
- GND -> GND
Using TFT library
You can use the TFT library:
#include <TFT.h>
#include <SPI.h>
With the following #defines
:
#define CS 10
#define DC 9
#define RST 8
Note: if you used different pins, then just change the numbers.
Create an instance and initialise with:
TFT myDisplay = TFT(CS, DC, RST);
myDisplay.begin();
Using GFX
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>
With the following #defines
:
#define CS 10
#define DC 9
#define RST 8
Note: if you used different pins, then just change the numbers.
Create instance1:
Adafruit_ST7735 myDisplay = Adafruit_ST7735(CS, DC, RST);
Initialise with
myDisplay.initR(INITR_BLACKTAB);
Further reading
Footnote
1
Alternative instance creation, which is slower, but you can use different MOSI/SCLK pins (hence the additional #defines
):
#define SCLK 13 // You can change this
#define MOSI 11 // You can change this
Adafruit_ST7735 myDisplay = Adafruit_ST7735(CS, DC, MOSI, SCLK, RST);