Modified TextLCD lib. The RW signal is also connected to a IO pin. This enable to read out the display memory and the busy flag. The timing is switched from delays to wait for the busy flag. Added writeCGRAM function to define user chars 0-7.

Dependents:   TwitterClient CSVParser _EXAMPLE_RFM12B mbed_blinky6 ... more

Files at this revision

API Documentation at this revision

Comitter:
dreschpe
Date:
Mon Dec 06 00:06:48 2010 +0000
Parent:
1:ac2c6d0cc538
Child:
3:8582013914a0
Commit message:

Changed in this revision

TextLCD.h Show annotated file Show diff for this revision Revisions of this file
--- a/TextLCD.h	Mon Dec 06 00:01:25 2010 +0000
+++ b/TextLCD.h	Mon Dec 06 00:06:48 2010 +0000
@@ -36,7 +36,35 @@
  * TextLCD lcd(p10, p12, p15, p16, p29, p30); // rs, rw, e, d0-d3
  * 
  * int main() {
- *     lcd.printf("Hello World!\n");
+ *     lcd.printf("Hello mbed\n");
+ *
+ * //define user chars
+ *  int pattern[8];
+ *  int pattern1[8];
+ *  pattern[0] = 1;              //     *
+ *  pattern[1] = 3;              //    **
+ *  pattern[2] = 5;              //   * *
+ *  pattern[3] = 9;              //  *  *
+ *  pattern[4] = 0x11;           // *   *     
+ *  pattern[5] = 0x19;           // **  * 
+ *  pattern[6] = 0x1d;           // *** *
+ *  pattern[7] = 0x1f;           // *****
+ *  
+ *  pattern1[0] = 0x10;          // *
+ *  pattern1[1] = 0x18;          // **
+ *  pattern1[2] = 0x14;          // * *
+ *  pattern1[3] = 0x12;          // *  *
+ *  pattern1[4] = 0x11;          // *   *
+ *  pattern1[5] = 0x13;          // *  **
+ *  pattern1[6] = 0x17;          // * ***
+ *  pattern1[7] = 0x1f;          // *****
+ * 
+ *  lcd.writeCGRAM(0, pattern);
+ *  lcd.writeCGRAM(1, pattern1);
+ *  
+ *  lcd.locate(15,0);
+ *  lcd.putc(0);   // user pattern 0
+ *  lcd.putc(1);   // user pattern 1   
  * }
  * @endcode
  */