User`s manual
20 rabbit.com How Dynamic C Cold Boots the Target System
When the programming cable connects a PC serial port to the target controller board, the PC running
Dynamic C is connected to the Rabbit 4000 as shown in the table below.
When Dynamic C cold boots the Rabbit 4000-based target system it assumes that no program is already
installed on the target. The flash memory on the target system may be blank or it may contain any data.
The cold boot capability permits the use of soldered-in flash memory on the target. Soldered-in memory
eliminates sockets, boot blocks and PROM programming devices.
4.1 How the Cold Boot Mode Works In Detail
Cold boot works by receiving triplets of bytes that consist of a high address byte followed by a low address
byte, followed by a data byte, and writing the data byte to either memory or I/O space. Cold boot mode is
entered by having one or both of the SMODE pins pulled high when the Rabbit is reset. The pin settings
determine the source of the incoming triplets:
SMODE1 = 0, SMODE0 = 1 cold boot from slave port.
SMODE1 = 1, SMODE0 = 0 cold boot from clocked serial port A.
SMODE1 = 1, SMODE0 = 1 cold boot from asynchronous serial port A at 2400 bps.
SMODE1 = 0, SMODE0 = 0 start normal execution at address zero.
The SMODE pins can be used as general input pins once the cold boot is complete.
On entering cold boot mode, the microprocessor starts executing a 12-byte program contained in an inter-
nal 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 significant byte
04 ioi ld e,(hl) ; get least significant byte
06 ioi ld a,(hl) ; get data
08 ioi or nop ; if the high bit of the MSB of the address is
1
; (i.e., d[7] ==1) then 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
Table 4-1 Programming Port Connections
PC Serial Port Signal Rabbit 4000 Signal
DTR (output) /RESET (input, reset system)
DSR (input) STATUS (general purpose output)
TX (serial output) RXA (serial input, port A)
RX (serial input) TXA (serial output, port A)