1

I'm currently trying to fill out the constructor but I'm not sure what's what... The constructor of the UTFT library goes as follows:

UTFT(Model, SDA, SCL, CS, RST[, RS]);

Where the last bit is optional.

SDA meaning Serial Data, SCL serial clock, CS chip select, RST reset and RS register select.

enter image description here

This is the screen I'm trying to connect. As far as I understand:

SDI (MOSI) goes to SDA

SCK goes to SCL

CS goes to CS

RST goes to Reset?

RS goes to D/C?

But it doesn't work. What am I missing...

Here's my full code:

#include <UTFT.h>

//Digital Pins:
//53 = MOSI 
//52 = SCK, 
//10 = CS 
//6 = RS 
//7 = D/C
UTFT myGLCD(ILI9341_S5P,53,52,10,6,7);  

void setup() {
    myGLCD.InitLCD(PORTRAIT);
    myGLCD.clrScr();

}

void loop() {
    myGLCD.fillScr(0,0,255);

}

I did get the screen to work with the Adafruit_GFX library. I used 1k resistors between all of the data lines, including reset. When using the screen with the GFX library I connected reset to 3,3v.

8
  • 1
    SDA/SCL is I2C (Wire). MISO/MOSI/CLK/CS is SPI – Juraj Mar 8 '18 at 15:55
  • from where do you have the UTFT library? I don't see one in Library Manager – Juraj Mar 8 '18 at 16:08
  • @Juraj found it on rinky-dink electronics: rinkydinkelectronics.com/library.php?id=51 – Streamline Mar 8 '18 at 16:10
  • the library is not for SPI connected display – Juraj Mar 8 '18 at 16:16
  • it doesn't work does not describe the observed results. – jsotola Mar 8 '18 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.