SW500008 Microchip Technology, SW500008 Datasheet - Page 61

PICC-18 STD

SW500008

Manufacturer Part Number
SW500008
Description
PICC-18 STD
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500008

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Standard
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015
778-1001
778-1001
C Language Features
where 23 is the number of bits taken up by the mantissa, to give 0.302447676659. Add one to this
fraction. The floating-point number is then given by:
of these types. Floating point types are always signed and the unsigned keyword is illegal when
specifying a floating point type. Types declared as long double will use the same format as types
declared as double.
via the --double=fast32 command line option. Although selecting this offers an improvement in
speed when doing calculations on 32-bit doubles, this comes at a cost of code size.
3.4.8 Structures and Unions
HI-TECH PICC-18 STD supports struct and union types of any size from one byte upwards.
Structures and unions only differ in the memory offset applied for each 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.4.8.1 Bit-fields in Structures
HI-TECH PICC-18 STD 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:
Variables may be declared using the float and double keywords, respectively, to hold values
There is a fast implementation available for 32-bit doubles. Fast 32-bit doubles can be selected
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
1
struct {
} foo;
struct {
0
2
124
unsigned
unsigned
unsigned
1 302447676659
lo : 1;
dummy : 6;
hi : 1;
1 2 126764793256e 37 1 302447676659 2 77000e 37
Supported Data Types and Variables
47

Related parts for SW500008