a 'minimalist' display working - no touch screen or anything.
My code is:
Code: Select all
// TFT module connections
sbit TFT_BLED_Direction at TRISC2_bit;
sbit TFT_BLED at LATC2_bit;
sbit TFT_CS_Direction at TRISF12_bit;
sbit TFT_CS at LATF12_bit;
unsigned int TFT_DataPort_Direction at TRISE;
unsigned int TFT_DataPort at LATE;
sbit TFT_RD_Direction at TRISD5_bit;
sbit TFT_RD at LATD5_bit;
sbit TFT_RS_Direction at TRISB15_bit;
sbit TFT_RS at LATB15_bit;
sbit TFT_RST_Direction at TRISC1_bit;
sbit TFT_RST at LATC1_bit;
sbit TFT_WR_Direction at TRISD4_bit;
sbit TFT_WR at LATD4_bit;
// End TFT module connections
void main(){
AD1PCFG = 0xFFFF; // Configure AN pins as digital I/O
JTAGEN_bit = 0; // Disable JTAG
TFT_BLED_Direction = 0; // Set TFT backlight pin as output
TFT_Init_SSD1963(480,272); // used on MikromediaPlus
TFT_Set_DBC_SSD1963(255); // what is this function ????????? Edited on 27/10/2017: IT TURNS THE BACK LIGHT FULL ON i.e. 255/255
TFT_BLED = 1; // Turn on TFT backlight
TFT_Fill_Screen(CL_WHITE);
TFT_Set_Pen(CL_BLACK, 3);
TFT_Line(0, 200, 477, 200);
TFT_Set_Font(&TFT_defaultFont, CL_BLACK, FO_HORIZONTAL);
TFT_Write_Text("TEST MESSAGE 1", 50, 50);
while(1){
delay_ms(100);
}
}
1. What is the function TFT_Set_DBC_SSD1963(255) I copied it from the driver built using the Visual TFT, without
it the screen is blank but I can not find any help on this function?
2. The line and text appears but in the wrong colours - why?
Anyone got some minimalist code I can try?
Regards Bill Legge