ChipFind - Datasheet

Part Number Rabbit2000

Download:  PDF   ZIP

Document Outline

Rabbit 2000
®
Microprocessor
User's Manual
019­0069
·
030815­K
Rabbit 2000 Microprocessor
Rabbit Semiconductor
2932 Spafford Street
Davis, California 95616-6800
USA
Telephone: (530) 757-8400
Fax: (530) 757-8402
www.rabbitsemiconductor.com
Rabbit 2000 Microprocessor User's Manual
Part Number 019-0069 · 030815­K · Printed in U.S.A.
©1999­2003 Rabbit Semiconductor · All rights reserved.
Rabbit Semiconductor reserves the right to make changes and
improvements to its products without providing notice.
Trademarks
Rabbit and Rabbit 2000 are registered trademarks of Rabbit Semiconductor.
Dynamic C is a registered trademark of Z-World, Inc.
User's Manual
T
ABLE
OF
C
ONTENTS
Chapter 1. Introduction
1
1.1 Features and Specifications ..................................................................................................................1
1.2 Summary of Rabbit Advantages ...........................................................................................................5
Chapter 2. Rabbit Design Features
7
2.1 The Rabbit 8-bit Processor vs. 16-bit and 32-bit Processors ................................................................7
2.2 Overview of On-Chip Peripherals ........................................................................................................8
2.2.1 Serial Ports ...................................................................................................................................8
2.2.2 System Clock ...............................................................................................................................8
2.2.3 Time/Date Oscillator ....................................................................................................................9
2.2.4 Parallel I/O ...................................................................................................................................9
2.2.5 Slave Port .....................................................................................................................................9
2.2.6 Timers ........................................................................................................................................10
2.3 Design Standards ................................................................................................................................11
2.3.1 Programming Port ......................................................................................................................12
2.3.2 Standard BIOS ...........................................................................................................................12
2.4 Dynamic C Support for the Rabbit ....................................................................................................12
Chapter 3. Details on Rabbit Microprocessor Features
13
3.1 Processor Registers .............................................................................................................................13
3.2 Memory Mapping ...............................................................................................................................15
3.2.1 Extended Code Space .................................................................................................................18
3.2.2 Extending Data Memory ............................................................................................................19
3.2.3 Practical Memory Considerations ..............................................................................................21
3.3 Instruction Set Outline ........................................................................................................................21
3.3.1 Load Immediate Data To a Register ..........................................................................................23
3.3.2 Load or Store Data from or to a Constant Address ....................................................................23
3.3.3 Load or Store Data Using an Index Register .............................................................................23
3.3.4 Register to Register Move ..........................................................................................................24
3.3.5 Register Exchanges ....................................................................................................................25
3.3.6 Push and Pop Instructions ..........................................................................................................25
3.3.7 16-bit Arithmetic and Logical Ops ............................................................................................26
3.3.8 Input/Output Instructions ...........................................................................................................28
3.4 How to Do It in Assembly Language--Tips and Tricks ....................................................................30
3.4.1 Zero HL in 4 Clocks ...................................................................................................................30
3.4.2 Exchanges Not Directly Implemented .......................................................................................30
3.4.3 Manipulation of Boolean Variables ...........................................................................................30
3.4.4 Comparisons of Integers ............................................................................................................31
3.4.5 Atomic Moves from Memory to I/O Space ...............................................................................33
3.5 Interrupt Structure...............................................................................................................................34
3.5.1 Interrupt Priority ........................................................................................................................34
3.5.2 Multiple External Interrupting Devices .....................................................................................36
3.5.3 Privileged Instructions, Critical Sections and Semaphores .......................................................36
3.5.4 Critical Sections .........................................................................................................................37
3.5.5 Semaphores Using Bit B,(HL) ...................................................................................................37
3.5.6 Computed Long Calls and Jumps ..............................................................................................37
Rabbit 2000 Microprocessor
Chapter 4. Rabbit Capabilities
39
4.1 Precisely Timed Output Pulses .......................................................................................................... 39
4.1.1 Pulse Width Modulation to Reduce Relay Power ..................................................................... 41
4.2 Open-Drain Outputs Used for Key Scan............................................................................................ 42
4.3 Cold Boot ........................................................................................................................................... 43
4.4 The Slave Port .................................................................................................................................... 44
4.4.1 Slave Rabbit As A Protocol UART ........................................................................................... 45
Chapter 5. Pin Assignments and Functions
47
5.1 Package Schematic and Pinout........................................................................................................... 47
5.2 Package Mechanical Dimensions....................................................................................................... 48
5.3 Rabbit Pin Descriptions...................................................................................................................... 50
5.4 Bus Timing ......................................................................................................................................... 56
5.5 Description of Pins with Alternate Functions .................................................................................... 57
5.6 DC Characteristics.............................................................................................................................. 59
5.6.1 5.0 Volts .................................................................................................................................... 60
5.6.2 3.3 Volts .................................................................................................................................... 61
5.7 I/O Buffer Sourcing and Sinking Limit.............................................................................................. 62
Chapter 6. Rabbit Internal I/O Registers
63
6.1 Default Values for all the Peripheral Control Registers..................................................................... 63
Chapter 7. Miscellaneous I/O Functions
69
7.1 Processor Identification...................................................................................................................... 69
7.2 Rabbit Oscillators and Clocks ............................................................................................................ 70
7.3 Clock Doubler .................................................................................................................................... 72
7.4 Controlling Power Consumption........................................................................................................ 74
7.5 Output Pins CLK, STATUS, /WDTOUT, /BUFEN .......................................................................... 75
7.6 Time/Date Clock (Real-Time Clock) ................................................................................................. 76
7.7 Watchdog Timer................................................................................................................................. 78
7.8 System Reset ...................................................................................................................................... 80
7.9 Rabbit Interrupt Structure................................................................................................................... 82
7.9.1 External Interrupts ..................................................................................................................... 84
7.9.2 Interrupt Vectors: INT0 - EIR,00h/INT1 - EIR,08h .................................................................. 85
7.10 Bootstrap Operation ......................................................................................................................... 86
Chapter 8. Memory Mapping and Interface
89
8.1 Memory-Mapping Unit ...................................................................................................................... 89
8.2 Memory Interface Unit....................................................................................................................... 91
8.3 Memory Control Unit Registers ......................................................................................................... 92
8.3.1 Memory Bank Control Registers ............................................................................................... 92
8.3.2 MMU Instruction/Data Register ................................................................................................ 93
8.3.3 Memory Timing Control Register ............................................................................................. 93
8.4 Allocation of Extended Code and Data.............................................................................................. 94
8.5 How Compiler Compiles to Memory................................................................................................. 95
Chapter 9. Parallel Ports
97
9.1 Parallel Port A .................................................................................................................................... 98
9.2 Parallel Port B .................................................................................................................................... 99
9.3 Parallel Port C .................................................................................................................................. 100
9.4 Parallel Port D .................................................................................................................................. 101
9.5 Parallel Port E................................................................................................................................... 104
Chapter 10. I/O Bank Control Registers
107
User's Manual
Chapter 11. Timers
109
11.1 Timer A...........................................................................................................................................110
11.1.1 Timer A I/O Registers ............................................................................................................111
11.1.2 Practical Use of Timer A .......................................................................................................112
11.2 Timer B ...........................................................................................................................................113
11.2.1 Using Timer B ........................................................................................................................115
Chapter 12. Rabbit Serial Ports
117
12.1 Serial Port Register Layout.............................................................................................................118
12.2 Serial Port Interrupt ........................................................................................................................121
12.3 Transmit Serial Data Timing ..........................................................................................................122
12.4 Receive Serial Data Timing ............................................................................................................122
12.5 Clocked Serial Ports........................................................................................................................123
12.6 Clocked Serial Timing ....................................................................................................................126
12.6.1 Clocked Serial Timing With Internal Clock ..........................................................................126
12.6.2 Clocked Serial Timing with External Clock ..........................................................................126
12.7 Serial Port Software Suggestions....................................................................................................127
12.7.1 Controlling an RS-485 Driver and Receiver ..........................................................................129
12.7.2 Transmitting Dummy Characters ...........................................................................................129
12.7.3 Transmitting and Detecting a Break ......................................................................................129
12.7.4 Using A Serial Port to Generate a Periodic Interrupt .............................................................129
12.7.5 Extra Stop Bits, Sending Parity, 9th Bit Communication Schemes .......................................130
12.7.6 Supporting 9th Bit Communication Protocols .......................................................................132
12.7.7 Rabbit-Only Master/Slave Protocol .......................................................................................133
12.7.8 Data Framing/Modbus ...........................................................................................................133
Chapter 13. Rabbit Slave Port
135
13.1 Hardware Design of Slave Port Interconnection ............................................................................140
13.2 Slave Port Registers ........................................................................................................................140
13.3 Applications and Communications Protocols for Slaves................................................................142
13.3.1 Slave Applications .................................................................................................................142
13.3.2 Master-Slave Messaging Protocol .........................................................................................143
Chapter 14. Rabbit 2000 Clocks
145
14.1 Low-Power Design .........................................................................................................................146
14.2 Clock Spectrum Spreader Module ..................................................................................................146
Chapter 15. AC Timing Specifications
147
15.1 Memory Access and I/O Read/Write Times...................................................................................150
15.2 Current Consumption......................................................................................................................158
Chapter 16. Rabbit BIOS and Virtual Driver
161
16.1 The BIOS ........................................................................................................................................161
16.1.1 BIOS Services ........................................................................................................................161
16.1.2 BIOS Assumptions .................................................................................................................162
16.2 Virtual Driver..................................................................................................................................162
16.2.1 Periodic Interrupt ...................................................................................................................162
16.2.2 Watchdog Timer Support .......................................................................................................162
Chapter 17. Other Rabbit Software
165
17.1 Power Management Support...........................................................................................................165
17.2 Reading and Writing I/O Registers.................................................................................................166
17.2.1 Using Assembly Language ....................................................................................................166
17.2.2 Using Library Functions ........................................................................................................166
17.3 Shadow Registers............................................................................................................................167
17.3.1 Updating Shadow Registers ...................................................................................................167
17.3.2 Interrupt While Updating Registers .......................................................................................167
17.3.3 Write-only Registers Without Shadow Registers ..................................................................168
17.4 Timer and Clock Usage ..................................................................................................................168