This program supports the following boards: ARCHPRO,TARGET_K64F,STM32F401xE,STM32F030,LPC1549,KL25Z

Dependencies:   TextLCD mbed

Fork of LCD_Shield-KL25Z by Ryoji Sakai

Files at this revision

API Documentation at this revision

Comitter:
xshige
Date:
Fri Sep 12 02:42:34 2014 +0000
Parent:
2:796f7d90beac
Commit message:
This program supports the following boards: ARCHPRO,TARGET_K64F,STM32F401xE,STM32F030,LPC1549,KL25Z;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Mar 14 14:20:54 2014 +0000
+++ b/main.cpp	Fri Sep 12 02:42:34 2014 +0000
@@ -3,6 +3,50 @@
 
 DigitalOut myled(LED1);
 
+//#define ARCHPRO
+
+#if 0
+// template
+    //  LCD (RS, EN, D4, D5, D6, D7)
+    TextLCD lcd(D8, D9, D4, D6, D6, D7); // LCD Shield for Arduino (DFR00009)
+    AnalogIn button(A0);  // board button
+    PwmOut backlight(D10);
+#endif
+#ifdef ARCHPRO
+    //  LCD (RS, E, D4, D5, D6, D7)
+    TextLCD lcd(P0_0, P0_1, P2_2, P2_3, P2_4, P2_5); // LCD Shield for Arduino (DFR00009)
+    AnalogIn button(P0_23);  // board button
+    //PwmOut backlight(P0_6);
+    DigitalOut backlight(P0_6);    
+#endif
+#ifdef TARGET_K64F
+// *** IMPORTANT NOTE ***
+// to make it work correctly, you should supply directly(Not via PC USB) power to *K64F_USB* connecter.
+// **********************
+    //  LCD (RS, E, D4, D5, D6, D7)
+    TextLCD lcd( PTA0, PTC4, PTB23, PTA2, PTC2, PTC3); // LCD Shield for Arduino (DFR00009)
+    AnalogIn button(PTB2);  // board button
+    //PwmOut backlight(PTD0);
+    DigitalOut backlight(PTD0);
+#endif
+#ifdef STM32F401xE
+    //  LCD (RS, E, D4, D5, D6, D7)
+    TextLCD lcd(PA_9, PC_7, PB_5, PB_4, PB_10, PA_8); // LCD Shield for Arduino (DFR00009)
+    AnalogIn button(PA_0);  // board button
+    PwmOut backlight(PB_6);
+#endif
+#ifdef STM32F030
+    //  LCD (RS, E, D4, D5, D6, D7)
+    TextLCD lcd(PA_9, PC_7, PB_5, PB_4, PB_10, PA_8); // LCD Shield for Arduino (DFR00009)
+    AnalogIn button(PA_0);  // board button
+    PwmOut backlight(PB_6);
+#endif
+#ifdef TARGET_LPC1549
+    //  LCD (RS, E, D4, D5, D6, D7)
+    TextLCD lcd(P0_24, P1_0, P0_10, P0_16, P1_3, P0_0); // LCD Shield for Arduino (DFR00009)
+    AnalogIn button(P0_8);  // board button
+    PwmOut backlight(P0_27);
+#endif
 #ifdef TARGET_KL25Z
     //  LCD (RS, E, D4, D5, D6, D7)
     TextLCD lcd(PTA13, PTD5, PTA4, PTA5, PTC8, PTC9); // LCD Shield for Arduino (DFR00009)
@@ -38,18 +82,18 @@
 int main()
 {
     int count = 0;
-#ifdef TARGET_KL25Z
+//#ifdef TARGET_KL25Z
     backlight = 1;  // ON: 1, OFF: 0
     lcd.cls();
     lcd.printf("HELLO");
     wait(0.5);
-#endif
+//#endif
     while (1)
     {
         myled = (myled == 1) ? 0 : 1;
         count = count + 1;
 
-#ifdef TARGET_KL25Z
+//#ifdef TARGET_KL25Z
         // READ BUTTON VALUE
         unsigned long value = button.read_u16();
 
@@ -60,7 +104,8 @@
 
         lcd.locate(0,1);
         lcd.printf("BUTTON : %04x", value);  // button value
-#endif
+        //lcd.printf("BUTTON : %02x", value>>8);  // button value
+//#endif
         wait(0.2);
     }
 }
--- a/mbed.bld	Fri Mar 14 14:20:54 2014 +0000
+++ b/mbed.bld	Fri Sep 12 02:42:34 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file