User`s manual
86 rabbit.com Troubleshooting Tips for New Rabbit-Based Systems
D3 32 24 00;ioi ld (SPCR), a
; .forever:
D3 3A 30 00;ioi ld a, (PADR)
EE 01; xor 0x01
D3 32 30 00;ioi ld (PADR), a
01 0C 00;ld bc, 12 (use 24 vs. 12 for clock doubled vs. not doubled)
; .again0:
21 CC FB;ld hl, 64460
; .again1:
2B; dec hl
B1; ld de, hl
CC; bool hl
A1; ld hl, de
20 FA; jr nz, .again1
ED 10 F4;dwjnz .again0
18 E5; jr .forever
\\Footer Block
; Insert Rabbit 4000 diagnostic code before this comment.
;Triplet
80 1D 00;MACR = 0x00 (set 8-bit operation for both /CS0 and /CS1)
80 14 0D;MB0CR = 0x0D (4WS, write protected, /OE1, /CS1)
80 15 05;MB1CR = 0x05 (4WS, /OE1, /CS1)
80 16 00;MB2CR = 0x00 (4WS, /OE0, /CS0)
80 17 00;MB3CR = 0x00 (4WS, /OE0, /CS0)
80 13 D6;SEGSIZE = 0xD6 (stack @ 0xD000, data @ 0x6000)
80 11 00;STACKSEG = 0x00 (physical stack @ 0x0D000 = 0x00000 + 0xD000)
80 12 00;DATASEG = 0x00 (physical data @ 0x06000 = 0x00000 + 0x6000)
80 24 80;SPCR = 0x80 (terminate bootstrap, start running at address 0)
The above mentioned diagnostic code must be used with the following 16-bit header code for 16-bit data
transfers:
80 0E A0;GOCR = 0xA0 (set CLK, STATUS outputs low)
80 09 51;WDTTR = 0x51 (prepare to disable the watchdog)
80 09 54;WDTTR = 0x54 (disable the watchdog)
80 00 08;GCSR = 0x08 (CPU = OSC, PCLK = OSC)
80 10 00;MMIDR = 0x00 (8-bit I/O space, shared I&D space, no inversions)
80 16 25;MB2CR = 0x25 (4WS, inverted MSB, /OE1, /CS1)
80 13 D1;SEGSIZE = 0xD1 (stack @ 0xD000, data @ 0x1000)
80 11 80;STACKSEG = 0x80 (physical stack @ 0x8D000 = 0x80000 + 0xD000)
80 12 7F;DATASEG = 0x7F (physical data @ 0x80000 = 0x7F000 + 0x1000)