mc68331cpv20b1 Freescale Semiconductor, Inc, mc68331cpv20b1 Datasheet - Page 130

no-image

mc68331cpv20b1

Manufacturer Part Number
mc68331cpv20b1
Description
Mc68331 32 Bit Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
6
6.2.2 QSM Pin Control Registers
6-4
The QSM uses nine pins. Eight of the pins can be used for serial communication or for
parallel I/O. Clearing a bit in the port QS pin assignment register (PQSPAR) assigns
the corresponding pin to general-purpose I/O; setting a bit assigns the pin to the QSPI.
PQSPAR does not affect operation of the SCI.
The port QS data direction register (DDRQS) determines whether pins are inputs or
outputs. Clearing a bit makes the corresponding pin an input; setting a bit makes the
pin an output. DDRQS affects both QSPI function and I/O function. DDQS1 deter-
mines the direction of the TXD pin only when the SCI transmitter is disabled. When the
SCI transmitter is enabled, the TXD pin is an output. PQSPAR and DDRQS are 8-bit
registers located at the same word address. Table 6-1 is a summary of QSM pin func-
tions.
The port QS data register (PORTQS) latches I/O data. Writes to PORTQS drive pins
defined as outputs. PORTQS reads return data present on the pins when the read is
made. To avoid driving undefined data, first write PORTQS, then configure DDRQS.
1. PQS2 is a digital I/O pin unless the SPI is enabled (SPE in SPCR1 set), in which case it becomes the SPI
2. PQS7 is a digital I/O pin unless the SCI transmitter is enabled (TE in SCCR1 set), in which case it becomes
serial clock SCK.
SCI serial output TXD and DDRQS has no effect.
PCS0/SS
QSM Pin
PCS[3:1]
MISO
MOSI
SCK
TXD
RXD
2
1
Transmit
Receive
Master
Master
Master
Master
Master
Mode
Slave
Slave
Slave
Slave
Slave
Freescale Semiconductor, Inc.
For More Information On This Product,
DDRQS Bit
DDQS[4:6]
DDQS0
DDQS1
DDQS2
DDQS3
DDQS7
Table 6-1 QSM Pin Function
None
QUEUED SERIAL MODULE
Go to: www.freescale.com
State
NA
Bit
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
X
Serial Data Output from QSPI
Serial Data Output from QSPI
Assertion Causes Mode Fault
Disables Chip-Select Output
Serial Data Output from SCI
Serial Data Input to QSPI
Serial Data Input to QSPI
Clock Output from QSPI
QSPI Slave Select Input
Serial Data Input to SCI
Disables Clock Output
Disables Data Output
Disables Data Output
Disables Select Input
Disables Clock Input
Clock Input to QSPI
Disables Data Input
Disables Data Input
Chip-Select Output
Chip-Select Output
Pin Function
Inactive
Inactive
USER’S MANUAL
MC68331

Related parts for mc68331cpv20b1