mc68hc916y3 Freescale Semiconductor, Inc, mc68hc916y3 Datasheet - Page 271

no-image

mc68hc916y3

Manufacturer Part Number
mc68hc916y3
Description
Mc68hc16y3 16 Bit Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
12.3.2 SPI Pins
12.3.3 SPI Operating Modes
12.3.3.1 Master Mode
MC68HC16Y3/916Y3
USER’S MANUAL
Four bi-directional pins are associated with the SPI. The MPAR configures each pin
for either SPI function or general-purpose I/O. The MDDR assigns each pin as either
input or output. The WOMP bit in the SPI control register (SPCR) determines whether
each SPI pin that is configured for output functions as an open-drain output or a normal
CMOS output. The MDDR and WOMP assignments are valid regardless of whether
the pins are configured for SPI use or general-purpose I/O.
The operation of pins configured for SCI use depends on whether the SCI is operating
as a master or a slave, determined by the MSTR bit in the SPCR.
Table 12-3 shows SPI pins and their functions.
The SPI operates in either master or slave mode. Master mode is used when the MCU
originates data transfers. Slave mode is used when an external device initiates serial
transfers to the MCU. The MSTR bit in SPCR selects master or slave operation.
Setting the MSTR bit in SPCR selects master mode operation. In master mode, the
SPI can initiate serial transfers but cannot respond to externally initiated transfers.
When the slave-select input of a device configured for master mode is asserted, a
mode fault occurs.
When using the SPI in master mode, include the following steps:
Master in, slave out (MISO)
Master out, slave in (MOSI)
1. Write to the MMCR, MIVR, and ILSPI. Refer to 12.5 MCCI Initialization for more
2. Write to the MPAR to assign the following pins to the SPI: MISO, MOSI, and
Serial clock (SCK)
Slave select (SS)
information.
(optionally) SS . MISO is used for serial data input in master mode, and MOSI
is used for serial data output. Either or both may be necessary, depending on
the particular application. SS is used to generate a mode fault in master mode.
If this SPI is the only possible master in the system, the SS pin may be used for
general-purpose I/O.
Pin Name
MULTICHANNEL COMMUNICATION INTERFACE
Freescale Semiconductor, Inc.
For More Information On This Product,
Table 12-3 SPI Pin Functions
Master
Master
Master
Master
Mode
Slave
Slave
Slave
Slave
Go to: www.freescale.com
Provides serial data input to the SPI
Provides serial data output from the SPI
Provides serial output from the SPI
Provides serial input to the SPI
Provides clock output from the SPI
Provides clock input to the SPI
Detects bus-master mode fault
Selects the SPI for an externally-initiated serial transfer
Function
MOTOROLA
12-7

Related parts for mc68hc916y3