i am trying to increase count = count + 1; using above situation. Everytime above condition is true it should incremenet the value of count = count + 1; means count is incremented on every true of above condition.
Your code will increment the count every time the test is made while the port bits are high. I assume you want to only count once for each time the condition becomes true. So, you need to have a flag you set when the condition becomes true and cleared when the condition becomes false. Only count when you first detect the condition being true.
Your code will increment the count every time the test is made while the port bits are high. I assume you want to only count once for each time the condition becomes true. So, you need to have a flag you set when the condition becomes true and cleared when the condition becomes false. Only count when you first detect the condition being true.