SW500010 Microchip Technology, SW500010 Datasheet - Page 76

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
Supported Data Types and Variables
The psects in which bit objects are allocated storage are declared using the bit PSECT directive
flag. Eight bit objects will take up one byte of storage space which is indicated by the psect’s scale
value of 8 in the map file. The length given in the map file for bit psects is in units of bits, not bytes.
All addresses specified for bit objects are also bit addresses.
non-zero initial value, explicitly initialise it at the beginning of your code.
3.3.3 8-Bit Integer Data Types and Variables
HI-TECH C PRO for the PIC10/12/16 MCU Family supports both signed char and unsigned
char 8-bit integral types. If the signed or unsigned keyword is absent from the variable’s def-
inition, the default type is unsigned char. The signed char type is an 8-bit two’s comple-
ment signed integer type, representing integral values from -128 to +127 inclusive. The unsigned
char is an 8-bit unsigned integer type, representing integral values from 0 to 255 inclusive. It
is a common misconception that the C char types are intended purely for ASCII character ma-
nipulation. This is not true, indeed the C language makes no guarantee that the default character
representation is even ASCII. The char types are simply the smallest of up to four possible integer
sizes, and behave in all respects like integers.
represent characters. It is possible to freely mix char values with short, int and long values in
C expressions. With HI-TECH C the char types will commonly be used for a number of purposes,
as 8-bit integers, as storage for ASCII characters, and for access to I/O locations.
3.3.4 16-Bit Integer Data Types
HI-TECH C PRO for the PIC10/12/16 MCU Family supports four 16-bit integer types. short and
int are 16-bit two’s complement signed integer types, representing integral values from -32,768
to +32,767 inclusive. Unsigned short and unsigned int are 16-bit unsigned integer types,
representing integral values from 0 to 65,535 inclusive. All 16-bit integer values are represented in
little endian format with the least significant byte at the lower address.
keyword sequences, respectively, to hold values of these types. When specifying a short int
type, the keyword int may be omitted. Thus a variable declared as short will contain a signed
short int and a variable declared as unsigned short will contain an unsigned short
int.
76
The bit psects are cleared on startup, but are not initialised. To create a bit object which has a
If the PICC flag --STRICT is used, the bit keyword becomes unavailable.
The reason for the name “char” is historical and does not mean that char can only be used to
Variables may be declared using the signed short int and unsigned short int
C Language Features

Related parts for SW500010