Hello ALL I need to access some of the bit positions of the SFR. But each time i tried to declare a variable of the type sbit , i get error C141: syntax error near sbit. I have read the manual and i even tried the statement :
sbit EA = 0xAF
Thanks Davis! I think the problem was that I placed the declaration within the main program scope. When i placed the statement
sbit EA = 0xAF; </>just after function prototypes, the error cease to exist. Hoever, if you have Sfr (MMCON0 , 0xE4); Sfr (MMCON1 , 0xE5); Sfr (MMCON2 , 0xE6); in the header file, and for example, you need to access the second bit of MMCON1, would something like this sbit RESPEN = 0xE5 + 1; works? Please, take note of the address of MMCON2. Thanks
Sfr (MMCON0 , 0xE4); Sfr (MMCON1 , 0xE5); Sfr (MMCON2 , 0xE6);
sbit RESPEN = 0xE5 + 1;