Rabbit 2000 Designers Handbook - page 13
Designer’s
Handbook
9
4.
Dynamic C Rabbit Programming Overview
When
Dynamic C compiles the user’s program it includes a BIOS or basic input-output
system.
The BIOS a fairly small piece of code that provides a variety of low level services
for
the user’s program. The BIOS also takes care of microprocessor system initialization.
The
BIOS provides the communications services required by Dynamic C for downloading
code
and performing debugging services such as setting breakpoints or examining data
variables.The
BIOS defines the setup of memory. An existing BIOS can be used as a skel-
eton
BIOS to create a new BIOS. Frequently it will only be necessary to change #define
statements
at the beginning of the BIOS. In this case it is unnecessary for the user to
understand
or work out the details of the memory setup and other processor initialization.
The
designer should follow Rabbit system design conventions so that Dynamic C can
work
with his system. The design conventions are listed below.
•
Include
a standard Rabbit programming cable (see Figure 1). The standard 10-pin pro-
gramming
connector provides a connection to serial port A and allows the PC to reset
and
cold-boot the target system.
•
Connect
a static RAM having at least 32K to chip select #1 (/CS1, /OE1, /WE1). It is
useful
if the PC board footprint can also accommodate a RAM large enough to hold all
the
code anticipated. If a large RAM can be accommodated, software development will
go
faster. Although code residing in some flash memory can be debugged, debugging
and
program download is faster to RAM. There are also types of flash memory that can
be
used, but they cannot support debugging.
•
Connect
a flash memory that is on the approved list and has at least 128K of storage to
chip
select #0 (/CS0, /OE0, /WE0). Nonapproved memories can be used, but it may be
necessary
to modify the BIOS. Some systems designed to have their program reloaded
by
an external agent on each powerup may not need any flash memory.
•
Install
a crystal or oscillator with a frequency of 32.768 kHz to drive the battery-back-
able
clock. (Battery-backing is optional, but the clock is used in the cold-boot sequence
to
generate a known baud rate.)
•
Install
a crystal or oscillator for the main processor clock that is a multiple of
614.4 kHz,
or better, a multiple of 1.8432 MHz. These preferred clock frequencies
make
possible the generation of sensible baud rates. If the crystal frequency is a multi-
ple
of 614.4 kHz, then the same multiples of the 19,200 bps baud rate are achievable.
Common
crystal frequencies to use are 3.6864, 7.3728, 11.0592 or 14.7456 MHz, or
double
these frequencies.
The
user may be concerned that the requirement for a programming connector places
added
cost overhead on his design. The overhead is very small—less than $0.25 for com-
ponents
and board space that could be eliminated if the programming connector were not
made
a part of the system.
•
The
programming connector can also be used for a variety of other purposes, including
user
applications. A device attached to the programming connector has complete con-
trol
over the system because it can perform a hardware reset and load new software. If