I'm slugging away learning C / C18 using pics and have a problem.
I only want the code below to execute if (RCIF is set) AND (the value of gMode is 0x02).
With RCIF set (ie =1) and gMode = 0x03 the "if" code is entered as if gMode = 0x02 when I can set its value as 0x03 in a watch window.
volatile unsigned char gSDI12Mode;
if ((PIR1bits.RCIF == 1) && (gMode == 0x02)); //only recognise uart rx in rcv mode { // interrupt code here.... }
Can anyone please point me in the right direction?
Thanks.