So PORTA.1-2 are outputsCode:' hardware init PORTA = 0 TRISA = %00111001 ' RA1 and RA2 are LED outputs
And BYTES received will beCode:%10101011 or %10101101The manual says:Bitwise Operators: & %00000001 ' Isolate bit 0 of BYTE.Code:PORTA = DAT_IN1 & %00000110
So I'm thinking: & %00000110 ' Isolate bits 1 & 2, would give:
%00000010 from %10101011 & %00000100 from %10101101 as PORTA, depending on which button was pressed and light the LED's.
Hot, cold or tepid?
Dave




Bookmarks