Hi, I'm using KEIL uVision2 V2.20a, This definition doesn't work, anyone know why ? Usually I'm using this to access each bit separatly in a byte, rather than using shifting ans masking. In my MPLAB C its working fine. But when using this declaration in KEIL I get the error: ERROR C150 'b0' bit member in struct/union My struct definition is: struct structSplitByte { bit b0; bit b1; bit b2; bit b3; bit b4; bit b5; bit b6; bit b7; }; union unionSplit { struct structSplitByte Split; char cValue; }; Or does anyone know a better and easy way to access the value of one bit in a byte ? Thank you, Aldrin,
"If the data you want to access doesn't reside in the bit addressable memory (or an SFR), but is just an 'ordinary' variable in data or xdata, then you'll need to use those mechanisms instead of 'bit' or 'sbit'." OR copy the data to a bit-addressable temporary location, and work with that?