Hi, I need your help! I have a 0.96 80x160 ips display with 4-SPI interface and Arduino Nano Every.
Here is the code of the project:
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>
#define TFT_CS 7
#define TFT_DC 6
#define TFT_RES 8
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RES);
void setup(){
Serial.begin(9600);
tft.initR(INITR_MINI160x80);
Serial.println("Initialized");
tft.fillScreen(ST7735_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ST7735_WHITE);
tft.setTextWrap(true);
tft.print("hello world!");
Serial.println("done!");
}
void loop(){
}
When I upload the sketch, I see this in the Serial monitor:
But there is no text on the display:
Here is the wiring:
GND -> GND
VCC -> 3v3
SCL -> A5
SDA -> A4
RES -> D8
DC -> D6
CS -> D7
I don't understand, maybe something wrong with a display module itself? Thank you in advance!
pastt0r:
SCL -> A5
SDA -> A4
You have an SPI display, and you have hooked the SCK and MOSI lines to the I2C SCL and SDA pins.
Why don't you try using the SCK and MOSI pins and see how that goes?
pastt0r:
SCL -> A5
SDA -> A4
Is SPI not I2C (For some unknown reason the pins are misnamed in the module.).
Try
SDA -> 11
SCL -> 13
2 completely different hardware serial interfaces.
clear picture of the other side of the display, please - the side with the lettering.
And also I connected SDA to D11 and SCL to D13 but there is still no text on the display
I tried it but there is still no text
Now the wiring is:
GND -> GND
VCC -> 3v3
SCL -> D13
SDA -> D11
RES -> D8
DC -> D6
CS -> D7
I would be concerned with a 3.3V display controller being fed 5V level signals. I don't see any level shifters on that board and the ST7735S is not 5V tolerant.
And does the backlight pin need to be connected to something?
connected BLK pin to the ground and now my display is just black, but previously it was kind of grey as you can see on the picture
Ah, so it's by default on then. Well, you know that works.
I'd still be concerned by 5V level signals into a 3.3V controller. Have you verified that the board contains some manner of level shifting?
I do not really understand, because my display consumes 3.3v and I connected it to the 3.3v pin on the arduino board
and I'm still not sure if the display works because I tried to print some text on it using this code:
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>
#define TFT_CS 7
#define TFT_DC 6
#define TFT_RES 8
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RES);
void setup(){
tft.initR(INITR_MINI160x80);
tft.fillScreen(ST7735_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ST7735_WHITE);
tft.setTextWrap(true);
tft.print("hello world!");
}
void loop(){
}
but it still just black
I said signals. Not power.
What about SDA, SCL, DC, RES, and CS? What levels are the signals going into them at? What level signals does the Nano Every output?
Oh I just read that it outputs 5V digital logic level signals. What should I do then?
as I understood I need a logic level shifter