Guest User

Untitled

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