Hi, Why I cannot use P1^1 directly in source code if i didn't use sbit definition in Keil_C51? Another thing is, how to implement the following function about the "dynamic bit" in Keil_c51 V6.02: { char count; for(count=0; count<8; count++) { ... P1^count = ...; ... } } Thanks. John
"Why I cannot use P1^1 directly in source code" Neither ANSI nor original K&R 'C' provides any notation to access the individual bits of a value; the sbit is Keil's own extension - and that's just the way they've decided to do it! Note that '^' is the 'C' Exclusive-Or operator. As you were instructed when you posted the message, please use the <pre> and </pre> tags when posting code:
{ char count; for(count=0; count<8; count++) { ... P1^count = ...; ... } }