Designer’s
Handbook 5
3.
How
Dynamic
C
Cold-Boots
the
Target
System
Dynamic
C
assumes
that
target
controller
boards
using
the
Rabbit
CPU
have
no
pre-
installed
firmware.
It
takes
advantage
of
the
Rabbit’s
bootstrap
(cold
boot)
mode
that
allows
memory
and
I/O
writes
to
take
place
over
the
programming
port.
When
the
programming
cable
connects
a
PC
serial
port
to
the
user’s
system
the
PC
run-
ning
Dynamic
C
is
connected
to
the
Rabbit
as
shown
in
Table
1..
The
programming
cable
includes
an
RS-232
to
CMOS
signal
level
converter
circuit.
The
level
converter
is
powered
from
the
+5
V
or
+3.3
V
power
supply
voltage
present
on
the
Rabbit
programming
connector
(see
Figure
7
on
page
31).
Plugging
the
programming
cable
into
the
Rabbit
programming
connector
results
in
pulling
the
Rabbit
SMODE0,
SMODE1
(startup
mode)
lines
high.
This
causes
the
Rabbit
to
enter
the
cold-boot
mode
after
reset.
3.1
How
the
Cold
Boot
Mode
Works
In
Detail
The
microprocessor
starts
executing
a
12-byte
program
contained
in
an
internal
ROM.
The
program
contains
the
following
code.
; origin zero
00 ld l,n ; n=0c0h for serial port A
; n=020h for parallel (slave port)
02 ioi ld d,(hl) ; get address most sig byte
04 ioi ld e,(hl) ; get least sig byte
06 ioi ld a,(hl) ; get data (h is ignored)
08 ioi or nop ; if D(7)==1 ioi, else nop
09 ld (de),A ; store in memory or I/O
10 jr 0 ; jump back to zero
; note wait states inserted at bytes 3, 5 and 7 waiting
; for serial port or parallel port ready
The
contents
of
the
boot
ROM
vary
depending
on
the
settings
of
SMODE1,
SMODE2
and
on
the
contents
of
register
D
bit
7
which
determines
if
the
store
is
to
be
an
I/O
store
or
a
data
store.
If
the
boot
is
terminated
by
storing
80h
to
I/O
register
24h
then
when
the
boot
Table
1.
Programming
Port
Connections
PC
Serial
Port
Signal Rabbit
Signal
DTR
(output) /RESET
(input,
reset
system)
DSR
(input) STATUS
(gen
purpose
output)
TX
(serial
output) RXA
(serial
input,
chan
A)
RX
(serial
input) TXA
(serial
output,
chan
A)