/*############################################################# Program Name : ex1_LM6029ACW_HelloWorld Author : Grant Phillips Date Modified : 08/02/2016 Compiler : ARMmbed Tested On : STM32F4-Discovery Description : Example program that writes "Hello World!" in normal mode and then inverted to a LM6029ACW graphics LCD. Requirements : * STM32F4-Discovery Board Circuit : * The LM6029ACW is connected as follows: (see the LM6029ACW datasheet for a complete description of each pin). Vss (LM6029ACW pin 1) - GND Vdd (LM6029ACW pin 2) - 3.3V DB7 (pin3) - PC15 DB6 (pin4) - PC14 DB5 (pin5) - PC13 DB4 (pin6) - PC11 DB3 (pin7) - PC9 DB2 (pin8) - PC8 DB1 (pin9) - PC6 DB0 (pin10) - PC2 /RD (pin11) - PD2 /WR (pin12) - PD3 RS (pin13) - PD6 /RES (pin14) - PE2 /CS (pin15) - PD7 BLA (pin16) - PB_7 with a transistor/FET circuit (or 3.3V if it is not required to switch the backlight on and off) ##############################################################*/ #include "mbed.h" #include "LM6029ACW.h" LM6029ACW lcd(PD_7, PE_2, PD_6, PD_3, PD_2, PC_15, PC_14, PC_13, PC_11, PC_9, PC_8, PC_6, PC_2); //Create a LM6029ACW object called lcd // CS1 RES RS WR RD DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 DigitalOut backlight(PB_7); //if the lcd's backlight is connected to a transistor/FET circuit to switch it on and off int main() { backlight = 0; //turn on the lcd's backlight while(1) { lcd.GotoXY(4, 3); //move cursor to row, col lcd.ClrScr(0); //clear all the pixels on the display lcd.PutStr("Hello World!", 1); //print text in black pixels wait(2.0); lcd.GotoXY(4, 3); //move cursor to row, col lcd.ClrScr(1); //fill all the pixels on the display lcd.PutStr("Hello World!", 0); //print text in clear pixels wait(2.0); } }