sbit name = sfr-name ^ bit-position;
sbit name = sfr-address ^ bit-position;
sbit name = sbit-address;
Where
name is the name of the SFR bit.
sfr-name is the name of a previously-defined SFR.
bit-position is the position of the bit within the SFR.
sfr-address is the address of an SFR.
sbit-address is the address of the SFR bit.
With typical 8051 applications, it is often necessary to access individual bits within an SFR. The sbit type provides access to bit-addressable SFRs and other bit-addressable objects. For example:
sbit TestLed = P1^6;
TestLed = name;
P1 = SFR port1
6 = bit position means Port1 6th bit