Zilog Z86193 User Manual
Page 130

Z8
®
CPU
User Manual
UM001604-0108
Serial Input/Output
123
Mode Recovery, Master/Slave selection, and Compare mode.
contains the pin
configuration for the SPI feature when it is enabled. The SPI consists of four registers: SPI
Control Register (SCON), SPI Compare Register (SCOMP), SPI Receive/Buffer Register
(RxBUF), and SPI Shift Register. SCON is located in bank (C) of the Expanded Register
File at address 02.
The SPI Control Register (SCON; see
on page 124), is a read/write register
that controls Master/Slave selection, interrupts, clock source and phase selection, and
error flag. Bit 0 enables/disables the SPI with the default being SPI disabled. A 1 in this
location enables the SPI, and a 0 disables the SPI. Bits 1 and 2 of the SCON register in
Master Mode select the clock rate. You can choose whether internal clock is divide-by-2,
4, 8, or 16. In Slave Mode, Bit 1 of this register flags the user if an overrun of the RxBUF
Register has occurred. The RxCharOverrun flag is only reset by writing a 0 to this bit. In
slave mode, bit 2 of the Control Register disables the data-out I/O function. If a 1 is writ-
ten to this bit, the data-out pin is released to its original port configuration. If a 0 is written
to this bit, the SPI shifts out one bit for each bit received. Bit 3 of the SCON Register
enables the compare feature of the SPI, with the default being disabled. When the compare
feature is enabled, a comparison of the value in the SCOMP Register is made with the
value in the RxBUF Register. Bit 4 signals that a receive character is available in the
RxBUF Register.
Table 25. SPI Pin Configuration
Name
Function
Pin Location
DI
Data-In
P20
DO
Data-Out
P27
SS
Slave Select
P35
SK
SPI Clock
P34
- Z86233 Z86243 Z86733 Z86743 Z86C02 Z86C04 Z86C08 Z86C15 Z86C21 Z86C30 Z86C31 Z86C33 Z86C36 Z86C40 Z86C43 Z86C61 Z86C62 Z86C63 Z86C65 Z86C83 Z86C90 Z86C91 Z86C93 Z86C96 Z86E02 Z86E03 Z86E04 Z86E06 Z86E07 Z86E08 Z86E15 Z86E21 Z86E30 Z86E31 Z86E33 Z86E34 Z86E40 Z86E43 Z86E44 Z86E61 Z86E63 Z86E83 Z86K15 Z86L02 Z86L04 Z86L08 Z86L16 Z8E000 Z8E001 Z8PE003