Rabbit 4000 Microprocessor User's Manual |
12. Parallel Port E
12.1 Overview
Parallel Port E is a byte-wide port with each bit programmable for data direction and drive level. These are simple inputs and outputs controlled and reported in the Port E Data Register (PEDR).
All of the Parallel Port E pins have alternate output functions, and all of them can be used as inputs to various on-chip peripherals.
When used as outputs, the Parallel Port E bits are buffered, with the data written to PEDR transferred to the output pins on a selected timing edge. Either the peripheral clock or the outputs of Timer A1, Timer B1, or Timer B2 can be used for this function, with each nibble of the port having a separate select field to control this timing. Each bit can either be programmed as open-drain or driven high and low.
Because of the buffered nature of Parallel Port E, using a read-modify-write type of operation can lead to old data being written to PEDR. To alleviate this potential problem, each bit of the port can be written individually using a separate address for each bit.
Bit 7 of Parallel Port E is used as the default chip select input for the slave port when the slave port is enabled, either for parallel bootstrap or under program control.
Table 12-1. Parallel Port E Pin Alternate Output Functions
Table 12-2. Parallel Port E Pin Alternate Input Functions 12.1.1 Block Diagram
12.1.2 Registers
12.2 Dependencies
12.2.1 I/O Pins
Parallel Port E uses the pins PE0 through PE7. These pins can be used individually as data inputs or outputs; as serial port transmit and receive for Serial Ports E and F; as clocks for Serial Ports CF; as external I/O strobes; as outputs for the PWM and Timer C peripherals; as the upper address bits A[23:20]; or as the Ethernet clock and status LEDs for the on-chip network peripheral. The input capture peripheral can also watch pins PE7, PE5, PE3, and PE1. There is also an option to provide the slave port chip select on PE7.
All pins are set as inputs on startup.
The individual bits can be set to be open-drain via PEDCR.
See the associated peripheral chapters for details on how they use Parallel Port E.
12.2.2 Clocks
All outputs on Parallel Port E are clocked by the peripheral clock unless changed in PECR, where the option of updating the Parallel Port E pins can be synchronized to the output of Timer A1, Timer B1, or Timer B2.
12.2.3 Other Registers
12.2.4 Interrupts
External interrupts can be accepted from pins PE5, PE4, PE1 or PE0; see Chapter 7 for more details.
12.3 Operation
The following steps must be taken before using Parallel Port E.
- Select the desired input/output direction for each pin via PEDDR.
- Select high/low or open-drain functionality for outputs via PEDCR.
- If an alternative peripheral output function is desired for a pin, select it by via PEALR or PEAHR and then enable it via PEFR. Refer to the appropriate peripheral chapter for further use of that pin.
Once the port is set up, data can be read or written by accessing PEDR. The value of an output pin read in from PEDR will reflect its current output value, but any value written to an input pin will not appear until that pin becomes an output.
12.4 Register Descriptions
The corresponding port bit functions normally.
The corresponding port bit carries its alternate signal as an output. See Table 12-1.
The corresponding port bit, as an output, is driven high and low.
The corresponding port bit, as an output, is open-drain.
The corresponding port bit is input.
The corresponding port bit is an output.
These bits are ignored.
The port buffer (bit 0) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
These bits are ignored.
The port buffer (bit 1) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
These bits are ignored.
The port buffer (bit 2) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
These bits are ignored.
The port buffer (bit 3) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
These bits are ignored.
The port buffer (bit 4) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
These bits are ignored.
The port buffer (bit 5) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
These bits are ignored.
The port buffer (bit 6) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
These bits are ignored.
The port buffer (bit 7) is written with the value of this bit. The port buffer will be transferred to the port output register on the next rising edge of the peripheral clock
Rabbit Semiconductor www.rabbit.com |