Guest User

Untitled

a guest
Jul 1st, 2014
304
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main()
  2. {
  3.     DDRD=0b11111100;
  4.     PORTD=0b00000011;
  5.     uint8_t x;
  6.  
  7.     while(1)
  8.     {
  9.         x = PIND&0b00000011;
  10.         if(x==0b00000001)
  11.         {
  12.             // this code runs
  13.         }
  14.         if(PIND==0b00000010)
  15.         {
  16.             //this code runs
  17.         }
  18.     }
  19. }
RAW Paste Data