FRDM-KL25Z with Arduino LCD KeyPad Shield (SKU: DFR0009).

Dependencies:   TextLCD mbed

FRDM-KL25Z with Arduino LCD KeyPad Shield (SKU: DFR0009).

/media/uploads/MRSa/lcd-shield.jpg

/***
 * ---------------------------------------------
 *   Arduino LCD KeyPad Shield (SKU: DFR0009)
 * ---------------------------------------------
 *  - Button            : a0  -> PTB0
 *                           right  : < 0x0100
 *                           up     : < 0x5400
 *                           down   : < 0xa500
 *                           left   : < 0xfd00
 *                           select : ???
 * ---------------------------------------------
 *  - DB4               : d4  -> PTA4
 *  - DB5               : d5  -> PTA5
 *  - DB6               : d6  -> PTC8
 *  - DB7               : d7  -> PTC9
 *  - RS                : d8  -> PTA13
 *  - Enable            : d9  -> PTD5
 *  - Backlight Control : d10 -> PTD0
 * ---------------------------------------------
 *  - http://www.dfrobot.com/wiki/index.php/Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)
 *  - http://www.dfrobot.com/index.php?route=product/product&keyword=DFR0009&category_id=0&description=1&model=1&product_id=51
 *  - http://www.amazon.co.jp/dp/B00ACCN148
 *  - http://akizukidenshi.com/catalog/g/gM-07029/
***/

Files at this revision

API Documentation at this revision

Comitter:
MRSa
Date:
Fri Mar 14 14:17:00 2014 +0000
Parent:
0:ca0a38f28cbe
Child:
2:796f7d90beac
Commit message:
add backlight control.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Mar 13 14:40:15 2014 +0000
+++ b/main.cpp	Fri Mar 14 14:17:00 2014 +0000
@@ -7,6 +7,7 @@
     //  LCD (RS, E, D4, D5, D6, D7)
     TextLCD lcd(PTA13, PTD5, PTA4, PTA5, PTC8, PTC9); // LCD Shield for Arduino (DFR00009)
     AnalogIn button(PTB0);  // board button
+    PwmOut backlight(PTD0);
 #endif
 
 /***
@@ -38,6 +39,7 @@
 {
     int count = 0;
 #ifdef TARGET_KL25Z
+    backlight = 1;  // ON: 1, OFF: 0
     lcd.cls();
     lcd.printf("HELLO");
 #endif