comparing inputs | Cypress Semiconductor
Ive been playing around with my PSoC eval1 board and I was trying to write a code that would look at two inputs and if one was high but the other wasnt then an led would come on but if both were on or none or any other condition other than outlined then the led would come on,
I was thinking i might work something like this:
if (PRT1DR |= 0X01 && PRT1DR !=0X02) // port 1.0 High, port 1.1 low
// No led on
I am not 100% on how to do this but ill look it up if i can find some useful info on the subject.