SW500009 Microchip Technology, SW500009 Datasheet - Page 57

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
C Language Features
will be allocated in the bit-addressable psect rbit, and will be visible only in that function. When
the following declaration is used outside any function:
init_flag will be globally visible, but located within the same psect.
by using the bit keyword in the functions prototype in the usual way. The bit return value will be
returning in the carry flag in the status register.
contain the values 0 and 1, and therefore provide a convenient and efficient method of storing boolean
flags without consuming large amounts of internal RAM. It is, however, not possible to declared
pointers to bit variables or statically initialise bit variables.
possible, thus the generated code to access bit objects is very efficient.
used. For example, if the bit variable bitvar was assigned as in the following:
it will be cleared by the assignment since the least significant bit of data is zero. If you want to set
a bit variable to be 0 or 1 depending on whether the larger integral type is zero (false) or non-zero
(true), use the form:
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.
Bit variables cannot be auto or parameters to a function. A function may return a bit object
Bit variables behave in most respects like normal unsigned char variables, but they may only
Operations on bit objects are performed using the single bit instructions (bsf and bcf) wherever
Note that when assigning a larger integral type to a bit variable, only the least-significant bit is
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.
static bit init_flag;
bit init_flag;
int data = 0x54;
bit bitvar;
bitvar = data;
bitvar = data != 0;
Supported Data Types and Variables
43

Related parts for SW500009