PCD COMMAND LINE COMPILER Custom Computer Services Inc (CCS), PCD COMMAND LINE COMPILER Datasheet - Page 62

PCD C-COMPILER PIC24, DSPIC

PCD COMMAND LINE COMPILER

Manufacturer Part Number
PCD COMMAND LINE COMPILER
Description
PCD C-COMPILER PIC24, DSPIC
Manufacturer
Custom Computer Services Inc (CCS)
Type
Compilerr
Datasheet

Specifications of PCD COMMAND LINE COMPILER

For Use With/related Products
Microchip PIC24/dsPIC®
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
429-1007
Example:
void DataEE_Read(int32 addr, int8 * ram, int bytes) {
}
void DataEE_Write(int32 addr, int8 * ram, int bytes) {
}
addressmod (DataEE,DataEE_read,DataEE_write,5,0xff);
void main (void)
{
}
Note: If the area is defined in RAM then read and write functions are not required, the variables
assigned in the memory region defined by the addressmod can be treated as a regular variable in
all valid expressions. Any structure or data type can be used with an addressmod. Pointers can
also be made to an addressmod data type. The #type directive can be used to make this memory
region as default for variable allocations.
The syntax is :
#type default=addressmodname
#type default=
For example:
Type default=emi
char buffer[8192];
#include <memoryhog.h>
#type default=
48
int DataEE test;
int x,y;
x=12;
test=x;
y=test;
int i;
for(i=0;i<bytes;i++,ram++,addr++)
int i;
for(i=0;i<bytes;i++,ram++,addr++)
// would define a region called DataEE between
// 0x5 and 0xff in the chip data EEprom.
*ram=read_eeprom(addr);
write_eeprom(addr,*ram);
// writes x to the Data EEPROM
// Reads the Data EEPROM
// all the variable declarations that
// follow will use this memory region
// goes back to the default mode
//emi is the addressmod name defined

Related parts for PCD COMMAND LINE COMPILER