• Can SFRs and Sbits be defined as volatile?
    sbit P07 = 0x87; void main() { while(P07); // End Program unless we get error printf("Error - line went low"); // Print Error being recieved for(;;) // End after Error } Problem is that it never...
  • How to use extern sbit declare?
    I declare a variable unsigned char bdata Kde in a.c . [in file a.c] unsigned char bdata Kde; Than I want to use the variable in b.c . [in file b.c] #include <stdio.h> ..... extern unsigned...
  • Alternate method of using "sfr" and "sbit" for Misra Compliance
    I want to change my code along with Compiler library header files to have Misra-C Compliance. For the following code, there is an Misra Violation saying that "There shall be no definitions of objects...
  • bit (and sbit) operation with == and != (bug?)
    I have a problem that i cannot solve. I need to compare two bit values. Lets say: bit Low = 0; bit High = 1; But I get some really strange results if I try to compare both of them: Low ...
  • in C51 ,SFR Bit ??
    Programe is following #,,,, sfr p0 = 0x80; sbit p10 = p0^0; sbit p11 = p0^1; void main(void) { ... fc(p10); } void fc(bit bv) { bv=1; ..... // delay bv=0; } but output of p10 is...