Distributor of Digi International: Excellent Integrated System Limited
Datasheet of 101-1274 - KIT DEV STANDARD RCM5700
Contact us: [email protected] Website: www.integrated-circuit.com
MiniCore RCM5700/RCM6700 User’s Manual
digi.com
42
5.2
Dynamic C Function Calls
5.2.1 Digital I/O
The RCM5700/RCM6700 was designed to interface with other systems, and so there are no driv-
ers written specifically for the Rabbit 5000/6000 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 external I/O bus on the Rabbit 5000/6000 chip, add the line
#define PORTA_AUX_IO
// required to enable external I/O bus
to the beginning of any programs using the auxiliary I/O bus.
The sample programs in the Dynamic C
SAMPLES\RCM5700 and SAMPLES\RCM6700
folders
provide further examples.
5.2.2 Serial Communication Drivers
Library files included with Dynamic C provide a full range of serial communications support. The
RS232.LIB
library provides a set of circular-buffer-based serial functions. The
PACKET.LIB
library provides packet-based serial functions where packets can be delimited by the 9th bit, by
transmission gaps, or with user-defined special characters. Both libraries provide blocking func-
tions, which do not return until they are finished transmitting or receiving, and nonblocking func-
tions, which must be called repeatedly until they are finished, allowing other functions to be
performed between calls. For more information, see the
Dynamic C Function Reference Manual
and Rabbit’s Technical Note TN213,
Rabbit Serial Port Software
, both included with the online
documentation.
5.2.3 User Block
None of the user block memory area is reserved. This leaves the address range 0–1FFA in the user
block available for your application.
These address ranges may change in the future in response to the volatility in the flash memory
market, in particular sector size. The sample program
USERBLOCK_INFO.C
in the Dynamic C
SAMPLES\USERBLOCK
folder can be used to determine the version of the ID block, the size of the
ID and user blocks, whether or not the ID/user blocks are mirrored, the total amount of flash
memory used by the ID and user blocks, and the area of the user block available for your applica-
tion.
The
USERBLOCK_CLEAR.C
sample program shows you how to clear and write the contents of the
user block that you are using in your application (the calibration constants in the reserved area and
the ID block are protected).
43 / 113
43 / 113