Dynamic C Function Calls; Digital I/O; Serial Communication Drivers; User Block - Rabbit RabbitCore RCM4200 User Manual

C-programmable analog core module with serial flash and etherne
Table of Contents

Advertisement

5.2 Dynamic C Function Calls

5.2.1 Digital I/O

The RCM4200 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 4000 chip, add the line
#define PORTA_AUX_IO
to the beginning of any programs using the auxiliary I/O bus.
The sample programs in the Dynamic C
examples.

5.2.2 Serial Communication Drivers

Library files included with Dynamic C provide a full range of serial communications sup-
port. The
RS232.LIB
library provides packet-based serial functions where packets can be delimited
PACKET.LIB
by the 9th bit, by transmission gaps, or with user-defined special characters. Both libraries
provide blocking functions, which do not return until they are finished transmitting or
receiving, and nonblocking functions, which must be called repeatedly until they are fin-
ished, allowing other functions to be performed between calls. For more information, see
the Dynamic C Function Reference Manual and Technical Note TN213, Rabbit Serial
Port Software.

5.2.3 User Block

Certain function calls involve reading and storing calibration constants from/to the simulated
EEPROM in flash memory located at the top 2K of the reserved user block memory area
(3800–39FF). This leaves the address range 0–37FF 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
the Dynamic C
SAMPLES\USERBLOCK
ID block, the size of the ID and user blocks, whether or not the ID/user blocks are mir-
rored, the total amount of flash memory used by the ID and user blocks, and the area of the
user block available for your application.
The
USERBLOCK_CLEAR.C
tents of the user block that you are using in your application (the calibration constants in
the reserved area and the ID block are protected).
User's Manual
// required to enable auxiliary I/O bus
SAMPLES/RCM4200
library provides a set of circular-buffer-based serial functions. The
folder can be used to determine the version of the
sample program shows you how to clear and write the con-
folder provide further
USERBLOCK_INFO.C
in
49

Advertisement

Table of Contents
loading

Table of Contents