Guest User

Untitled

a guest
Apr 24th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. int main(void) {
  2.  
  3.     //Stop Watchdog Timer
  4.     WDTCTL = WDTPW + WDTHOLD;
  5.  
  6.     //Configure Port Directions
  7.     P1DIR = (BIT0 + BIT6);
  8.    
  9.    
  10.    
  11.     //Loop forever
  12.     for(;;) {
  13.         //Produce a delay
  14.         unsigned int i = 50000;
  15.         while(i>0) {
  16.             i--;
  17.         }
  18.         BIT0 = 0x01;
  19.            
  20.         unsigned int f = 50;
  21.         while(f>0) {
  22.             f--;
  23.         }
  24.         BIT6 = 0x40;
  25.        
  26.     }
  27.  
  28. }
Add Comment
Please, Sign In to add comment