SW500010 Microchip Technology, SW500010 Datasheet - Page 79

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
C Language Features
member. The members of structures and unions may not be objects of type bit, but bit-fields are
fully supported.
structures and unions are fully supported.
3.3.8.1 Bit-fields in Structures
HI-TECH C PRO for the PIC10/12/16 MCU Family fully supports bit-fields in structures.
bit of the word in which it will be stored. When a bit-field is declared, it is allocated within the
current 8-bit unit if it will fit, otherwise a new byte is allocated within the structure. Bit-fields can
never cross the boundary between 8-bit allocation units. For example, the declaration:
will produce a structure occupying 1 bytes. If foo was ultimately linked at address 10H, the field
lo will be bit 0 of address 10H, hi will be bit 7 of address 10H. The least significant bit of dummy
will be bit 1 of address 10H and the most significant bit of dummy will be bit 6 of address 10h.
registers. For example, if dummy is never used the structure above could have been declared as:
If a bit-field is declared in a structure that is assigned an absolute address, no storage will be allocated
for the structure. Absolute structures would be used when mapping a structure over a register to allow
a portable method of accessing individual bits within the register.
for each field. For example:
Structures and unions may be passed freely as function arguments and return values. Pointers to
Bit-fields are always allocated within 8-bit words. The first bit defined will be the least significant
Unnamed bit-fields may be declared to pad out unused space between active bits in control
A structure with bit-fields may be initialised by supplying a comma-separated list of initial values
struct {
} foo;
struct {
} foo;
struct {
} foo = {1, 8, 0};
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
lo : 1;
dummy : 6;
hi : 1;
lo : 1;
hi : 1;
lo
mid : 6;
hi
: 6;
: 1;
: 1;
Supported Data Types and Variables
79

Related parts for SW500010