11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C Language FeaturesSupported Data Types and VariablesTable 3.2: Basic data typesType Size (bits) Arithmetic Typebit 1 unsigned integerchar 8 signed or unsigned integer 2unsigned char 8 unsigned integershort 16 signed integerunsigned short 16 unsigned integerint 16 signed integerunsigned int 16 unsigned integerlong 32 signed integerunsigned long 32 unsigned integerfloat 32 realdouble 32 real3.3.4.4 The powerup RoutineSome hardware configurations require special initialisation, often within the first few cycles of executionafter reset. To achieve this there is a hook to the reset vector provided via the powerup routine.This is a user-supplied assembler module that will be executed immediately on reset. Often this canbe embedded in a C module as embedded assembler code. A “dummy” powerup routine is includedin the file powerup.as. The file can be copied, modified and included into your project to replacethe default powerup routine that is present in the standard libraries. If you use a powerup routine,you will need to add a jump to start after your initializations. Refer to comments in the powerupsource file for details about this.3.4 Supported Data Types and VariablesThe HI-TECH <strong>dsPIC</strong>C compiler supports basic data types with 1, 2 and 4 byte sizes. Table 3.2shows the data types and their corresponding size and arithmetic type.3.4.1 Radix Specifiers and ConstantsThe format of integral constants specifies their radix. HI-TECH C supports the ANSI standard radixspecifiers as well as ones which enables binary constants to specified in C code. The format used tospecify the radices are given in Table 3.3. The letters used to specify binary or hexadecimal radices29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!