9.3 Parallel Port C

Parallel Port C, shown in Table 9-6,has four inputs and four outputs. The even-numbered ports, PC0, PC2, PC4, and PC6, are outputs. The odd-numbered ports, PC1, PC3, PC5, and PC7, are inputs. When the data register is read, bits 1,3,5,7 return the value of the volt- age on the pin. Bits 0,2,4,6 return the value of the signal driving the output buffers. The signal driving the output buffers and the value of the output pin are normally the same. Either the Port C data register is driving these pins or one of the serial port transmit lines is driving the pin. The bits set in the PCFR Parallel Port C Function Register identify whether the data register or the serial port transmit lines were driving the pins.

Table 9-5. Parallel Port C Registers

Register Name

Mnemonic

I/O address

R/W

Reset

 

 

 

 

 

Port C Data Register

PCDR

0x50

R/W

x0x1x1x1

 

 

 

 

 

Port C Function Register

PCFR

0x55

W

x0x0x0x0

 

 

 

 

 

Table 9-6. Parallel Port C Register Bit Functions

 

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

 

 

 

 

 

 

 

 

 

PCDR (r)

PC7 in

Echo

PC5 in

Echo

PC3 in

Echo

PC1 in

Echo

adr = 0x050

drive

drive

drive

drive

 

 

 

 

 

 

 

 

 

 

 

 

 

PCDR (w)

x

PC6

x

PC4

x

PC2

x

PC0

adr = 0x050

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PCFR (w)

x

Drive

x

Drive

x

Drive

x

Drive

adr = 0x055

TXA

TXB

TXC

TXD

 

 

 

 

 

 

 

 

 

 

 

 

 

Parallel Port C shares its pins with serial ports A-D. The parallel port inputs can be config- ured as serial port inputs while the dedicated outputs as serial port outputs.

When serving as serial inputs, the data lines can still be read from the Parallel Port C data register. The parallel port outputs can be selected to be serial port outputs by setting the corresponding bit positions in the Port C Function register (PCFR). When a parallel port output pin is selected to be a serial port output, the value stored in the data register is ignored.

On reset the active (even-numbered) function register bits are zeroed resulting in Port C to behave as an I/O port. Bit 6 of the Port C data register is zeroed while the remaining even numbered bits are set to 1.

132

Rabbit 3000 Microprocessor

Page 141
Image 141
Jameco Electronics 2000, 3000 manual Parallel Port C Registers, Parallel Port C Register Bit Functions