Shows ascii code on LCD screen

Dependencies:   mbed OptrexLCD

Files at this revision

API Documentation at this revision

Comitter:
Eduard
Date:
Sun Dec 05 13:47:51 2010 +0000
Commit message:

Changed in this revision

OptrexLCD.lib Show annotated file Show diff for this revision Revisions of this file
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
diff -r 000000000000 -r 62ad00ec22e0 OptrexLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OptrexLCD.lib	Sun Dec 05 13:47:51 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Eduard/code/OptrexLCD/#ef7b6dec773f
diff -r 000000000000 -r 62ad00ec22e0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Dec 05 13:47:51 2010 +0000
@@ -0,0 +1,26 @@
+/*
+Program to run the Ascii code on a 20x4 LCD screen.
+*/
+
+#include "mbed.h"
+#include "OptrexLCD.h"
+
+DigitalOut BlinkLed(LED4);
+
+TextLCD lcd(p10, p12, p15, p16, p17, p18, TextLCD::LCD20x4 ); // rs, e, d0-d3  
+    
+int main() 
+{
+    lcd.cls();
+    BlinkLed = 1;   // show the program is running
+    char i = 0;     // char is only 1 byte (0..255) if i = 255 then next step starts on 0 again.
+    
+    while(1)
+    {    
+        lcd.printf("For Dec:%03d Char= %c\n", i, i++); // %03d displays 3 fixed numbers with trailing zero's.
+        wait(0.5);
+        
+        BlinkLed = !BlinkLed; // if led is blinking the programs runs
+        
+    } 
+}
diff -r 000000000000 -r 62ad00ec22e0 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Dec 05 13:47:51 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e