Rabbit 4000 Microprocessor
User's Manual
PREV INDEX NEXT


10. Parallel Port C

10.1 Overview

Parallel Port C 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 C Data Register (PCDR).

All the Parallel Port C pins have alternate output functions, and most of them can be used as inputs to various on-chip peripherals.

Table 10-1. Parallel Port C Pin Alternate Output Functions

Pin Name

Alt Out 0

Alt Out 1

Alt Out 2

Alt Out 3

PC7
TXA
I7
PWM3
SCLKC
PC6
TXA
I6
PWM2
TXE
PC5
TXB
I5
PWM1
RCLKE
PC4
TXB
I4
PWM0
TCLKE
PC3
TXC
I3
TIMER C3
SCLKD
PC2
TXC
I2
TIMER C2
TXF
PC1
TXD
I1
TIMER C1
RCLKF
PC0
TXD
I0
TIMER C0
TCLKF


Table 10-2. Parallel Port C Pin Alternate Input Functions

Pin Name

Input Capture

Serial Ports A–D

Serial Ports E–F

PC7
×
RXA
RXE
PC6



PC5
×
RXB
RCLKE
PC4


TCLKE
PC3
×
RXC
RXF
PC2



PC1
×
RXD
RCLKF
PC0


TCLKF


After reset, the default condition for Parallel Port C is four outputs (the even-numbered bits) and four inputs (the odd-numbered bits). For compatibility with the Rabbit 2000 and the Rabbit 3000 microprocessors, these outputs are driven with a logic zero (low) on PC6 and a logic one (high) on PC4, PC2, and PC0. When PCDR is read, the value of the voltage on the pin is returned. If the pin is an output, the value it is set to is returned.

10.1.1 Block Diagram


10.1.2 Registers

Register Name

Mnemonic

I/O Address

R/W

Reset

Port C Data Register
PCDR
0x0050
R/W
00010101
Port C Data Direction Register
PCDDR
0x0051
R/W
01010101
Port C Alternate Low Register
PCALR
0x0052
R/W
00000000
Port C Alternate High Register
PCAHR
0x0053
R/W
00000000
Port C Drive Control Register
PCDCR
0x0054
R/W
00000000
Port C Function Register
PCFR
0x0055
R/W
00000000


10.2 Dependencies

10.2.1 I/O Pins

Parallel Port C uses pins PC0 through PC7. These pins can be used individually as data inputs or outputs; as serial port transmit and receive for Serial ports A–F; as clocks for Serial Ports C–F; as external I/O strobes; or as outputs for the PWM and Timer C peripherals. The input capture peripheral can also watch pins PC7, PC5, PC3, and PC1.

On startup, PC4, PC2, and PC0 are outputs set high, PC6 is set low, and the other pins are inputs for compatibility with the Rabbit 3000.

The individual pins can be set to be open-drain via PCDCR.

See the associated peripheral chapters for details on how they use Parallel Port C.

10.2.2 Clocks

All outputs on Parallel Port C are clocked by the peripheral clock.

10.2.3 Other Registers

Register

Function

SACR, SBCR, SCCR, SDCR, SECR, SFCR
Select a Parallel Port C pin as serial data (and optional clock) input.
ICS1R, ICS2R
Select a Parallel Port C pin as a start/stop condition input.


10.2.4 Interrupts

There are no interrupts associated with Parallel Port C.

10.3 Operation

The following steps must be taken before using Parallel Port C.

  1. Select the desired input/output direction for each pin via PCDDR.

  2. Select driven or open-drain functionality for outputs via PCDCR.

  3. If an alternate peripheral output function is desired for a pin, select it via PCALR or PCAHR and then enable it via PCFR. 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 PCDR. The value in PCDR of an output pin will reflect its current output value, but any value written to an input pin will not appear until that pin becomes an output.

10.4 Register Descriptions

Parallel Port C Data Register (PCDR) (Address = 0x0050)

Bit(s)

Value

Description

7:0
Read
The current state of Parallel Port C pins PC7–PC0 is reported.
Write
The Parallel Port C buffer is written with this value for transfer to the Parallel Port C output register on the next rising edge of the peripheral clock.


Parallel Port C Data Direction Register (PCDDR) (Address = 0x0051)

Bit(s)

Value

Description

7:0
0
The corresponding port bit is an input.
1
The corresponding port bit is an output.


Parallel Port C Alternate Low Register (PCALR) (Address = 0x0052)

Bit(s)

Value

Description

7:6
00
Parallel Port C bit 3 alternate output 0 (TXC).
01
Parallel Port C bit 3 alternate output 1 (I3).
10
Parallel Port C bit 3 alternate output 2 (TIMER C3).
11
Parallel Port C bit 3 alternate output 3 (SCLKD).
5:4
00
Parallel Port C bit 2 alternate output 0 (TXC).
01
Parallel Port C bit 2 alternate output 1 (I2).
10
Parallel Port C bit 2 alternate output 2 (TIMER C2).
11
Parallel Port C bit 2 alternate output 3 (TXF).
3:2
00
Parallel Port C bit 1 alternate output 0 (TXD).
01
Parallel Port C bit 1 alternate output 1 (I1).
10
Parallel Port C bit 1 alternate output 2 (TIMER C1).
11
Parallel Port C bit 1 alternate output 3 (RCLKF).
1:0
00
Parallel Port C bit 0 alternate output 0 (TXD).
01
Parallel Port C bit 0 alternate output 1 (I0).
10
Parallel Port C bit 0 alternate output 2 (TIMER C0).
11
Parallel Port C bit 0 alternate output 3 (TCLKF).


Parallel Port C Alternate High Register (PCAHR) (Address = 0x0053)

Bit(s)

Value

Description

7:6
00
Parallel Port C bit 7 alternate output 0 (TXA).
01
Parallel Port C bit 7 alternate output 1 (I7).
10
Parallel Port C bit 7 alternate output 2 (PWM3).
11
Parallel Port C bit 7 alternate output 3 (SCLKC).
5:4
00
Parallel Port C bit 6 alternate output 0 (TXA).
01
Parallel Port C bit 6 alternate output 1 (I6).
10
Parallel Port C bit 6 alternate output 2 (PWM2).
11
Parallel Port C bit 6 alternate output 3 (TXE).
3:2
00
Parallel Port C bit 5 alternate output 0 (TXB).
01
Parallel Port C bit 5 alternate output 1 (I5).
10
Parallel Port C bit 5 alternate output 2 (PWM1).
11
Parallel Port C bit 5 alternate output 3 (RCLKE).
1:0
00
Parallel Port C bit 4 alternate output 0 (TXB).
01
Parallel Port C bit 4 alternate output 1 (I4).
10
Parallel Port C bit 4 alternate output 2 (PWM0).
11
Parallel Port C bit 4 alternate output 3 (TCLKE).


Parallel Port C Drive Control Register (PCDCR) (Address = 0x0054)

Bit(s)

Value

Description

7:0
0
The corresponding port bit, as an output, is driven high and low.
1
The corresponding port bit, as an output, is open-drain.


Parallel Port C Function Register (PCFR) (Address = 0x0055)

Bit(s)

Value

Description

7:0
0
The corresponding port bit functions normally.
1
The corresponding port bit carries its alternate signal as an output. See Table 10-1.



Rabbit Semiconductor
www.rabbit.com
PREV INDEX NEXT