Go Down

Topic: 2.4" Mcufriend Tft display (Not showing Text correctly only geometric shapes) (Read 674 times) previous topic - next topic

jonl

Although I am a relative newbie I have purchased my second  2.4" Mcufriend Tft display.  I was succesful with the first one but this one has left me baffled I am using these libraries and sketches Software:
Arduino IDE 1.6.7 Libraries: libraries.7z st7783.zip.
 If I use the Mygraphicstest sketch in the st7783.zip It displays the Patterns, lines and shapes correctly but when it displays the text it only displays the first character of sentence
I have written a simple sketch to emphasise this.



Code: [Select]
#include "TFTLCD.h"


#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
// optional
#define LCD_RESET A4

// Color definitions
#define  BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF



TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

void setup() {
  tft.reset();
tft.initDisplay();
tft.setRotation(1);
  tft.fillScreen(GREEN);
 //delay (200);
 tft.fillRect(50, 85, 190, 80, RED);
 //tft.fillScreen(RED);
  //tft.fillRect(100, 100, 50, 60, RED);
}

void loop() { 
 
 
tft.setCursor (50, 100);
  tft.setTextSize (8);
  tft.setTextColor(BLACK);
 
  tft.println(111.5);

  delay (100);
  tft.setCursor (90, 100);
  tft.setTextSize (8);
  tft.setTextColor(RED);
 
 
 

  tft.setCursor(50, 20);
  tft.setTextColor(BLUE);
  tft.setTextSize(5);
  tft.println("Hello World!");
}


This is the result on the display .
 I am unsure whether this is a hard ware fault or a libraries issue any help would be appreciated .
Thank you John

Ps when I preview this dosent show display pic if it isnt displayed the Display Shows capital "H"and "1.50" within red rectangle.

-dev

Really, I used to be /dev.  :(

padouet

Theory is when you know how it works and nothing happens.
Practice is when everything works and nobody knows why.
I gathered theory and practice: Nothing works ... and nobody knows why!

Go Up