Rabbit 2000 Getting Started - page 22
Getting Started Manual
17
4. Software Reference
4.1 More About Dynamic C
Dynamic C has been in use worldwide since 1989. Dynamic C is specially designed for
programming embedded systems. Dynamic C features quick compile and interactive
debugging in the real environment. A complete reference to Dynamic C is contained in
the Dynamic C Reference Manual.
Dynamic C for Rabbit
™
processors uses the standard Rabbit programming interface. This
is a 10-pin connector that connects to the Rabbit serial port A. It is possible to reset and
cold-boot a Rabbit processor via the programming port. No software needs to be present
in the target system. More details are available in the Rabbit 2000 Microprocessor User’s
Manual.
Dynamic C cold-boots the target system and compiles the BIOS. The BIOS is a basic pro-
gram of a few thousand bytes in length that provides the debugging and communication
facilities that Dynamic C needs. Once the BIOS has been compiled, the user can compile
his own program and test it. If the BIOS fails because of a crash, a new cold boot and
BIOS compile can be done at any time.
Each type of Rabbit microprocessor system can have a different BIOS, or the BIOS pro-
gram can be customized by using
#define
options. The Jackrabbit board is supplied
with one BIOS, and a flash memory and a RAM memory to hold the program. RAM
memory is useful for holding a program while debugging is being done because it is more
flexible than flash memory.
Dynamic C does not use include files, rather it has libraries which are used for the same
purpose, that is, to supply function prototypes to programs before they are compiled.
Libraries are much easier to use compared to include files.
Dynamic C supports assembly language, either as separate programs or as fragments
embedded in C programs. Interrupt routines may be written in Dynamic C or in assembly
language.
4.1.1 Operating System Framework
Dynamic C does not include an operating system in the usual sense of a complex software
system that is resident in memory. The user has complete control of what is loaded as a
part of his program, other than those routines that support loading and debugging and
which are inactive at embedded run time. However, certain routines are very basic and
normally should always be present and active.
•
Periodic interrupt routine. This interrupt routine is driven by the Rabbit periodic inter-
rupt facility, and when enabled creates an interrupt every 16 ticks of the 32.768 kHz
oscillator, or every 488 µs. This routine drives three long global variables that keep
track of the time:
SEC_TIMER
,
MS_TIMER
, and
TICK_TIMER
that respectively count
seconds, milliseconds, and 488 µs ticks. These variables are needed by virtually all
functions that measure time. The
SEC_TIMER
is set to seconds elapsed since 1 Jan
1980, and thus also keeps track of the time and date. The periodic interrupt routine
must be disabled when the microprocessor enters sleepy mode and the processor clock