Advertisement
sreejith2904

led.c (code to blink all leds)

Mar 12th, 2011
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include "LPC214x.h"
  2.  
  3.  
  4. void delay(void)
  5. {
  6.     int k;
  7.     for(k=0;k < 1000;k++)
  8.         ;
  9. }
  10.  
  11. int main(void)
  12. {
  13.    
  14.     IODIR0 = 0xffffffff;
  15.  
  16.     while(1){
  17.         IOSET0 = 0x00003fc0;
  18.        
  19.         delay();
  20.        
  21.         IOCLR0 = 0x00003fc0;
  22.     }
  23.    
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement