MarVin666

pierwsze

Sep 29th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include<msp430x14x.h>
  2.  
  3. void main(void)
  4. {
  5.  
  6.   WDTCTL = WDTPW + WDTHOLD;  // Zatrzymanie watchdog timera
  7.  
  8.   P4DIR &= ~0x20;
  9.   P2DIR |= 0x02;
  10.  
  11.   while(1==1)
  12.   {
  13.    if((P4IN & 0x20)!=0)
  14.     {
  15.         P2OUT |=0x02;
  16.     }
  17.     else
  18.     {
  19.         P2OUT &= ~0x02;    
  20.     }
  21.  
  22.   }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment