This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is Keil Compiler have bit operator.?

Sir,

Mdoubt is Like Sillicon Lartories(C8051f020) we can initialize the bit operators.
like:
bit a;
bit b;
if(a == 1)
{ LED = 1;
}

This type of keyword is there which supports in ARM processor???

  • No, there isn't.

    The 'bit' keyword extension in Keil C51 just provides support for an inherent part of the 8051 architecture.

    The ARM architecture does not have a corresponding feature, so the Keil ARM compiler doesn't provide this extension.

    You will just have to use the standard 'C' bitwise operators, or see if your specific chip manufacturer provides any support for setting/clearing individual port pins via some sort of library...

    BTW: if your application relies upon significant amounts of single-bit twiddling, you may well be better-off with an 8051 than an ARM...

    See: http://www.keil.com/support/man/docs/gs/gs_ma_portaccess.htm

    As ever, you need to consider the most appropriate chips for the particular requirement at hand - there is no one single "best" processor for all occasions...

  • if your application relies upon significant amounts of single-bit twiddling, you may well be better-off with an 8051 than an ARM...

    Indeed. But rather than using an 8 bitter, using the 16 bitter C167 also offers the bit extension, and might better suit your needs.

  • Quite Possibly.

    But your choice of C167 chips is very limited compared to the vast number of 8051 derivatives.

    "might better suit your needs"

    Indeed. But, without knowing those needs, it's impossible to say.

    So - back to the OP, then...