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.
9 years, 8 months ago.
Sample Test Code for 24_TFT_STMNUCLEO:24_TFT_STMNUCLEO
Do you have a working sample to test this library?
Question relating to:
4 Answers
9 years, 8 months ago.
You defenitivelly need a main.c.
Did it compile before? First time you run the mbed some variables need to be updated for it to compile. This is mbed specific. Ill try to find my STM nucleo and the display and fire the lcd up sometime this week, Keep an eye.
7 years, 1 month ago.
I'm having trouble with this one also. When I import the project the #include "ili9328.h" and #include "ili9328.cpp" are still the ones for 16 bit displays while the main is for 8-bit. This might be your problem also.
I would really like to have this working so I will keep fighting it.
Thanks, Bert
8 years ago.
Here is a test program for the STM Nucelo boards (Tested on a STM32F303RE )
Import program
00001 #include "mbed.h" 00002 #include "ili9328.h" 00003 00004 // prepare the data bus for writing commands and pixel data 00005 BusOut dataBus( D8, D9, D2, D3, D4, D5, D6, D7 ); // 8 pins 00006 // create the lcd instance 00007 ILI9328_LCD lcd( A3, A4, A2,A1, &dataBus, NC, A0); // control pins and data bus 00008 //ILI9328_LCD( CS, RESET, RS, WR, BusOut* DATA_PORT, PinName BL = NC, RD ); 00009 00010 int main() 00011 { 00012 int ii,height,width; 00013 00014 height = lcd.GetHeight(); 00015 width = lcd.GetWidth(); 00016 // initialize display - place it in standard portrait mode and set background to black and 00017 // foreground to white color. 00018 lcd.Initialize(); 00019 00020 // print something on the screen 00021 lcd.Print( "Hello, World!", CENTER, 50); // align text to center horizontally and use starndard colors 00022 00023 wait(2); 00024 00025 lcd.ClearScreen(); 00026 00027 for(ii=0;ii<width;ii++) 00028 { 00029 lcd.DrawLine(0, 0, height, ii,COLOR_GREEN); 00030 ii = ii+10; 00031 } 00032 wait(2); 00033 00034 lcd.DrawCircle(height/4, width/4, 20, COLOR_GREEN); 00035 wait(2); 00036 00037 lcd.FillCircle(height/2, width/2, 50, COLOR_GREEN); 00038 wait(2); 00039 00040 lcd.FillTriangle(height/4, width/4,(height/4)+20, (width/4)+40,(height/4)-20, (width/4)+40, COLOR_RED); 00041 00042 while ( 1 ) { } 00043 }
7 years, 7 months ago.
Hi,
I've testet the program on Nucleo-F446RE with a MCUfriend 2.8" (Below, picture from www)
However, once download and running, the pattern is as I would say it transposed and the text is written from right to left and the characters are mirrored and upside down..??
Help much needed :-) Frank
As it is it will display some text and fill the screen with color. If it doesn't the controller is not supported
posted by Carlos Silva 14 Mar 2015Dear Carlos, maybe I'm doing something wrong. In the first place I thought I need a "main.c" with some #includes to .h files, so I was a little confused not finding a main.c in your library code. Accordind to your answer, now I tried to compile without a main.c file. I made a new program, added your library and the mbed library. Then I pushed the Compile button and I got: Error: Undefined symbol $Super$$main (referred from retarget.o). Can you tell me what I'm doing wrong?
posted by Wolfgang Heinrich 15 Mar 2015