Go Down

Topic: The screen color change does not fill out all the screen (Read 484 times) previous topic - next topic


I am using tft lcd 3.5 inch ILI9486 to display text. I try to test the LCD using command tft.fillscreen(). However the  screen change colour only at selected area only. Even the screen keep shaking and not clear. How should I do to  make sure the colour cover all the area of screen? thank you


What is the resolution of your screen ? how have you defined it in your code ? where is your code can we have a look (don't forget about the code-tags pls..)
To 'Correct' you have to be Correct. (and not be condescending..)


mine is 320x480 resolution

Code: [Select]
#include <Adafruit_TFTLCD.h>
#include <Adafruit_GFX.h>   
#include <TouchScreen.h>

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

#define TS_MINX 646
#define TS_MINY 952
#define TS_MAXX 512
#define TS_MAXY 210

#define YP A3
#define XM A2
#define YM 9
#define XP 8

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


TouchScreen ts = TouchScreen(XP, YP, XM, YM, 364);

boolean buttonEnabled = true;

void setup() {


And what do the functions
Code: [Select]
uint16_t width();
uint16_t height();
return as values to you ?
To 'Correct' you have to be Correct. (and not be condescending..)


I try it and I got width-320, height-240. How to make height become 480? And it is it normally for range of TS_MINX TS_MAXX etc to be small. I try to calibrate but nothing happen.


The TS_MINX TS_MAXS TS_MNY & TS_MAXY values actually look reasonable to me, but they are specific to each shield's touchscreen. First you have set your TFT width and heigth, to do this open the Adafruit_TFTLCD.cpp file in your libraries folder and change these 4 lines
Code: [Select]
//#define TFTWIDTH   320
//#define TFTHEIGHT  480

#define TFTWIDTH   240
#define TFTHEIGHT  320
so that the other 2 or commented out. (or change the constructor to take to more arguments that set these values in the adafruit_GFX constructor that is being called)
To 'Correct' you have to be Correct. (and not be condescending..)


Yeahh. I'm finally get it. thank you for your help.

Go Up