2
Rabbit 4000 Microprocessor User’s Manual
Port B to provide the processor's six or eight least significant address lines for interfacing
with external peripherals.
The high-performance instruction set offers both greater efficiency and execution speed of
compiler-generated C code. Instructions include numerous single-byte opcodes that execute
in two clock cycles, 16-bit and 32-bit loads and stores, 16-bit and 32-bit logical and arith-
metic operations, 16 × 16 multiply (executes in 12 clocks), long jumps and returns for
accessing a full 16 megabytes of memory, and one-byte prefixes to turn memory-access
instructions into internal and external I/O instructions. Hardware-supported breakpoints
ease debugging by trapping on code execution or data reads and writes.
The Rabbit 4000 requires no external memory driver or interface-logic. Its 24-bit address
bus, 8-bit or 16-bit data bus, three chip-select lines, two output-enable lines, and two
write-enable lines can be interfaced directly with up to six memory devices. Up to 1 MB
of memory can be accessed directly via the Dynamic C development software, and up to
16 MB can be interfaced with additional software development. A built-in slave port
allows the Rabbit 4000 to be used as master or slave in multi-processor systems, permit-
ting separate tasks to be assigned to dedicated processors. An 8-line data port and five
control signals simplify the exchange of data between devices. A remote cold boot enables
startup and programming via a serial port or the slave port.
The Rabbit 4000 features five 8-bit parallel ports, yielding a total of 40 digital I/O. Six
CMOS-compatible serial ports are available. All six are configurable as asynchronous
(including output pulses in IrDA format), while four are configurable as clocked serial
(SPI) and two are configurable as SDLC/HDLC. The various internal peripherals share the
parallel port’s I/O pins.
The Rabbit 4000 also offers many specialized peripherals. Two input-capture channels
each have a 16-bit counter, clocked by the output of an internal timer, that can be used to
capture and measure pulses. These measurements can be extended to a variety of functions
such as measuring pulse widths or for baud-rate autodetection. Two quadrature decoder
channels each have two inputs, as well as an 8 or 10-bit up/down counter. Each quadrature
decoder channel provides a direct interface to optical encoder units. Four independent pulse-
width modulator (PWM) outputs, each based on a 1024-pulse frame, are driven by the out-
put of a programmable internal timer. The PWM outputs can be filtered to create a 10-bit
D/A converter or they can be used directly to drive devices such as motors or solenoids.
Two external interrupt vectors can multiplex inputs from up to six external pins.
There are numerous timers available for use in the Rabbit 4000. Timer A consists of ten
8-bit counters, each of which has a programmed time constant. Six of them can be cas-
caded from the primary Timer A counter. Timer B contains a 10-bit counter, two match
registers, and two step registers. An interrupt can be generated or the output pin can be
updated when the counter reaches a match value, and the match value is then incremented
automatically by the step value. Timer C is a 16-bit counter that counts up to a program-
mable limit. It contains eight match registers, four to set the output of a parallel-port pin
and four to reset it. This allows for the creation of PWM signals (both synchronous and
variable-phase) and quadrature signals.