EM6603
11.1 SWB Automatic send mode
Automatic mode enables a buffer on a predefined length to be sent at high transmission speeds ( up to 16khz).
In this mode user prepares all the data to be sent (minimum 8 bits, maximum 256 bits) in RAM. The user then
selects the clock speed, sets the number of data nibbles to be sent, selects automatic transmission mode
(AutoSWB bit set to 1) and enters STANDBY mode by executing a HALT instruction. Once the HALT
instruction is activated the SWB peripheral module sends the data in register
SWBuff
followed by the data in
the RAM starting at address 00 up to the address specified by the bits
size[5:0]
located in the
LowSWB,
HighSWB
registers.
During automatic transmission the general
INTEN
bit is disabled automatically to prevent other Interrupts to
reset the standby mode. At the end of automatic transmission EM6603 leaves standby mode and sets
TestVar[3] high. TestVar[3] = 1 is signaling SWB transmission is terminated. Once the transmission is finished,
do not forget to enable the general
INTEN
bit if necessary.
The data to be sent must be prepared in the following order:
First nibble to be sent must be written in the
SWBuff
register . The other nibbles must be loaded in the RAM
from address 0 (second nibble at adr.0, third at adr.1,...) up to the address with last nibble of data to be send =
"size" address. Max. address space for SWB is 3E ("size" 3E hex) what gives with
SWBuff
up to 64 nibbles
(256 bits) of possible data to be sent. The minimum possible data length we can send in Automatic SWB mode
is 8 bits when the last RAM address to be sent is 00 ("size" = 00)
Once data are ready in the RAM and in the
SWBuff,
user has to load the "size" (adr. of the last nibble to be
send - bits
size[5:0])
into the
LowSWB
and
HighSWB
register together with
AutoSWB
bit = 1.
Now everything is ready for serial transmission. To start the transmission one has to put the EM6603 in standby
mode with the HALT instruction. With this serial transmission starts. When transmission is finished the
TESTvar[3] (can be used for conditional jumps) becomes active High, the
AutoSWB
bit is cleared, the
processor is leaving the Standby mode and
INTEN
is switched on.
Figure 13.Automatic Serial Write Buffer transmission
03/02 REV. G/439
Copyright
2002, EM Microelectronic-Marin SA
23
www.emmicroelectronic.com