Rabbit® 4000 MicroprocessorDesigner’s Handbook019-0156_H
10 rabbit.com Rabbit Hardware Design Overview2.1.1 Rabbit Programming ConnectorThe user may be concerned that the requirement for a programming conne
Rabbit 4000 Designer’s Handbook rabbit.com 112.2 ESD Design GuidelinesThe following guidelines are recommended for designs incorporating a Rabbit 4000
12 rabbit.com Rabbit Hardware Design Overview2.5 Through-Hole TechnologyMost design advice given for the Rabbit 4000 assumes the use of surface-mount
Rabbit 4000 Designer’s Handbook rabbit.com 133. Core Design and ComponentsCore designs can be developed around the Rabbit 4000 microprocessor. A core
14 rabbit.com Core Design and ComponentsFigure 3-1 Main Oscillator CircuitThe 32.768 kHz oscillator is slow to start oscillating after power-on. For
Rabbit 4000 Designer’s Handbook rabbit.com 153.3 Basic Memory DesignNormally /CS0 and /OE0 and /WE0 should be connected to a flash memory that holds t
16 rabbit.com Core Design and Components3.3.1 Memory Access TimeMemory access time depends on the clock speed and the capacitive loading of the addre
Rabbit 4000 Designer’s Handbook rabbit.com 173.4 PC Board Layout and Memory Line PermutationTo use the PC board real estate efficiently, it is recomme
18 rabbit.com Core Design and Components
Rabbit 4000 Designer’s Handbook rabbit.com 194. How Dynamic C Cold Bootsthe Target SystemDynamic C assumes that target controller boards using the Rab
Rabbit® 4000 Microprocessor Designer’s HandbookPart Number 019-0156 • Printed in the U.S.A.Digi International Inc. © 2007-2010 • All rights reserved.D
20 rabbit.com How Dynamic C Cold Boots the Target SystemWhen the programming cable connects a PC serial port to the target controller board, the PC r
Rabbit 4000 Designer’s Handbook rabbit.com 21The function of the boot ROM program depends on the settings of the pins SMODE0 and SMODE1 and on whether
22 rabbit.com How Dynamic C Cold Boots the Target System6. The initial loader then reads 7 bytes from the serial port. First a 4-byte address field:
Rabbit 4000 Designer’s Handbook rabbit.com 235. Rabbit Memory OrganizationThe architecture of earlier Rabbit processors was derived from the original
24 rabbit.com Rabbit Memory Organization5.1.2 SRAMStatic RAM may or may not be battery-backed. If the SRAM is battery-backed it retains its data when
Rabbit 4000 Designer’s Handbook rabbit.com 255.2 Memory SegmentsFrom the point of view of a Dynamic C programmer, there are a number of different uses
26 rabbit.com Rabbit Memory OrganizationOne advantage of retaining the Rabbit 16-bit logical memory organization is that 16-bit addresses and pointer
Rabbit 4000 Designer’s Handbook rabbit.com 275.2.2 The Base (or Root) SegmentThe base segment has a typical size of 24 KB. The larger the base segment
28 rabbit.com Rabbit Memory Organization5.2.5 The Extended Memory SegmentThis 8 KB segment from logical address 0xE000 to 0xFFFF is a sliding window
Rabbit 4000 Designer’s Handbook rabbit.com 295.3 Separate I&D SpaceSeparate instruction and data space is a hardware memory management scheme that
Rabbit 4000 Designer’s Handbook rabbit.com 3TABLE OF CONTENTSChapter 1. Introduction ...
30 rabbit.com Rabbit Memory OrganizationSeparate I&D logical addresses map to physical addresses by inverting address lines A16, the most signifi
Rabbit 4000 Designer’s Handbook rabbit.com 31When using separate I&D space you can not reference code as data or data as code in logical memory be
32 rabbit.com Rabbit Memory Organization 5.3.2.1 Compiling to RAMFor RAM compiles, all banks (quadrants) are mapped to RAM. In a 20-bit physical addr
Rabbit 4000 Designer’s Handbook rabbit.com 33 5.3.2.2 Compiling to FlashFor flash compiles, flash is mapped to banks 0 and 1. The address range depend
34 rabbit.com Rabbit Memory Organizationaddress space for constants) and bit 3 enables inversion of MSB for the data space data segment (i.e., the lo
Rabbit 4000 Designer’s Handbook rabbit.com 35As the compiler compiles code for the extended code window, it checks to see if the code has passed the m
36 rabbit.com Rabbit Memory Organization
Rabbit 4000 Designer’s Handbook rabbit.com 376. The Rabbit BIOSWhen Dynamic C compiles a user’s program to a target board, the BIOS (Basic Input/Outpu
38 rabbit.com The Rabbit BIOS6.1 Startup Conditions Set by the BIOSThe BIOS performs initialization tasks and #use’s library files that contain setu
Rabbit 4000 Designer’s Handbook rabbit.com 396.2 BIOS FlowchartThe following flowchart summarizes the functionality of the BIOS:Figure 6-1 BIOS Flowc
4 rabbit.com 5.2.4 The Stack Segment ...
40 rabbit.com The Rabbit BIOS6.3 Internally-Defined MacrosSome macros used in the BIOS are defined internally by Dynamic C before the BIOS is compile
Rabbit 4000 Designer’s Handbook rabbit.com 416.4.1 Macros that Affect the BIOSThere are several macros that may be modified for custom-designed boards
42 rabbit.com The Rabbit BIOSFLASH_SIZESets the amount of flash available. The default value is the internally defined _FLASH_SIZE_ The units are the
Rabbit 4000 Designer’s Handbook rabbit.com 43MBxCR_INVRT_A18, MBxCR_INVRT_A19These macros determine whether the MIU registers for each quadrant are se
44 rabbit.com The Rabbit BIOS 6.5.1.1 Example of Origin DeclarationsThe code from memory_layout.lib provides a practical application of origins. In t
Rabbit 4000 Designer’s Handbook rabbit.com 45#orgdef xcodorg xmemcode in flash above start to user_blockDefining origins for the physical memory devic
46 rabbit.com The Rabbit BIOSseveral other regions needed for buffers. For simplicity’s sake, none of them are shown here and they are not reflected
Rabbit 4000 Designer’s Handbook rabbit.com 47 6.5.1.2 Origin Declaration SyntaxFollowing is an EBNF (Extended Backus Naur Form) representation of the
48 rabbit.com The Rabbit BIOS<name>The non-terminal “name,” though not explicitly defined in the grammar, is equivalent to a C-style identi-fie
Rabbit 4000 Designer’s Handbook rabbit.com 49<placement>The non-terminal “placement” denotes the placement of an origin within a larger parent s
Rabbit 4000 Designer’s Handbookl rabbit.com 57.2.2 Reserved Flash Space...
50 rabbit.com The Rabbit BIOS 6.5.1.4 Origin Declaration Start and End Syntax<start>The non-terminal start is simply the terminal “#orgstart”.
Rabbit 4000 Designer’s Handbook rabbit.com 51<aspect>The aspect non-terminal represents an individual aspect of an origin. This non-terminal may
52 rabbit.com The Rabbit BIOSAll code sections (rcodorg, xcodorg code and wcodorg) grow up. All non-constant data sections (rvarorg) grow down. Root
Rabbit 4000 Designer’s Handbook rabbit.com 53#xcodorg yourcode 0x0 0x5000 0x500then the origin statement:#xcodorg mycode 0x0 0x5500 0x500 follows your
54 rabbit.com The Rabbit BIOS 6.5.2.6 Origin Directive ExamplesThe diagram below shows how the origin directives define the mapping between the logic
Rabbit 4000 Designer’s Handbook rabbit.com 55 6.5.2.8 Origin Directive to Reserve Blocks of MemoryWith the Rabbit 4000, the compiler generates an orig
56 rabbit.com The Rabbit BIOS
Rabbit 4000 Designer’s Handbook rabbit.com 577. The System Identification and UserBlocksThe BIOS supports a System Identification block and a User blo
58 rabbit.com The System Identification and User Blocks7.1 System ID Block DetailsThe BIOS will read the System ID block during startup. If the BIOS
Rabbit 4000 Designer’s Handbook rabbit.com 59typedef struct {int tableVersion; // version number for this table layout**int productID; // Rabbit par
6 rabbit.com
60 rabbit.com The System Identification and User Blocks7.1.2 Reading the System ID BlockTo read the ID block from the flash instead of getting the in
Rabbit 4000 Designer’s Handbook rabbit.com 61 7.1.2.1 Determining the Existence of the System ID BlockIn Dynamic C versions prior to 7.20, and for ID
62 rabbit.com The System Identification and User Blocks21h 2 Number of sectors in 2nd flash 223h 2Flash access time, in nanoseconds, for the 2nd flas
Rabbit 4000 Designer’s Handbook rabbit.com 637.1.3 Writing the System ID BlockThe WriteFlash() function does not allow writing to the System ID block.
64 rabbit.com The System Identification and User Blocks7.2.2 Reserved Flash SpaceThe macro MAX_USERBLOCK_SIZE (default 0x8000) in the BIOS tells the
Rabbit 4000 Designer’s Handbook rabbit.com 657.2.3 Reading the User BlockreadUserBlockint readUserBlock(void *dest, unsigned addr, unsigned numbytes);
66 rabbit.com The System Identification and User BlocksreadUserBlockArrayint readUserBlockArray(void *dests[], unsigned numbytes[], int numdests, uns
Rabbit 4000 Designer’s Handbook rabbit.com 677.2.4 Writing the User BlockwriteUserBlockint writeUserBlock(unsigned addr, void *source, unsigned numby
68 rabbit.com The System Identification and User BlockswriteUserBlockArrayint writeUserBlockArray(unsigned addr, void* sources[], unsigned numbytes[]
Rabbit 4000 Designer’s Handbook rabbit.com 698. BIOS Support for Program CloningThe BIOS supports copying designated portions of flash memory from one
Rabbit 4000 Designer’s Handbook rabbit.com 71. IntroductionThis manual is intended for the engineer designing a system using the Rabbit 4000 microproc
70 rabbit.com BIOS Support for Program Cloning8.2 Creating a CloneBefore cloning can occur, the master controller must be readied. Once this is done,
Rabbit 4000 Designer’s Handbook rabbit.com 718.3 Cloning QuestionsThe following subsections answer questions about different aspects of cloning.8.3.1
72 rabbit.com BIOS Support for Program Cloning
Rabbit 4000 Designer’s Handbook rabbit.com 739. Low-Power Design and SupportWith the Rabbit 4000 microprocessor it is possible to design systems that
74 rabbit.com Low-Power Design and Support9.1 Details of the Rabbit 4000 Low-Power FeaturesThis section goes into more detail about the Rabbit 4000 l
Rabbit 4000 Designer’s Handbook rabbit.com 759.1.2 Reducing Clock SpeedIt is important to know that the lowest speed crystal will not always give the
76 rabbit.com Low-Power Design and Support9.2 To Further Decrease Power ConsumptionIn addition to the low-power features of the Rabbit 4000 microproc
Rabbit 4000 Designer’s Handbook rabbit.com 779.2.3 External 32 kHz OscillatorUnlike the Rabbit 2000, the Rabbit 4000 has no internal 32 kHz oscillator
78 rabbit.com Low-Power Design and SupportFunctions are provided to power down the Realtek Ethernet chip as well. By calling the pd_powerup() and pd_
Rabbit 4000 Designer’s Handbook rabbit.com 7910. Supported Flash MemoriesThere are several flash memories that have been qualified for use with the Ra
8 rabbit.com IntroductionAs shown in Figure 1-1, the Rabbit programming cable connects a PC serial port to the programming con-nector of the target s
80 rabbit.com Supported Flash Memories10.2 Writing Your Own Flash DriverRabbit does not support using a flash memory that is not listed above and tha
Rabbit 4000 Designer’s Handbook rabbit.com 8111. Troubleshooting Tips for NewRabbit-Based SystemsIf the Rabbit design conventions were followed and Dy
82 rabbit.com Troubleshooting Tips for New Rabbit-Based SystemsAfter extracting the files, double click on serialIO.exe to display the following scre
Rabbit 4000 Designer’s Handbook rabbit.com 8311.2.2 Diagnostic Test #1: Toggle the Status Pin This test toggles the status pin.1. Apply the reset for
84 rabbit.com Troubleshooting Tips for New Rabbit-Based Systems11.2.3 Diagnostic Test #2The following program checks the processor/RAM interface for
Rabbit 4000 Designer’s Handbook rabbit.com 853. The opcodes and their data are in the 2nd column of the Assembly window. Since we want each triplet lo
86 rabbit.com Troubleshooting Tips for New Rabbit-Based SystemsD3 32 24 00;ioi ld (SPCR), a; .forever:D3 3A 30 00;ioi ld a, (PADR)EE 01; xor 0x01D3 3
Rabbit 4000 Designer’s Handbook rabbit.com 8780 73 01;PEAHR = 0x01 (preset PE4 as /A0)80 75 10;PEFR = 0x10 (PE4 is alternate output)80 77 10;PEDDR = 0
88 rabbit.com Troubleshooting Tips for New Rabbit-Based Systems
Rabbit 4000 Designer’s Handbook rabbit.com 89Appendix A: Supported Rabbit 4000Baud RatesThis table contains divisors to put into TATxR registers. All
Rabbit 4000 Designer’s Handbook rabbit.com 92. Rabbit Hardware Design OverviewBecause of the glueless nature of the external interfaces, especially th
90 rabbit.com Supported Rabbit 4000 Baud RatesThe default equation for the divisor is:If the divisor is not an integer value, that baud rate is not a
Rabbit 4000 Designer’s Handbook rabbit.com 91INDEXAA18 and A19 inversion ... 43access times ...
92 rabbit.com Indexmacros, defined internally__SEPARATE_INST_DATA__ ...40_BOARD_TYPE_ ...
Rabbit 4000 Designer’s Handbookl rabbit.com 93ZZERO_STATIC_DATA .... 34
94 rabbit.com Index
Kommentare zu diesen Handbüchern