mc68hc916y3 Freescale Semiconductor, Inc, mc68hc916y3 Datasheet - Page 451

no-image

mc68hc916y3

Manufacturer Part Number
mc68hc916y3
Description
Mc68hc16y3 16 Bit Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
SIZE — Transfer Data Size
SPBR[7:0] — Serial Clock Baud Rate
D.8.14 SPI Status Register
SPSR — SPI Status Register
SPIF — SPI Finished Flag
WCOL — Write Collision
MC68HC16Y3/916Y3
USER’S MANUAL
SPIF
15
0
RESET:
The SPI uses a modulus counter to derive the SCK baud rate from the MCU system
clock. Baud rate is selected by writing a value from 2 to 255 into SPBR[7:0].
The following expressions apply to SCK baud rate:
Giving SPBR[7:0] a value of zero or one disables SCK (disable state determined by
CPOL). At reset, the SCK baud rate is initialized to one-eighth of the system clock
frequency.
SPSR contains information concerning the current serial transmission. Only the SPI
can set bits in SPSR. The CPU16 reads SPSR to obtain SPI status information and
writes it to clear status flags.
Clearing WCOL is accomplished by reading the SPSR while WCOL is set and then
either reading the SPDR prior to SPIF being set, or reading or writing the SPDR after
SPIF is set.
WCOL
0 = 8-bit data transfer.
1 = 16-bit data transfer.
0 = SPI is not finished.
1 = SPI is finished.
0 = No attempt to write to the SPDR happened during the serial transfer.
1 = Write collision occurred.
14
0
13
0
0
MODF
12
0
Freescale Semiconductor, Inc.
11
0
0
For More Information On This Product,
SPBR[7:0]
10
0
0
SCK Baud Rate
Go to: www.freescale.com
9
0
0
=
------------------------------------------------------------------------- -
2 SCK Baud Rate Desired
8
0
0
or
7
0
0
=
------------------------------------ -
2 SPBR[7:0]
6
0
0
f
sys
f
sys
5
0
0
4
0
0
3
0
0
2
0
0
$YFFC3C
MOTOROLA
1
0
0
D-73
0
0
0

Related parts for mc68hc916y3