MPC Product News
The following sections describe new features in Byte Craft Limited Products.
24- and 32-bit integer and floating point (IEEE 754) math are now available.
The integer types are int24 and int32.
The floating point types are float (32 bits), float24 and float32. The 32-bit types provide 23-bit mantissa and 9-bit (8 bits + sign) exponent; the 24-bit type provides 15 bits mantissa. In both cases the dynamic range is the same, but the precision changes.
Transcendental functions are also available in the math library.
The compiler can compress string constants in ROM for certain parts, placing two 7-bit ASCII characters within a 14-bit word. The parts are those with 14-bit cores and Flash capability.
To enable this capability, include the statement:
#pragma option PACKED_ASCII_CONSTANTS;
in your source.
MPC supports aliases in declarations for variables and ports. Address aliases allow the compiler to make memory accesses without altering memory management control bits when possible. This reduces the number of instructions that must be generated for some memory accesses.
Aliases take the form of:
declaration@addr1,addr2,addr3...
where declaration is the variable or #pragma port declaration, and where addr1 and others are alternate locations for the port or variable.
You can use the alias syntax in RAM and ROM declarations:
#pragma memory RAM ram_space_name [size] @ address1, address2;
#pragma memory ROM rom_space_name [size] @ address1, address2;
Later header files for MPC will use this notation. Older header files will work without this notation, but the compilers will create less efficient code as a result.
You can also use this notation in variable declarations, when specifying the variable's location using the @ sign:
char result @ 0x40, 0xC0;
This tells the compiler that the variable result is available at both locations 0x40 and 0xC0, and the compiler does not need to bank switch if it can access one of the alternate addresses.
The compiler will catch more obvious errors like
char result @ 0x41, 0x85;
because the two addresses are not in the same position within their banks. However, if you were to specify
char result @ 0x40, 0x80;
where 0x40 and 0x80 are not multiply-mapped (are separate memory locations) in your PIC variant, the compiler will not raise an error. The generated code will not bank switch as necessary, and will be therefore unreliable.
MPC is compatible with Microchip's MPLAB development environment. It works with the MPLAB-SIM simulator and the PICMASTER emulator system. To configure MPLAB to work with MPC, see the PDF document "Using MPC with MPLAB".
On occasion, you will receive an error from MPLAB related to "Extended CPU instructions". This error is benign; it arises from an MPLAB-internal problem related to object file formats.
When including libraries into your program using Absolute Code Mode, one step is no longer required. To use a library, simply #include the header file at the beginning of your main source module. You no longer need to #include the .C or .LIB file at the end of the main source module.
Ensure that the folder holding the library header files is present in the INCLUDE path, and the folder holding the library files is in the LIBRARY path.
You can set the value stored in unused ROM locations with the #pragma option fillrom statement:
#pragma option fillrom value;where value is an 8-bit integer expression.
The default integer size of Code Development Systems is 8 bits. If the symbol __INT16 is defined, it indicates that the default integer size is 16 bits.
The __INT16 preprocessor symbol is defined by the compiler when either the +i is set on the command line, or the #pragma option +h directive appears in a source file.

eTPU_C:
C6808: