English
Language : 

NSAM266SA Datasheet, PDF (30/52 Pages) National Semiconductor (TI) – NSAM266SA CompactSPEECHTM Digital Speech Processor with Serial Flash Interface
2 0 Software (Continued)
The CompactSPEECH MICROWIRE interface implements
the MICROWIRE PLUS interface in slave mode with an ad-
ditional ready signal It enables a microcontroller to inter-
face efficiently with the CompactSPEECH application
The microcontroller is the protocol master and provides the
clock for the protocol The CompactSPEECH supports
clock rates of up to 400 kHz This transfer rate refers to the
bit transfer the actual throughput is slower due to byte pro-
cessing by the CompactSPEECH and the microcontroller
Communication is handled in bursts of eight bits (one byte)
In each burst the CompactSPEECH is able to receive and
transmit eight bits of data After eight bits have been trans-
ferred an internal interrupt is issued for the Compact-
SPEECH to process the byte or to prepare another byte for
sending In parallel the CompactSPEECH sets MWRDY to
1 to signal the microcontroller that it is busy with the byte
processing Another byte can be transferred only when the
MWRDY signal is cleared to 0 by the CompactSPEECH
When the CompactSPEECH transmits data it expects to
receive the value 0xAA before each transmitted byte The
CompactSPEECH reports any status change by clearing the
MWRQST signal to 0
If a parameter of a CompactSPEECH command is bigger
than one byte the microcontroller should transmit the Most
Significant Byte (MSB) first If a return value is bigger than
one byte the CompactSPEECH transmits the MSB first
2 12 SIGNAL DESCRIPTION
The following signals are used for the interface protocol
Input and output are relative to the CompactSPEECH
INPUT SIGNALS
MWDIN
MICROWIRE Data In Used for input only for transferring
data from the microcontroller to the CompactSPEECH
MWCLK
This signal serves as the synchronization clock during com-
munication One bit of data is transferred on every clock
cycle The input data is available on MWDIN and is latched
on the clock rising edge The transmitted data is output on
MWDOUT on the clock falling edge The signal should re-
main low when switching MWCS
MWCS
MICROWIRE Chip Select The MWCS signal is cleared to 0
to indicate that the CompactSPEECH is being accessed
Setting MWCS to 1 causes the CompactSPEECH to start
driving MWDOUT with bit 7 of the transmitted value Setting
the MWCS signal resets the transfer-bit counter of the pro-
tocol so the signal can be used to synchronize between the
CompactSPEECH and the microcontroller
To prevent false detection of access to the Compact-
SPEECH due to spikes on the MWCLK signal use this chip
select signal and toggle the MWCLK input signal only when
the CompactSPEECH is accessed
OUTPUT SIGNALS
MWDOUT
MICROWIRE Data Out Used for output only for transferring
data from the CompactSPEECH to the microcontroller
When the CompactSPEECH receives data it is echoed back
to the microcontroller on this signal unless the received
data is 0xAA In this case the CompactSPEECH echoes a
command’s return value
MWRDY
MICROWIRE Ready When active (0) this signal indicates
that the CompactSPEECH is ready to transfer (receive or
transmit) another byte of data
This signal is set to 1 by the CompactSPEECH after each
byte transfer has been completed It remains 1 while the
CompactSPEECH is busy reading the byte writing the next
byte or executing the received command (after the last pa-
rameter has been received) MWRDY is cleared to 0 after
reset
For proper operation after a hardware reset this signal
should be pulled up
MWRQST
MICROWIRE Request When active (0) this signal indicates
that new status information is available MWRQST is deacti-
vated (set to 1) after the CompactSPEECH receives a GSW
(Get Status Word) command from the microcontroller After
reset this signal is active (0) to indicate that a reset oc-
curred MWRQST unlike all the signals of the communica-
tion protocol is an asynchronous line that is controlled by
the CompactSPEECH firmware
2 12 1 Signal Use in the Interface Protocol
After reset both MWRQST and MWRDY are cleared to 0
The MWRQST signal is activated to indicate that a reset
occurred The EV RESET bit in the status register is used
to indicate a reset condition
The GSW command should be issued after reset to verify
that the EV RESET event occurred and to deactivate the
MWRQST signal
While the MWCS signal is active (0) the CompactSPEECH
reads data from MWDIN on every rising edge of MWCLK
CompactSPEECH also writes every bit back to MWDOUT
This bit is either the same bit which was read from MWDIN
(in this case it is written back as a synchronization echo
after some propagation delay) or it is a bit of a value the
CompactSPEECH transmits to the microcontroller (in this
case it is written on every falling edge of the clock)
When a command has more than one parameter return-val-
ue the parameters return-values are transmitted in the or-
der of appearance If a parameter return-value is more than
one byte long the bytes are transmitted from the most sig-
nificant to the least significant
The MWRDY signal is used as follows
1 Active (0) MWRDY signals the microcontroller that the
last eight bits of data transferred to from the voice mod-
ule were accepted and processed (see below)
2 The MWRDY signal is deactivated (set to 1 by the
CompactSPEECH) after 8-bits of data were transferred
to from the CompactSPEECH The bit is set following the
falling edge of the eighth MWCLK clock-cycle
3 The MWRDY signal is activated (cleared to 0) by the
CompactSPEECH when it is ready to receive the first pa-
rameter byte (if there are any parameters) and so on till
the last byte of parameters is transferred An active
MWRDY signal after the last byte of parameters indicates
that the command was parsed and (if possible) executed
If that command has a return value the microcontroller
must read the value before issuing a new command
http www national com
30