User`s manual
40 RabbitCore RCM2100
5.2 I/O
The RCM2100 was designed to interface with other systems, and so there are no drivers
written specifically for the I/O. The general Dynamic C read and write functions allow
you to customize the parallel I/O to meet your specific needs. For example, use
WrPortI(PEDDR, &PEDDRShadow, 0x00);
to set all the port E bits as inputs, or use
WrPortI(PEDDR, &PEDDRShadow, 0xFF);
to set all the port E bits as outputs.
The sample programs in the Dynamic C SAMPLES/RCM2100 directory provide further
examples.
5.2.1 PCLK Output
The PCLK output is controlled by bits 7 and 6 of the Global Output Register (GOCR) on
the Rabbit 2000 microprocessor, and so can be enabled or disabled in software. Starting
with Dynamic C v 7.02, the PCLK output is disabled by default at compile time to mini-
mize radiated emissions; the PCLK output is enabled in earlier versions of Dynamic C.
Use the following code to set the PCLK output as needed.
PCLK output driven with peripheral clock:
WrPortI(GOCR, &GOCRShadow, (GOCRShadow&~0xc0));
PCLK output driven with peripheral clock รท 2:
WrPortI(GOCR, &GOCRShadow, ((GOCRShadow&~0xc0)| 0x40));
PCLK output off (low):
WrPortI(GOCR, &GOCRShadow, ((GOCRShadow&~0xc0)| 0x80));
PCLK output on (high):
WrPortI(GOCR, &GOCRShadow, (GOCRShadow | 0xc0));