ravi butani
/
MEFGI
Advanced Micro Processor Experiments SEM-6 Marwadi Education Foundation Rajkot
Revision 0:c7aaecd69812, committed 2016-04-12
- Comitter:
- rx5
- Date:
- Tue Apr 12 06:08:15 2016 +0000
- Commit message:
- MEFGI, RAJKOT EC
Changed in this revision
diff -r 000000000000 -r c7aaecd69812 TextLCD.lib --- /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
diff -r 000000000000 -r c7aaecd69812 main.cpp --- /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 + + } + +}
diff -r 000000000000 -r c7aaecd69812 mbed.bld --- /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