Rabbit 2000 Designers Handbook

Hide thumbs Also See for 2000:

Advertisement

Rabbit 2000™ Microprocessor
Designers Handbook
Revision C

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 2000 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Rabbit 2000

  • Page 1 Rabbit 2000™ Microprocessor Designers Handbook Revision C...
  • Page 2 Rabbit Semiconductor products are not authorized for use as critical components in life- support devices or systems unless a specific written agreement regarding such intended use is entered into between the customer and Rabbit Semiconductor prior to use. Life- support devices or systems are devices or systems intended for surgical impantation into the body or to sustain life, and whose failure to perform, when properly used in accor- dance with instructions for use provided in the labeling and user’s manual, can be reason-...
  • Page 3: Table Of Contents

    9. Memory Planning ......................33 10. Flash Memories......................35 10.1 Writing Your Own Flash Driver ....................36 11. Hardware Bring-Up Procedure ...................39 11.1 Bringing up a New Rabbit System ..................39 11.2 Initial Checks...........................39 11.3 Diagnostic Test #2 ........................39 11.4 Diagnostic Test #3 ........................40 Legal Notice........................41...
  • Page 4 Rabbit 2000 Microprocessor...
  • Page 5: Introduction

    The design conven- tions are straight forward and enhance design creativity. As shown in Figure 1, the Rabbit programming cable connects a PC serial port to the pro- gramming connector of the target microprocessor system.
  • Page 6 Rabbit 2000 Microprocesssor...
  • Page 7: Hardware Design Overview

    128K x 8 and 512K x 8 are given in Chapter 10, Flash Memories. The operating voltage in Rabbit-based systems will usually be 5 V or 3.3 V, but 2.7 V is also a possibility. The maximum computation per watt is obtained in the range of 3.0 V to 3.6 V.
  • Page 8 Rabbit core that includes memory and oscillators. Another possibility is to solder the Rabbit processors by hand to the circuit board. This is not difficult and is sat- isfactory for low production volumes if the right technique is used.
  • Page 9: How Dynamic C Cold-Boots The Target System

    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.
  • Page 10: Program Loading Process Overview

    3.2 Program Loading Process Overview On start up, Dynamic C first uses the PC’s DTR line on the serial port to assert the Rabbit RESET line and put the processor in cold-boot mode. Next, Dynamic C uses a four stage process to load a user program: 1.
  • Page 11 6. The program enters a loop where it receives a fixed number of bytes which comprise a secondary loader program (pilot.bin sent by the PC) and writes those bytes to memory location 0x4100. After all of the bytes are received, program execution jumps to 0x4100.
  • Page 12 Rabbit 2000 Microprocessor...
  • Page 13: Dynamic C Rabbit Programming Overview

    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.
  • Page 14: Memory Organization

    Z80 instruction set used 16-bit addresses to address a 64K memory space. All code and data had to fit in this 64K space. The Rabbit adopts a scheme similar to that used by the Z180 to expand the available memory space. The 64K space is divided into zones and a memory mapping unit or MMU maps each zone to a block in a larger memory;...
  • Page 15 3 V from a backup battery. The shutdown circuitry must keep the chip select line high while preserving memory contents with battery power. A basic Rabbit system has two static memory chips, one flash memory chip and one RAM memory chip. Additional static memory chips may be added. If the user’s application requires storing data in flash memory, particularly a lot of data, then it will often be pru- dent to add another flash memory chip for the user’s data, creating a system with three...
  • Page 16 Figure 2. Schematic Map of 16-bit Addressing Space It should be clear from the above Dynamic C memory types that the Rabbit does not have a “flat” memory space. The advantage of the Rabbit’s memory organization is that the use of 16-bit addresses and pointers is retained, ensuring that the code is compact and executes quickly.
  • Page 17 to flash memory. It may be mapped to RAM for debugging, or if it is decided to copy code to RAM to take advantage of faster access time offered by RAM. The root segment holds a mixture of code and constants. C functions or assembly language programs that are com- piled to the root segment are interspersed with data constants.
  • Page 18: How The Compiler Compiles To Memory

    E000+x. This automatic paging results in the code being divided into segments that are typically 4K long, but which can be very short or as long as 8K. Transfer of con- trol within each segment can be accomplished by 16-bit addressing. Between segments, 20-bit addressing is required. Rabbit 2000 Microprocessor...
  • Page 19: The Rabbit Bios

    5. The Rabbit BIOS The Dynamic C programming system for the Rabbit uses the concept of a BIOS (basic input output system). The BIOS is a separate program file that contains the basic code needed to interface with Dynamic C. It also normally contains a software interface to the user’s particular hardware.
  • Page 20: Bios Flowchart

    Divert to BIOS service? Act as master Service diag- Remote pro- for program nostic port. gram down- cloning. (not yet load. (not yet Call user appli- available) available) cation program (main). Figure 5. BIOS Flowchart Rabbit 2000 Microprocessor...
  • Page 21: Internally Defined Macros

    There are several macros at the top of that users may want to modify for RABBITBIOS.C boards they design or for special situations involving off-the-shelf, Rabbit based boards. USE115KBAUD The default value, 1, specifies that Dynamic C will communicate at 115,200 baud with the target.
  • Page 22: Origin Directives To The Compiler

    These would be used for special compilations of programs to be coresident on flashes between 512k and 1M in size. See application note 202, Rabbit Memory Management In a Nutshell, and application note 204, Page Switching: Running Two Application on One Rabbit Target, for more details.
  • Page 23 directives to decide where to place code and data in logical memory and its mapping to physical memory through a segment register value. The directives are normally specified in the BIOS. However, the directives may also be useful in the user program for certain tasks such as compiling a pilot BIOS or coldloader, or special situations where a user wants two application coresident within a single 256K quadrant of flash.
  • Page 24 For example, the first line of a pilot BIOS program, , would be pilot.c #rcodorg rootcode 0x0 0x0 0x6000 apply A program with such an origin directive could only be compiled to a BIN file, because compiling it to the target would overwrite the running BIOS. Rabbit 2000 Microprocessor...
  • Page 25: The System Id Block

    6. The System ID Block The BIOS supports a system identification block to be placed at the top of flash memory. Identification information for each device can be placed in it for access by the BIOS, flash driver, and users. This block will contain specific part numbers for the flash and RAM de- vices installed, the product’s serial number, Media Access Control (MAC) address if an Ethernet device, and so on.
  • Page 26: Access

    16 bytes starting at address 0x7FFF0 will be read) into a local buffer. If the flash is smaller than 512K, it doesn’t matter because 0x7FFF0 will still represent the start of the highest 16 bytes. Rabbit 2000 Microprocessor...
  • Page 27 2. The top six bytes of the buffer (read from 0x7FFF8-0x7FFFF) are checked for an alter- nating sequence of 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA. If this is not found, the block does not exist and an error (-2) is retured. 3.
  • Page 28 Offset of user block location from start of this block SIZE - 0Ah CRC value of this block (when this field = 0000h) SIZE - 08h Marker, should = 55h AAh 55h AAh 55h AAh SIZE - 06h Rabbit 2000 Microprocessor...
  • Page 29: Bios Support For Program Cloning

    A program can be loaded into a controller by compiling it using Dynamic C. However, this is awkward and slow in some situations. If cloning is enabled in the BIOS, a Rabbit- based system can copy itself into another controller by connecting the programming ports of the two controllers together in the proper way as shown in Figure 6.
  • Page 30 Since the BIOS supports a variety of flash types, the flash devices on the two boards need not be identical; however, they should be the same size. Rabbit 2000 Microprocessor...
  • Page 31: Low-Power Design And Support

    (except that some inputs may float briefly during power-on sequencing). Most unused inputs on the Rabbit can be made into outputs by proper software initialization to remove the floating property. Pullup resis- tors will be needed on a few inputs that cannot be programmed as outputs.
  • Page 32: Software Support For Low-Power Sleepy Modes

    32.768 kHz oscilla- tor, is very low, in the area of 50 µA to 100 µA. The Rabbit will generally test for some external event and leave sleeping mode when that event is detected. The 32.768 kHz oscillator is a major consumer of power, requiring approximately 80 µA at 3.3 V.
  • Page 33: Baud Rates In Sleepy Mode

    1024 bps. Baud rate mismatches of up to 5% may be tolerated.) If there is a large baud rate mismatch, the serial port can usually detect that a character has been sent to it, but not read the exact character. Rabbit Version...
  • Page 34 Dynamic C User’s Manual...
  • Page 35: Memory Planning

    RAM is available to hold the program and data. For this reason, most Z-World controllers based on the Rabbit use a dual footprint for RAM that can accommodate either a 32K x 8, which is in a 28-pin package, or a 128K x 8 or 512K x 8, which is in a 32-pin package.
  • Page 36 Rabbit 2000 Microprocessor...
  • Page 37: Flash Memories

    10. Flash Memories The flash memories listed in Table 3 below have been qualified for use with the Rabbit 2000 microprocessor. Table 3. 32-Pin Flash Memories Supported by the Rabbit 2000 Best Device Sector Operating Number Device Write Access Dynamic...
  • Page 38: Writing Your Own Flash Driver

    The field flashXPC contains the XPC required to access the first flash physical memory location via XMEM address E000h. The pointers writePtr and eraseChipPtr should point to a function in RAM to avoid accessing the flash memory while working Rabbit 2000 Microprocessor...
  • Page 39 with it. You will probably be required to copy the function from flash to a RAM buffer in the flash initialization sequence. The field writeMode specifies the method that particular flash device uses to write data. Currently, only two common modes are defined: “sector-writing” mode, as used by the SST SST29 and Atmel AT29 series (writeMode=1);...
  • Page 40 -4 if an attempt was made to write over the ID block. Modifications to Dyncamic C are pending to allow use of large sector (>4096) flashes in debugging. To incorporate a large sectored flash into an end product, the best strategy is have a small sectored development board. Rabbit 2000 Microprocessor...
  • Page 41: Hardware Bring-Up Procedure

    When a user has designs a new microprocessor system around the Rabbit and carefully follows the Rabbit design conventions, it is possible that the system will not boot up when Dynamic C is connected to the programming connector. This can happen because of a design error or even because of a random hardware defect in the new system.
  • Page 42: Diagnostic Test #3

    // starting at address zero. 00 01 21 00 02 01 00 03 00 00 04 06 00 05 10 00 06 7e 00 07 29 00 08 10 00 09 FC 00 0A C3 00 0B 00 Rabbit 2000 Microprocessor...
  • Page 43 80 24 80 //terminate bootstrap, start at address zero ;test program ld hl,1 ld b,16 loop: ld a,(hl) add hl,hl ; shift left djnz loop ; 16 steps jp 0 ; continue test If this test runs it will toggle the first 16 address lines. In addition, all of the data lines must be functioning or the program would not execute correctly.
  • Page 44 Rabbit 2000 Microprocessor...
  • Page 45: Legal Notice

    Rabbit Semiconductor products are not authorized for use as critical components in life- support devices or systems unless a specific written agreement regarding such intended use is entered into between the customer and Rabbit Semiconductor prior to use. Life- support devices or systems are devices or systems intended for surgical impantation into the body or to sustain life, and whose failure to perform, when properly used in accor- dance with instructions for use provided in the labeling and user’s manual, can be reason-...

Table of Contents