PCD COMMAND LINE COMPILER Custom Computer Services Inc (CCS), PCD COMMAND LINE COMPILER Datasheet - Page 63
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
1.PCD_COMMAND_LINE_COMPILER.pdf
(373 pages)
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
- Current page: 63 of 373
- Download datasheet (4Mb)
Using Program Memory for Data
CCS C Compiler provides a few different ways to use program memory for data. The different ways
are discussed below:
Constant Data:
The CONST qualifier will place the variables into program memory. If the keyword CONST is used
before the identifier, the identifier is treated as a constant. Constants should be initialized and may
not be changed at run-time. This is an easy way to create lookup tables.
The ROM Qualifier puts data in program memory with 3 bytes per instruction space. The address
used for ROM data is not a physical address but rather a true byte address. The & operator can be
used on ROM variables however the address is logical not physical.
The #org preprocessor can be used to place the constant to specified address blocks.
The function label_address can be used to get the address of the constant. The constant variable
can be accessed in the code. This is a great way of storing constant data in large programs.
Variable length constant strings can be stored into program memory.
A special method allows the use of pointers to ROM. This method does not contain extra code at
the start of the structure as does constant.
The compiler allows a non-standard C feature to implement a constant array of variable length strings.
Where n is optional and id is the table identifier.
The syntax is:
For example:
Placing data into ROM
Placing a string into ROM
Creating pointers to constants
For example:
The constant ID will be at 1C00.
Note: Some extra code will precede the 123456789.
For example:
The syntax is:
For example:
const type id[cexpr] = {value}
const int table[16]={0,1,2...15}
const char cstring[6]={"hello"}
const char *cptr;
cptr = string;
#ORG 0x1C00, 0x1C0F
CONST CHAR ID[10]= {"123456789"};
char rom commands[] = {“put|get|status|shutdown”};
const char id[n] [*] = { "string", "string" ...};
const char colors[] [*] = {"Red", "Green", "Blue"};
49
Related parts for PCD COMMAND LINE COMPILER
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
PROTOTYPING BOARD FOR PIC MCU
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
Extra CCS C Manual
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
MACH X Programmer
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
PCD For 24-bit (PIC24/dsPIC)
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
LOAD-n-GO Programmer
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
EMBEDDED INTERNET DEVELOPMENT KIT W/PCWH
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
PIC24F Development Kit With PCWHD
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
PIC24F Development Kit With PCDIDE
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
PIC24H Development Kit With PCWHD
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
PIC24H Development Kit With PCDIDE
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
PIC18F6722 Embedded C Development Kit With PCWH Compiler
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
PIC18F8722 Embedded C Development Kit With PCWH Compiler
Manufacturer:
Custom Computer Services Inc (CCS)
Part Number:
Description:
USB Master Prototyping Board
Manufacturer:
Custom Computer Services Inc (CCS)