Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 1 month ago.
TFT DMtft43-108 and LPC1768
I am using the TFT with LPC1768 and the connection is as following Lpc1786 pin num. pin5 mosi to 6 of TFT connecter. pin6 miso to pin 7 of TFT connecter. pin7 sck to pin 5 of of TFT connecter. pin8 racs to pin 9 of TFT connecter.
each pin 5 to 8 is pulled up by 10Kohm to 3.3V.
pin40 3.3v is to 1,3 of tft. and 2,4 GND of tft is to ground and other pins of the tft connecter are all pulled up to 3.3v through 8.6k. and 0.1u capacitor is added between pin 8(ra_rst) and the ground. ( f_cs, ra_int, ra_rst, sd_cs, f_sel, ra_wait pins are not connected to the LPC1768)
I have checked all the connection between lpc1668 pins and the tft pins at the foot of the each connecter. And they are ok. I have checked the voltage of all pins statistically with my voltage tester at the foot of tft connecter on the LPC1768 side. And they are all ok.
I checked the tft with both software , RA8875 demo (ra8875hallow) and dmtft from DisplayModule,
I set up the software using pin 5 to8 in ra8875hallow.
But the both result are the same. The tft face is keeping white on all around the face (so the VCC 3.3V and the back lit is OK) but it does not display anything on it.
Off course, I have also checked that the lpc1768 unit is running successfully with the software “blinky”.
What should I do next ?
---------
software is as follows.
- include "mbed.h"
- include "RA8875.h"
int main() { DigitalOut myled1(LED1); DigitalOut myled2(LED2); DigitalOut myled3(LED3); DigitalOut myled4(LED4); int count =0 ; myled1=1 ; myled2=1 ; myled3=1 ; myled4=1 ; wait_ms(1000); myled1=0 ; myled2=0 ; myled3=0 ; myled4=0 ;
int i; Timer t; float f = 100000; 10000000; RA8875 lcd(p5, p6, p7, p8, NC, "tft"); MOSI, MISO, SCK, /ChipSelect, /reset, name
myled1=1; t.start(); lcd.init();
lcd.frequency(f); lcd.cls(); wait_ms(250);
uint32_t tStart = t.read_us(); myled2=1;
lcd.puts(0,0, "RA8875 lcd(p5, p6, p7, p12, NC, \"tft\");\r\n" "lcd.init(true, 480,272,16);\r\n" "lcd.circle( 400,25, 25, BrightRed);\r\n" "lcd.fillcircle( 400,25, 15, RGB(128,255,128));\r\n" "lcd.ellipse( 440,75, 35,20, BrightBlue);\r\n" "lcd.fillellipse( 440,75, 25,10, Blue);\r\n" "lcd.triangle( 440,100, 475,110, 450,125, Magenta);\r\n" "lcd.filltriangle( 445,105, 467,111, 452,120, Cyan);\r\n" "lcd.rect( 400,130, 475,155, Brown);\r\n" "lcd.fillrect( 405,135, 470,150, Pink);\r\n" "lcd.roundrect( 410,160, 475,190, 10,8, Yellow);\r\n" "lcd.fillroundrect(415,165, 470,185, 5,3, Orange);\r\n" "lcd.line( 430,200, 460,230, RGB(0,255,0));\r\n" "for (i=0; i<=30; i+=5)\r\n" " lcd.pixel(435+i,200+i, White);");
myled3=1;
lcd.circle( 400,25, 25, BrightRed); lcd.fillcircle( 400,25, 15, RGB(128,255,128)); lcd.ellipse( 440,75, 35,20, BrightBlue); lcd.fillellipse( 440,75, 25,10, Blue); lcd.triangle( 440,100, 475,110, 450,125, Magenta); lcd.filltriangle( 445,105, 467,111, 452,120, Cyan); lcd.rect( 400,130, 475,155, Brown); lcd.fillrect( 405,135, 470,150, Pink); lcd.roundrect( 410,160, 475,190, 10,8, Yellow); lcd.fillroundrect(415,165, 470,185, 5,3, Orange); lcd.line( 430,200, 460,230, RGB(0,255,0));
myled4=1;
for (i=0; i<=30; i+=5) lcd.pixel(435+i,200+i, White);
uint32_t tEnd = t.read_us(); pc.printf("@ %4.2f MHz, elapsed time is %u usec.\r\n", (float)f/1000000, tEnd-tStart);
lcd.KeypadInit(); wait_ms(1000); myled1=0 ; myled2=0 ; myled3=0 ; myled4=0 ;
while(1) { while( !lcd.readable() ) ;
if (lcd.readable()) { int k = lcd.getc(); pc.printf("key: %02X \r\n", k); } wait_ms(50); count = count +1 ; if ( count >20 ){ myled4 = 0; } if ( count > 40 ){ myled4=1 ; count =0; }
} }