Keil™, An ARM® Company

C166 User's Guide

Data Types

The C166 Compiler provides several basic data types you may use in your C programs. The compiler supports the standard C data types as well as several data types that are unique to the C16x/ST10/XC16x platform.

Data TypeBitsBytesValue Range
bit1 0 or 1
signed char81-128 to +127
unsigned char810 to 255
enum8 / 161 or 2-128 to +127 or -32768 to +32767
signed short162-32768 to +32767
unsigned short1620 to 65535
signed int162-32768 to +32767
unsigned int1620 to 65535
signed long324-2147483648 to +2147483647
unsigned long3240 to 4294967295
float324±1.175494E-38 to ±3.402823E+38
double648±1.7E-308 to ±1.7E+308
sbit1 0 or 1
sfr1620 to 65535

Note

  • The bit, sbit, and sfr data types are not provided in ANSI C and are specific to the C166 Compiler.