Keil Logo

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 Type Bits Bytes Value Range
bit 1   0 or 1
signed char 8 1 -128 to +127
unsigned char 8 1 0 to 255
enum 8 / 16 1 or 2 -128 to +127 or -32768 to +32767
signed short 16 2 -32768 to +32767
unsigned short 16 2 0 to 65535
signed int 16 2 -32768 to +32767
unsigned int 16 2 0 to 65535
signed long 32 4 -2147483648 to +2147483647
unsigned long 32 4 0 to 4294967295
float 32 4 ±1.175494E-38 to ±3.402823E+38
double 64 8 ±1.7E-308 to ±1.7E+308
sbit 1   0 or 1
sfr 16 2 0 to 65535

Note

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

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.