52
RabbitCore RCM3600
5.2.3 Digital I/O
The RCM3600 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.
When using the auxiliary I/O bus on the Rabbit 3000 chip, add the line
#define PORTA_AUX_IO
// required to enable auxiliary I/O bus
to the beginning of any programs using the auxiliary I/O bus.
The sample programs in the Dynamic C
SAMPLES\RCM3600
folder provide further examples.
This function is used to poll the real-time clock until the specified timeout occurs. The RCM3600 will
operate in a low-power mode with a clock speed of 2.048 kHz until the timeout occurs. Once the timeout
has ended, the RCM3600 will resume operating at 22.1 MHz. The analog device oscillator will be dis-
abled until the timeout occurs and will then be enabled as well.
PARAMETERS
timeout
is the length of the timeout in seconds
RETURN VALUE
None.
This function is used to poll a digital input for a certain value or until the specified timeout occurs. The
RCM3600 will operate in a low-power mode with a clock speed of 2.048 kHz until the correct bit is
received or the timeout occurs. Once this happens, the RCM3600 will resume operating at 22.1 MHz.
The analog device oscillator will be disabled until the timeout occurs and will then be enabled as well.
PARAMETERS
dataport
is the input port data register corresponding to the channel to poll (e.g., PADR)
portbit
is the input port bit to poll
value
is the input value (0 or 1) to receive
timeout
is the length of the timeout in seconds if an input value is not received on the specified chan-
nel; enter 0 for no timeout
RETURN VALUE
None.
void timedAlert(unsigned long timeout);
void digInAlert(int dataport, int portbit,
int value, unsigned long timeout);
Содержание RabbitCore
Страница 1: ...RabbitCore RCM3600 C Programmable Core Module User s Manual 019 0135 050630 C ...
Страница 6: ...RabbitCore RCM3600 ...
Страница 12: ...6 RabbitCore RCM3600 ...
Страница 92: ...86 RabbitCore RCM3600 ...
Страница 128: ...122 RabbitCore RCM3600 ...
Страница 132: ...126 RabbitCore RCM3600 ...
Страница 136: ...130 RabbitCore RCM3600 ...
Страница 138: ......