English
Language : 

MC68HC16Z1CAG16 Datasheet, PDF (251/500 Pages) Freescale Semiconductor, Inc – M68HC16Z Series users manual
Freescale Semiconductor, Inc.
10.3.5 SPI Serial Clock Baud Rate
Baud rate is selected by writing a value from two to 255 into SPBR[7:0] in the SPCR
of the master MCU. Writing an SPBR[7:0] value into the SPCR of the slave device has
no effect. The SPI uses a modulus counter to derive SCK baud rate from the MCU sys-
tem clock.
The following expressions apply to SCK baud rate:
SCK Baud Rate = 2-----×-----S----P-f--s-B-y--s-R----[--7---:--0----]
or
SPBR[7:0] = 2-----×-----S----C----K------B----a---u--f--ds--y---sR----a---t--e-----D----e----s---i-r--e---d--
Giving SPBR[7:0] a value of zero or one disables the baud rate generator. SCK is dis-
abled and assumes its inactive state value.
SPBR[7:0] has 254 active values. Table 10-4 lists several possible baud values and
the corresponding SCK frequency based on a 16.78-MHz system clock.
System Clock
Frequency
16.78 MHz
Table 10-4 SCK Frequencies
Required Division
Ratio
4
8
16
34
168
510
Value of SPBR Actual SCK Frequency
2
4.19 MHz
4
2.10 MHz
8
1.05 MHz
17
493 kHz
84
100 kHz
255
33 kHz
10.3.6 Wired-OR Open-Drain Outputs
Typically, SPI bus outputs are not open-drain unless multiple SPI masters are in the
system. If needed, the WOMP bit in SPCR can be set to provide wired-OR, open-drain
outputs. An external pull-up resistor should be used on each output line. WOMP af-
fects all SPI pins regardless of whether they are assigned to the SPI or used as gen-
eral-purpose I/O.
10.3.7 Transfer Size and Direction
The SIZE bit in the SPCR selects a transfer size of eight (SIZE = 0) or sixteen (SIZE
= 1) bits. The LSBF bit in the SPCR determines whether serial shifting to and from the
data register begins with the LSB (LSBF = 1) or MSB (LSBF = 0).
M68HC16 Z SERIES
USER’S MANUAL
MULTICHANNEL COMMUNICATION INTERFACE
For More Information On This Product,
Go to: www.freescale.com
10-11