mc68hc916y3 Freescale Semiconductor, Inc, mc68hc916y3 Datasheet - Page 273

no-image

mc68hc916y3

Manufacturer Part Number
mc68hc916y3
Description
Mc68hc16y3 16 Bit Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
12.3.4 SPI Clock Phase and Polarity Controls
12.3.4.1 CPHA = 0 Transfer Format
MC68HC16Y3/916Y3
USER’S MANUAL
SCK (CPOL = 0)
SCK (CPOL = 1)
(FROM MASTER)
(FROM SLAVE)
SS (TO SLAVE)
MISO
Two bits in the SPCR determine SCK phase and polarity. The clock polarity (CPOL)
bit selects clock polarity (high true or low true clock). The clock phase control bit
(CPHA) selects one of two transfer formats and affects the timing of the transfer. The
clock phase and polarity should be the same for the master and slave devices. In some
cases, the phase and polarity may be changed between transfers to allow a master
device to communicate with slave devices with different requirements. The flexibility
of the SPI system allows it to be directly interfaced to almost any existing synchronous
serial peripheral.
Figure 12-3 is a timing diagram of an eight-bit, MSB-first SPI transfer in which CPHA
equals zero. Two waveforms are shown for SCK: one for CPOL equal to zero and an-
other for CPOL equal to one. The diagram may be interpreted as a master or slave
timing diagram since the SCK, MISO and MOSI pins are directly connected between
the master and the slave. The MISO signal shown is the output from the slave and the
MOSI signal shown is the output from the master. The SS line is the chip-select input
to the slave.
For a master, writing to the SPDR initiates the transfer. For a slave, the falling edge of
SS indicates the start of a transfer. The SCK signal remains inactive for the first half
of the first SCK cycle. Data is latched on the first and each succeeding odd clock edge,
and the SPI shift register is left-shifted on the second and succeeding even clock edg-
es. SPIF is set at the end of the eighth SCK cycle.
MOSI
(FOR REFERENCE)
SCK CYCLE #
Figure 12-3 CPHA = 0 SPI Transfer Format
MSB
MULTICHANNEL COMMUNICATION INTERFACE
Freescale Semiconductor, Inc.
MSB
1
For More Information On This Product,
2
6
6
Go to: www.freescale.com
3
5
5
4
4
4
5
3
3
6
2
2
7
1
1
LSB
LSB
8
MOTOROLA
CPHA = 0 SPI TRANSF
12-9

Related parts for mc68hc916y3