Chetan patil
/
LCD
LED blink
Fork of HelloWorld by
Revision 2:b5beac907b15, committed 2015-11-24
- Comitter:
- chetanpatil
- Date:
- Tue Nov 24 08:54:07 2015 +0000
- Parent:
- 1:03c191369089
- Commit message:
- led blink
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jan 01 20:57:57 2012 +0000 +++ b/main.cpp Tue Nov 24 08:54:07 2015 +0000 @@ -1,12 +1,73 @@ -#include "mbed.h" +#include"mbed.h" + + BusOut m(p9,p10,p11,p12,p13,p14,p15,p16); + DigitalOut Rs(p19); + DigitalOut e(p20); + int main () + { + char x[10]="SHRIKEE"; + char Y[10]="CHETAN"; + int i; + Rs=0; + wait(0.5); + m=0x38; + e=1; + wait(0.5); + e=0; + wait(0.5); +m=0x06; -DigitalOut myled(LED1); + e=1; + wait(0.5); + e=0; + wait(0.5); +m=0x0e; + + e=1; + wait(0.5); + e=0; + wait(0.5); +m=0x01; + + e=1; + wait(0.5); + e=0; + wait(0.5); +m=0x80; -int main() { - while(1) { - myled = 1; - wait(0.2); - myled = 0; - wait(0.2); - } -} + e=1; + wait(0.5); + e=0; + wait(0.5); + Rs=1; + wait(0.5); +i=0; + while (x[i]!='\0') + { + + m=x[i]; + e=1; + wait(0.5); + e=0; + wait(0.5); + i++; + + } + m=0xc0; + e=1; + wait(0.5); + e=0; + wait(0.5); + + while (Y[i]!='\0') + { + + m=y[i]; + e=1; + wait(0.5); + e=0; + wait(0.5); + i++; + + } + } \ No newline at end of file