PCD COMMAND LINE COMPILER Custom Computer Services Inc (CCS), PCD COMMAND LINE COMPILER Datasheet - Page 348
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: 348 of 373
- Download datasheet (4Mb)
How does one map a variable to an I/O port?
Two methods are as follows:
#byte
#define ALL_OUT 0
#define ALL_IN
main() {
}
Remember when using the #BYTE, the created variable is treated like memory. You must maintain
the tri-state control registers yourself via the SET_TRIS_X function. Following is an example of placing
a structure on an I/O port:
struct
struct
#byte port_b
struct port_b_layout
struct port_b_layout
struct port_b_layout
struct port_b_layout
struct
main() {
}
334
int i;
set_tris_b(ALL_OUT);
PORTB = 0;// Set all pins low
for(i=0;i<=127;++i)
set_tris_b(ALL_IN);
i = PORTB;
{int data : 4;
int rw : 1;
int cd : 1;
int x;
set_tris_b((int)FOR_SEND);
port_b = INIT_1;
delay_us(25);
port_b = INIT_2;
port_b = INIT_3;
set_tris_b((int)FOR_READ);
port_b.rw=0;
port_b.cd=1;
x = port_b.data;
};
PORTB
// command
PORTB=i;
port_b_layout
port_b_layout
port_b_layout
= 0x02C8
=
0xff
// structure is
// are used to set all fields
// independently.
0x02C8
//DATA sheet for the correct
//address for your chip
const
const
const
const
port_b;
const
//Just an example, check the
// Quickly count from 0 to 127
// on the I/O port pin
// i now contains the portb value.
INIT_1
INIT_2
INIT_3
FOR_SEND = {0,0,0, };
FOR_READ = {15,0,0, };
// Here the individual
// fields are accessed
// All outputs
// Data is an input
// The constant
// treated like
// a byte and
// is used to
// set the data
// direction
// These constant structures delay_us(25);
// on the port with a single
= {0, 1,1, };
= {3, 1,1, };
= {0, 0,0, };
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)