Advanced Micro Processor Experiments SEM-6 Marwadi Education Foundation Rajkot

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
rx5
Date:
Tue Apr 12 06:08:15 2016 +0000
Commit message:
MEFGI, RAJKOT EC

Changed in this revision

TextLCD.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Tue Apr 12 06:08:15 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 12 06:08:15 2016 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "TextLCD.h"
+TextLCD lcd(D2, D3, D4, D5, D6, D7); // LCD PIN => RS, EN, Data4, Data5, Data6, Data7
+
+int main()
+{
+    int i=0;
+    float f=0;
+    lcd.cls(); // Clear LCD
+    lcd.locate(0,0); // cursor on Col=0, Raw=0
+    lcd.printf("Experiment - 4"); // print startup message on LCD first Raw
+    lcd.locate(0,1); // cursor on Col=0, Raw=1
+    lcd.printf("LCD Interfacing"); // print startup message on LCD second Raw
+    wait(3.0); // wait 3 second to show startup message
+    while(1) // loop forever
+    {
+    lcd.cls(); // Clear LCD
+    lcd.locate(0,0); // cursor on Col=0, Raw=0
+    lcd.printf("Int   i = %d",i); // print value of i in first line of LCD
+    lcd.locate(0,1); // cursor on Col=0, Raw=1
+    lcd.printf("Float f = %0.2f",f); // print value of f with resolution of two decimal point in second line of LCD
+    i=i+1; // update i
+    f=f+0.01; // update f
+    wait(1.0); // Wait for 1 second
+
+    }
+    
+}    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Apr 12 06:08:15 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/99a22ba036c9
\ No newline at end of file