English
Language : 

CP3BT23 Datasheet, PDF (159/260 Pages) Texas Instruments – CP3BT23 Reprogrammable Connectivity Processor with Bluetooth and Dual CAN Interfaces
22.0 Microwire/SPI Interface
Microwire/Plus is a synchronous serial communications ! Programmable operation as a Master or Slave
protocol, originally implemented in National Semiconduc- ! Programmable shift-clock frequency (master only)
tor's COP8® and HPC families of microcontrollers to mini- ! Programmable 8- or 16-bit mode of operation
mize the number of connections, and therefore the cost, of ! 8- or 16-bit serial I/O data shift register
communicating with peripherals.
! Two modes of clocking data
The CP3BT23 has an enhanced Microwire/SPI interface
module (MWSPI) that can communicate with all peripherals
that conform to Microwire or Serial Peripheral Interface
! Serial clock can be low or high when idle
! 16-bit read buffer
! Busy bit, Read Buffer Full bit, and Overrun bit for polling
(SPI) specifications. This enhanced Microwire interface is
capable of operating as either a master or slave and in 8- or
16-bit mode. Figure 81 shows a typical enhanced Microwire
and as interrupt sources
! Supports multiple masters
! Maximum bit rate of 12M bits/second (master mode) 6M
interface application.
bits/second (slave mode) at 24 MHz System Clock
! Supports very low-end slaves with the Slave Ready out-
The enhanced Microwire interface module includes the fol- put
lowing features:
! Echo back enable/disable (Slave only)
GPIO
MWCS
te I/O
Lines
Master
CS
8-Bit
A/D
DO SK DI
CS
1K Bit
EEPROM
DO SK DI
CS
LCD
Display
Driver
SK DI
CS
VF
Display
Driver
SK DI
Slave
I/O
Lines
le MDIDO
MDIDO
MDODI
MDODI
MSK
MSK
DS067
oFigure 81. Microwire Interface
22.1 MICROWIRE OPERATION
22.1.1 Shifting
The Microwire interface allows several devices to be con-
s nected on one three-wire system. At any given time, one of
these devices operates as the master while all other devices
operate as slaves. The Microwire interface allows the device
to operate either as a master or slave transferring 8- or 16-
b bits of data.
The master device supplies the synchronous clock (MSK)
for the serial interface and initiates the data transfer. The
slave devices respond by sending (or receiving) the re-
O quested data. Each slave device uses the master’s clock for
The Microwire interface is a full duplex transmitter/receiver.
A 16-bit shifter, which can be split into a low and high byte,
is used for both transmitting and receiving. In 8-bit mode,
only the lower 8-bits are used to transfer data. The transmit-
ted data is shifted out through MDODI pin (master mode) or
MDIDO pin (slave mode), starting with the most significant
bit. At the same time, the received data is shifted in through
MDIDO pin (master mode) or MDODI pin (slave mode), also
starting with the most significant bit first.
The shift in and shift out are controlled by the MSK clock. In
serially shifting data out (or in), while the master shifts the each clock cycle of MSK, one bit of data is transmitted/re-
data in (or out).
ceived. The 16-bit shifter is accessible as the MWDAT reg-
The three-wire system includes: the serial data in signal
(MDIDO for master mode, MDODI for slave mode), the se-
ister. Reading the MWDAT register returns the value in the
read buffer. Writing to the MWDAT register updates the 16-
rial data out signal (MDODI for master mode, MDIDO for bit shifter.
slave mode), and the serial clock (MSK).
In slave mode, an optional fourth signal (MWCS) may be
used to enable the slave transmit. At any given time, only
one slave can respond to the master. Each slave device has
its own chip select signal (MWCS) for this purpose.
Figure 82 shows a block diagram of the enhanced Microwire
serial interface in the device.
www.national.com
158