The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN
HANEL

DATA TYPESBit and sfr


‰The bit data type allows access to single bits of bit-addressable memory spaces 20


– 2FH


‰To access the byte-size SFR registers, we use the sfr data type


RAM addresses 80


  • FFH only


8-bit

sfr

RAM bit-addressable only

1-bit

bit

SFR bit-addressable only

1-bit

sbit

-32768 to +32767

16-bit

(signed) int

0 to 65535

16-bit

unsigned int

-128 to +127

8-bit

(signed) char

0 to 255

8-bit

unsigned char

Data Range/Usage

Size in Bits

Data Type
Free download pdf