LED blink

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

main.cpp

Committer:
chetanpatil
Date:
2015-11-24
Revision:
2:b5beac907b15
Parent:
0:fb6bbc10ffa0

File content as of revision 2:b5beac907b15:

#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;

 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;

 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++;
   
  }
 }