The difference lies in the different functions:
Bit: it is a variable type, which is equivalent to boot occupying only one bit, and at most 128-bit variable can be set.
Sbit: A bit of a bit addressable variable (or special function register) is given a separate name, which does not occupy another space.
Extended data:
The use of c language sbit in single chip microcomputer-
1 and bit scalar.
Bit scalar is an extended data type of c5 1 compiler. It can be used to define bit scalars, but it cannot define bit pointers or bit arrays. Its value is a binary bit, not 0 or 1, similar to true and false in Boolean.
2.sfr special function register.
Sfr is also an extended data type, which uses a memory cell ranging from 0 to 255. It can be used to access all special function registers in 5 1 single chip microcomputer. If sfr P 1 = 0x90, this sentence defines P 1 as the on-chip register of the P 1 port. In the following statements, we can use statements such as P 1=255 (all pins of the P 1 port are set high) to operate special function registers.
Sfr is a special function register that defines 8 bits, while sfr 16 is a special function register that defines 16 bits.