Thanks Bruce. The issue that led me to this question is obviously something else.
I'm using LONG variables for the first time, and have an issue where a bit in a 24-bit LONG is being changed/corrupted by me TOGGLEING another, unrelated BIT variable! I figured the problem is me MISDECLARING my variables OR my interrupt handler. Bit 14 of the LONG variable GRN is being corrupted when I toggle the bit variable SOLO. (If I don't use interrupts, the problem goes away).
My variable declarations are:
Code:
RED VAR LONG
GRN VAR LONG
BUTTONS VAR LONG
X VAR LONG
Y VAR BYTE
Z VAR BYTE
RED0 VAR RED.BYTE0
RED1 VAR RED.BYTE1
RED2 VAR RED.BYTE2
GRN0 VAR GRN.BYTE0
GRN1 VAR GRN.BYTE1
GRN2 VAR GRN.BYTE2
BU0 VAR BUTTONS.BYTE0
BU1 VAR BUTTONS.BYTE1
BU2 VAR BUTTONS.BYTE2
LCD VAR BYTE[80]
COUNTER VAR BYTE
VOL VAR BYTE
SOLO VAR BIT
Thanks.
Bookmarks