Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int S1; // assigning a variable S1
- int S2; // assigning another variable S2
- S1=PINx&0b00000001; //Give your one input at first pin of x port
- S2=PINx&0b00000010; //Give your other input at second pin of x port
- while(1)
- {
- if(S1==1 && S2==2) //If both pins taking high input
- { // operational code
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement