RabbitCore 2000 C-Programmable Core Module User’s Manual 001004 - C
RabbitCore 2000 User’s Manual Part Number 019-0077 • 001004 - C • Printed in U.S.A. Copyright © 2000 Z-World, Inc. • All rights reserved. Z-World reserves the right to make changes and improvements to its products without providing notice. Trademarks • Dynamic C® is a registered trademark of Z-World, Inc.
Table of Contents About This Manual 1. Introduction1 1.1 Features .......................................................................................................................................2 1.2 Advantages of Using the RabbitCore 2000.................................................................................3 1.3 Development and Evaluation Tools ............................................................................................3 1.3.1 Development Kit...............................
Appendix B. Prototyping Board .......................................................................................35 B.1 Mechanical Dimensions and Layout........................................................................................ 36 B.2 Power Supply ........................................................................................................................... 37 B.3 Using the Prototyping Board ........................................................................................
About This Manual This manual provides instructions for installing, testing, configuring, and interconnecting the RabbitCore 2000 (RCM 2000) and the RCM 2000 Prototyping Board. Assumptions Assumptions are made regarding the user’s knowledge and experience in the following areas: • Ability to design and engineer the target system that a RabbitCore 2000 will control. • Understanding of the basics of operating a software program and editing files under Windows on a PC.
Conventions Table 2 lists and defines the typographic conventions that may be used in this manual. Table 2. Typographic Conventions Example Description while Bold Courier font indicates a program, a fragment of a program, or a Dynamic C keyword or phrase. // IN-01… Program comments are in normal Courier font. Italics Courier italics indicate that something should be typed instead of the italicized words (e.g., type a file name where filename is shown).
1.
The RabbitCore 2000 is a microprocessor core module designed to be the heart of your own controller built around the plug-in module. Data processing is done by a Rabbit 2000 microprocessor operating at 25.8 MHz (RCM2000 and RCM2010). The RabbitCore 2000 has a Rabbit 2000 microprocessor, a static RAM, a flash memory, two quartz crystals (main oscillator and timekeeping), and the circuitry necessary for reset and management of battery backup of the Rabbit 2000’s internal real-time clock and the static RAM.
Table 1. RabbitCore 2000 Features Model Features RCM2000 Full-featured controller. RCM2010 RCM2000 with 128K SRAM RCM2020 RCM2000 with 18.432 MHz clock and 128K SRAM 1.2 Advantages of Using the RabbitCore 2000 • Fast design time since the basic core has already been designed and built. • Competitive pricing compared with purchasing and assembling the individual components. • Easy programming, including production installation of a program.
1.3.2 Documentation • Our documentation is provided in paperless form on the CD-ROM included in the Development Kit. (A paper copy of the “Getting Started” page is included.) Most documents, including this comprehensive RabbitCore 2000 User’s Manual, are provided in two formats: HTML and PDF. HTML documents can be viewed with an Internet browser, either Netscape Navigator or Internet Explorer.
2. SUBSYSTEMS Chapter 2 describes the principal subsystems for the RabbitCore 2000.
2.1 Switching Between Program Mode and Run Mode The RabbitCore 2000 is automatically in Program Mode when the programming cable is attached, and is automatically in Run Mode when no programming cable is attached. See Figure 1.
2.2 RabbitCore 2000 Digital Inputs and Outputs Figure 3 shows the subsystems designed into the RabbitCore 2000. PA0PA7 4x CMOS synchronous/ asynchronous PCLK RESET WDO PB0 PB5 PB6 PB7 PD0PD7 Port A Port B Port D Serial Ports (Port C) RABBIT 2000 CORE MODULE Port E PE0PE7 Address Lines A0A12 I/O Control IORD IOWR BUFEN Programming Port Misc. Outputs Real-Time Clock Watchdog 7 Timers Slave Port Clock Doubler RAM Backup Battery Support Data Lines DA0DA7 Flash Figure 3.
The ports on the Rabbit 2000 microprocessor used in the RabbitCore 2000 are configurable, and so the factory defaults can be reconfigured. Table 2 lists the Rabbit 2000 factory defaults and the alternate configurations. Table 2.
Table 2.
As shown in Table 2, pins PA0–PA7 can be used to allow the Rabbit 2000 to be a slave to another processor. PE0, PE1, PE4, and PE5 can be used as external interrupts INT0A, INT1A, INT0B, and INT1B. Pins PB0 and PB1 can be used to access the clock on Serial Port B and Serial Port A of the Rabbit microprocessor. Pins PD4 and PD6 can be programmed to be optional serial outputs for Serial Ports B and A. PD5 and PD7 can be used as alternate serial inputs by Serial Ports B and A. 2.2.
2.3 Memory I/O Interface Thirteen of the Rabbit 2000 address lines (A0–A12) and all the data lines (D0–D7) are available as outputs on the RabbitCore 2000. I/0 write (/IOWR), I/0 read (/IORD), buffer enable (/BUFEN), and Watchdog Output (/WDO) are also available for interfacing to external devices. The STATUS output has three different programmable functions: 1. It can be driven low on the first op code fetch cycle. 2. It can be driven low during an interrupt acknowledge cycle. 3.
2.4 Serial Communication The RabbitCore 2000 does not have an RS-232 or an RS-485 transceiver directly on the RabbitCore 2000 board. However, the Prototyping Board does support a industry standard RS-232 transceiver chip. See Appendix B, “Prototyping Board,” for more information. 2.4.1 Serial Ports There are four serial ports designated as Serial Ports A, B, C, and D. All four serial ports can operate in an asynchronous mode up to the baud rate of the system clock divided by 32.
2.5 Clock Doubler The RabbitCore 2000 takes advantage of the Rabbit 2000 microprocessor’s internal clock doubler. A built-in clock doubler allows half-frequency crystals to be used to reduce radiated emissions. The 25.8 MHz (RCM 2000 and RCM2010) and 18.4 MHz (RCM 2020) frequencies are generated using 12.9 MHz and 9.2 MHz crystals. The clock doubler is disabled automatically in the BIOS for crystals with a frequency above 12.9 MHz. The clock doubler can be disabled if 25.8 MHz or 18.
2.6 Memory 2.6.1 SRAM The RabbitCore 2000 is designed to accept 32K to 512K of SRAM packaged in an SOIC case. The existing standard models of the RabbitCore 2000 come with 128K or 512K of SRAM. Figure 6 shows the locations and the jumper settings for the jumpers at JP1 used to set the SRAM size. The “jumpers” are 0 Ω surface-mounted resistors.
3.
3.1 More About Dynamic C Dynamic C has been in use worldwide since 1989. Dynamic C is specially designed for programming embedded systems. Dynamic C features quick compile and interactive debugging in the real environment. A complete reference to Dynamic C is contained in the Dynamic C Reference Manual. Dynamic C for Rabbit™ processors uses the standard Rabbit programming interface. This is a 10-pin connector that connects to the Rabbit serial port A.
• Watchdog support routines. Although the Rabbit watchdog can be disabled, this is not recommended since the watchdog is an essential facility for recovering when a program stops running. Very few systems are crash-free in real life. 3.1.2 Using Dynamic C You have a choice of doing your software development in the flash memory or in the static RAM. There are 256K bytes of flash and 128K SRAM memory. The advantage of working in RAM is to save wear on the flash, which is limited to about 100,000 writes.
3.3 Serial Communication Drivers The Prototyping Board has room for an RS-232 chip for which the Rabbit serial library, RSERIAL.LIB, provides users with a set of functions that send and receive entire blocks of data without yielding to other tasks, a set of single-user cofunctions that send and receive data but yield to other tasks, and a set of circular buffer functions.
3.3.1 Open and Close Functions The open and close functions enable and disable serial communication over the specified port. int serXopen (long baud); Currently only 8N1 transmission (8 data bits, no parity, 1 stop bit) is supported. The open function sets up the interrupt service routine vector. Parameters baud—desired baud rate in bits per second Return Value 1—The baud rate set on the Rabbit is the same as the input baud rate. 0—The baud rate set on the rabbit does not match the input baud rate.
3.3.2 Non-Cofunction Blocking Input Functions These are simple functions that do not use Dynamic C costatements. If no input data are available when called, they return immediately with appropriate status information in their return value. Once they begin to receive characters, they do not yield to other tasks until they complete their operation or until a character-to-character time-out period elapses. int serXgetc ( ); Gets a single character.
3.3.3 Non-Cofunction Blocking Output Functions These are simple functions that do not use Dynamic C costatements. They immediately begin to perform their task, not yielding to other tasks until all characters have been written. int serXputc (char c); Writes a character to the serial port. Parameters c—Character to write Return Value 1 for success, 0 if the character could not be written to the port. int serXputs (char *s); Calls serXwrite (s, strlen (s)).
3.3.4 Single-User Cofunction Input Functions These are Dynamic C cofunctions. If the input buffer they use is locked or becomes full during the course of their operation, they yield to other tasks, but do not return to execute the next statement within their own costatement block until they have completed their operation. scofunc int cof_serXgetc ( ); Reads a single character from the serial port, yielding when not successful, and only returning when a character is successfully read.
3.3.5 Single-User Cofunction Output Functions These are Dynamic C cofunctions. If the output buffer they use is locked or becomes empty during the course of their operation, they yield to other tasks, but do not return to execute the next statement within their own costatement block until they have completed their operation.
3.3.6 Circular Buffer Functions These functions act on or report status of the circular transmit/receive buffers. Macro definitions are used to establish the buffer sizes: xINBUFSIZE—read buffer size, where x is A, B, C, or D xOUTBUFSIZE—write buffer size where x is A, B, C, or D The user must define each buffer size for each port being used to be a power of 2 minus 1 with a macro. The size of 2^n - 1 enables masking for fast rollover calculations.
int serXrdFree ( ); Calculates the free space in the serial port receive buffer. Parameters None Return Value The number of characters the serial port receive buffer can accept before becoming full. int serXwrFree ( ); Calculates the free space in the serial port transmit buffer. Parameters None Return Value The number of characters the serial port transmit buffer can accept before becoming full. int serXrdUsed ( ); Calculates the number of characters ready to read from the serial port receive buffer.
26 RabbitCore 2000
APPENDIX A.
A.1 Electrical and Mechanical Specifications Figure A-1 shows the mechanical dimensions for the RabbitCore 2000. 2.30 (58.4) 1.31 (33.3) JP1 SRAM C5 R4 /RESO GND VCC J3 0.50 0.50 (14) (13) 0.31 (5.0) (3.2) (6.9) 0.125 dia 0.31 (9.42) Y2 /RSTI 1.90 U2 A12 A10 A8 A6 A4 A2 A0 PC0 PC2 PC4 PC6 PD0 PD2 PD4 PD6 GND VBAT SM0 (48.3) C2 R2 J2 A11 A9 A7 A5 A3 A1 STAT PC1 PC3 PC5 PC7 PD1 PD3 PD5 PD7 VCC VRAM SM1 0.27 R1 TP3 0.27 U1 R3 (0,0) for Pin 1 coordinates C3 TP2 0.
Table A-2 lists the electrical, mechanical, and environmental specifications for the RabbitCore 2000. Table A-2. RCM2000 Specifications Parameter Specification Board Size 1.90" × 2.30" × 0.50" (48.3 mm × 58.4 mm × 12.7 mm) Operating Temperature –40°C to +85°C Storage Temperature –55°C to +125°C Humidity 5% to 95%, noncondensing Input Voltage 4.75 V to 5.25 V DC Current 58 mA at 9.216 MHz, 5 V DC 74 mA at 12.9024 MHz, 5 V DC 98 mA at 18.432 MHz, 5 V DC 130 mA at 25.
Table A-2. RCM2000 Specifications (continued) Parameter Specification Socket Strip (for connection Pinrex 2x20, 2 mm pitch (PS2S-2X20GOB) to headers J1 and J2) Recommended Standoff (to attach RabbitCore 2000 9/32” (7.14) with 4-40 screw to user board) Provision for user-supplied backup battery (2.85 V to 3.15 V) via connections on header J2 Backup Battery A.1.1 Headers The RabbitCore 2000 uses headers at J1, J2, and J3 for physical connection to other boards.
A.2 Bus Loading When designing an interface to the RabbitCore 2000, careful attention must be paid to bus loading. This section provides bus loading of external devices. Table A-3 lists the capacitance for the various RabbitCore 2000 I/O ports. Table A-3.
The values from the table above are derived using 55 ns (25.8 MHz version) and 90 ns (18.4 MHz version) memory access times. External capacitive loading can be improved by 10 pF for commercial temperature ranges, but do not exceed 100 pF. See the AC timing specifications in the Rabbit 2000 Users Manual for more information. Figure A-3 shows a typical timing diagram for the Rabbit 2000 microprocessor memory read and write cycles.
A.3 Rabbit 2000 DC Characteristics Table A-5 outlines the DC characteristics for the Rabbit 2000 at 5.0 V over the recommended operating temperature range from Ta = –40°C to +85°C, VDD = 4.5 V to 5.5 V. Table A-5. 5.0 Volt DC Characteristics Symbol Parameter Test Conditions Min IIH Input Leakage High VIN = VDD, VDD = 5.5 V IIL Input Leakage Low (no pull-up) VIN = VSS, VDD = 5.5 V -10 IOZ Output Leakage (no pull-up) VIN = VDD or VSS, VDD = 5.
A.4 I/O Buffer Sourcing and Sinking Limit Unless otherwise specified, the Rabbit I/O buffers are capable of sourcing and sinking 8 mA of current per pin at full AC switching speed. Full AC switching assumes a 25.8 MHz CPU clock and capacitive loading on address and data lines of less than 100 pF per pin. Address pin A0 and data pin D0 are rated at 16 mA each. Pins A1–A12 and D1–D7 are each rated at 8 mA. The absolute maximum operating voltage on all I/O is VDD + 0.5 V, or 5.5 V.
APPENDIX B. PROTOTYPING BOARD Appendix B describes the features and accessories of the Prototyping Board, and explains the use of the Prototyping Board to demonstrate the RabbitCore 2000 and to build prototypes of your own circuits.
B.1 Mechanical Dimensions and Layout Figure B-1 shows the mechanical dimensions and layout for the RabbitCore 2000 Prototyping Board. J5 DS1 DS2 PB2 PA1 S2 PB3 J6 RXB TXB PD1 PD3 PD5 PD0 PD2 PD4 GND PC7 PC6 VCC PC5 PC4 /RSTI PC3 PC2 SM1 PC1 PC0 VRAM STAT A0 SM0 A1 A2 /RSTO A3 A4 VCC A5 A6 PD6 A7 A8 GND A9 A10 VBAT A11 A12 C6 4.
B.2 Power Supply The RabbitCore 2000 requires a regulated 5 V ± 0.25 V dc power source to operate. Depending on the amount of current required by the application, different regulators can be used to supply this voltage. The Prototyping Board has an onboard LM340-T5 or equivalent. The LM340-T5 is an inexpensive linear regulator that is easy to use. Its major drawback is its inefficiency, which is directly proportional to the voltage drop across it. The voltage drop creates heat and wastes power.
typing Board. Figure B-3 shows the four places where cuts should be made. An exacto knife would work nicely to cut the traces. Alternatively, a small standard screwdriver may be carefully and forcefully used to wipe through the PCB traces. Bottom Side JP1 DS2 DS3 S2 S3 PA0 PA1 PB2 PB3 Cut Figure B-3. Where to Cut Traces to Permanently Disable Demonstration Hardware on Prototyping Board The power LED (PWR) and the RESET switch remain connected.
J3 J1 VCC PA1 PA3 PA5 PA7 PB1 PB3 PB5 PB7 GND D6 D4 D2 D0 PE6 PE4 PE2 PE0 /IORD /WDO GND PA0 PA2 PA4 PA6 PB0 PB2 PB4 PB6 PCLK D7 D5 D3 D1 PE7 PE5 PE3 PE1 /IOWR /BUFEN A11 A9 A7 A5 A3 A1 STATUS PC1 PC3 PC5 PC7 PD1 PD3 PD5 PD7 VCC VRAM SMODE1 /RES_IN GND A12 A10 A8 A6 A4 A2 A0 PC0 PC2 PC4 PC6 PD0 PD2 PD4 PD6 GND VBAT SMODE0 /RES_OUT VCC Figure B-4.
B.3.1 Adding Other Components There is room on the Prototyping Board for a user-supplied RS-232 transceiver chip at location U2 and a 10-pin header for serial interfacing to external devices at location J6. A Maxim MAX232 transceiver is recommended. When adding the MAX232 transceiver at position U2, you must also add 100 nF charge storage capacitors at positions C3–C6 as shown in Figure B-6.
APPENDIX C.
C.1 Power Supplies The RabbitCore 2000 requires a regulated 5 V ± 0.25 V DC power source. A RabbitCore 2000 with no loading at the outputs operating at 18.432 MHz typically draws 98 mA, and a RabbitCore 2000 operating at 25.8048 MHz typically draws 130 mA. The RabbitCore 2000 will consume 13 mA to 15 mA of additional current when the programming cable is used to connect J3 to a PC. C.1.
C.1.2 Battery Backup Circuit The battery-backup circuit serves two purposes: • It reduces the battery voltage to the real-time clock, thereby reducing the current consumed by the real-time clock and lengthening the battery life. • It ensures that current can flow only out of the battery to prevent charging the battery. Figure C-2 shows the RabbitCore 2000 battery backup circuitry. VRAM R12 0Ω MMBT5088LT1 Q12 R13 VBAT 4.3 MΩ R14 R11 1.
These voltages vary with temperature. VRAM varies the least because temperature-compensation diodes D10–D12 will offset the variation with temperature of Q12’s VBE. R17– R19 may be stuffed instead of the corresponding D10–D12 to provide the optimum temperature compensation. Resistor R13 provides a minimum load to the regulator circuit. VRAM is also available on pin 34 of header J2 to facilitate battery backup of the external circuit.
C.1.4 Reset Generator The RabbitCore 2000 uses a reset generator, U10, to reset the Rabbit 2000 microprocessor when the voltage drops below the voltage necessary for reliable operation. The reset occurs between 4.50 V and 4.75 V, typically 4.63 V. The RabbitCore 2000 has a reset output, pin 37 on header J3, presented to the headers. The reset generator has a reset input, pin 38 on header J3, that can be used to force the RabbitCore 2000 to reset. C.
can periodically access the SRAM. When power is removed from the circuit, the transistors will turn off and isolate /CSRAM from the processor. The isolated /CSRAM line has a 100 kΩ pullup resistor to VRAM (R28). This pullup resistor keeps /CSRAM at the VRAM voltage level (which under no power condition is the backup battery’s regulated voltage at a little more than 2 V). Transistors Q13 and Q14 are of opposite polarity so that a rail-to-rail voltages can be passed.
APPENDIX D. SAMPLE CIRCUITS Appendix D provides these sample circuits that incorporate the RabbitCore 2000.
D.1 RS-232/RS-485 Serial Communication RS-232 1 Rabbit 2000 Core Module V+ V C1+ 100 nF J2 100 nF 3 C1 4 C2+ 5 C2 VCC 100 nF 2 6 100 nF 19 PC4 11 T1IN T1OUT 14 TXB 17 PC2 10 T2IN T2OUT 7 TXC 20 PC5 12 R1OUT R1IN 13 RXB 18 PC3 9 R2OUT R2IN 8 RXC 15 PC0 4 D 16 PC1 1 R Rabbit 2000 Core Module J2 28 PD5 47 kΩ 3 2 RS-485 VCC 680 Ω A 6 B 7 DE 485+ 220 Ω 485 680 Ω RE SP483EN Figure D-1. Sample RS-232 and RS-485 Circuits Sample Program: PUTS.
D.2 Keypad and LCD Connections Rabbit 2000 Core Module J1 VCC 10 kΩ resistors PB0 PB2 PB3 PB4 PB5 11 13 14 15 16 J2 Keypad Row 0 Row 2 Row 3 Row 4 Row 5 PC1 PD6 PD7 20 29 30 Row 1 Col 0 Col 1 NC NC Figure D-2. Sample Keypad Connections Sample Program: KEYLCD.C in SAMPLES/COREMODULE. Rabbit 2000 Core Module 4 5 6 7 8 9 10 PA1 PA2 PA3 PA4 PA5 PA6 PA7 100 nF 680 Ω 3 470 Ω 1 kΩ 2.2 kΩ 4.
D.3 LCD Connections 2x20 LCD DB0DB7 D0D7 Rabbit 2000 Core Module 2x20 LCD D0D7 DB0DB7 /PE0 /IOR /IOW /PE1 E E Figure D-4. Sample LCD Connections Sample Program: LCD_DEMO.C in SAMPLES/COREMODULE. The shaded part of the circuit in Figure D-4 can be used to drive a second LCD, but additional software not included in LCD_DEMO.C will have to be written.
D.4 External Memory The sample circuit can be used with an external 64 Kbit memory device. Larger SRAMs can be written to using this scheme by using other available Rabbit 2000 ports (parallel ports A to E) as address lines. 8K × 8 SRAM Rabbit 2000 Core Module A0A12 A0A12 D0D7 D0D7 /WE /OE /CE /IOW /IOR /BEN Figure D-5. Sample External Memory Connections Sample Program: EXTSRAM.C in SAMPLES/COREMODULE.
D.5 D/A Converter The output will initially be 0 V to -10.05 V after the first inverting op-amp, and 0 V to +10.05 V after the second inverting op-amp. All lows produce 0 V out, FF produces 10 V out. The output can be scaled by changing the feedback resistors on the op-amps. For example, changing 5.11 kΩ to 2.5 kΩ will produce an output from 0 V to -5 V. Op-amps with a very low input offset voltage are recommended. HC374 649 kΩ 22 pF 22 pF 5.
SCHEMATICS User’s Manual
REVISION APPROVAL REVISION HISTORY REV APPEND THE FOLLOWING DOCUMENTS WHEN CHANGING THIS DOCUMENT: PROJECT ENGINEER DESCRIPTION ECO APPROVAL DATE DOCUMENT CONTROL APPROVAL DATE DRAWING CONTENT: 2900 SPAFFORD ST.
B NONE
REVISION APPROVAL REVISION HISTORY REV APPEND THE FOLLOWING DOCUMENTS WHEN CHANGING THIS DOCUMENT: PROJECT ENGINEER DESCRIPTION ECO APPROVAL DATE DOCUMENT CONTROL APPROVAL DATE DRAWING CONTENT: 2900 SPAFFORD ST.
B NONE
REVISION APPROVAL REVISION HISTORY REV APPEND THE FOLLOWING DOCUMENTS WHEN CHANGING THIS DOCUMENT: PROJECT ENGINEER DESCRIPTION ECO APPROVAL DATE DOCUMENT CONTROL APPROVAL DATE DRAWING CONTENT: ZWORLD 2900 SPAFFORD ST.