![](http://datasheet.mmic.net.cn/Rabbit-Semiconductor/668-0011_datasheet_95668/668-0011_107.png)
97
13.2 Dependencies
13.2.1 I/O Pins
Parallel Port F uses the pins PF0 through PF7. These pins can be used individually as data
inputs or outputs, or as clocks for Serial Ports C and D; four of the Parallel Port F lines can
be used for input capture or as Quadrature Decoder inputs.
All pins are set as inputs on startup, and the alternate pin functions are disabled.
13.2.2 Clocks
All outputs on Parallel Port F are clocked by the peripheral clock divided by two unless
changed in PFCR, where the option of updating the Parallel Port F pins can be synchro-
nized to the output of Timer A1, Timer B1, or Timer B2.
13.2.3 Other Registers
13.2.4 Interrupts
There are no interrupts associated with Parallel Port F.
13.3 Operation
The following steps must be taken before using Parallel Port F.
1. Select the desired input/output direction for each pin via PFDDR.
2. Use PFCR to select the clock.
3. If an alternative function is desired for a pin, select it via PFFR, PFDCR, SCCR,
SDCR, or QDCR.
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.
On reset, PFDDR is zeroed, making all the pins inputs. In addition, bits 0, 1, 4, and 5 in
PFCR are zeroed to ensure that data are clocked into the output registers when loaded. All
other registers associated with Parallel Port F are not initialized on reset.
NOTE: There may be a conflict in using Parallel Port A and Parallel Port F on the original
Rabbit 3000 chip. Either Parallel Port A can be used as inputs, in which case Parallel
Port F has full function, or if Parallel Port A cannot be used as inputs, use any pins on
Parallel Port F not used for PWM or serial clock outputs as inputs and take the precau-
tion of setting up Parallel Port F before the conflicting functionality of Parallel Port A is
enabled. Refer to Rabbit’s Technical Note TN228, Rabbit 3000 Parallel Port F Bug,
for more information.
Register
Function
SCCR, SDCR
Configure a Parallel Port F pin as a clocked serial pin.
QDCR
Enable Quadrature Decoder inputs on Parallel Port F pins.