Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
struct BITACCESS{
unsigned A : 1;
unsigned B : 1;
unsigned C : 1;
unsigned D : 1;
unsigned E : 1;
} flags;
flags.A = x;
All I know is... Pic assembly only allows bit access to a few ram locations... AVR may be the same... If your compiler is the GNU derivative ( I think it is )
Yeah! scrambling to find where I read it... I definitely know the 8051 does, I thought I read somewhere that because of banking the bit access was restricted to lower bank... But that probably ony happened way back.. I did used to use the old 12f508..Are you sure about that Ian?.
The 14 bit assembler bit based routines use 7 bit addressing, so will address 128 bytes per memory bank - with (often) the lower 32 as SFR, and the top 16 RAM locations common across all banks. So about a maximum of 80 bytes per bank, plus the 16 common ones.
Are you perhaps thinking of the common 16 bytes?, and if so is that perhaps a limitation of the C compiler?.
Yeah! scrambling to find where I read it... I definitely know the 8051 does, I thought I read somewhere that because of banking the bit access was restricted to lower bank... But that probably ony happened way back.. I did used to use the old 12f508..
I used the 12F208 for a number of projects way back and can confirm there were no restrictions on using the 25 ( ) bytes of memory - however, I was in assembly then.