• Excellent sound quality by adopting 4.8Kbps CELP and
13Kbps speech compression alogorithm.
• Silent Compression algorithm to further compress si
lence between speech.
• Flash Memory Management alogorithm to manage
down-graded Flash Memory to store compressed
speech data. With silent compression, one 4Mbit flash
memory could store up to 18 minutes speech.
• Support 4/16/32/64M bit Samsung flash memory or
its compatible parts.
• Support both parallel and serial microprocessor interface.
• Codec Interface circuit (support both TP3054, MX93000
and MX93000C).
• Host controllable LCD Module Interface.
• Host writable message header (4 bytes) for identification or index purpose.
• Powerful Editing Function.
• Varieties of operating function including Rewind, Fast
Forward, Repeat and message editing etc.
• Voice activated recording.
• Use Flash memory to store user data (data bank)
• Upload/Download speech message data from/to
HOST.
• VOCODER mode (VOice COmpressor/
DEcompressoR).
• Direct CODEC Play Mode (Play PCM/u-Law data re
ceived from HOST).
• Play Voice Prompt from ROM/FLASH memory
• DTMF tone genarator.
2.GENERAL DESCRIPTION
This document describes how to implement an all-digital voice recorder using the MX93521 chip. The MX93521 is a
Digital Recorder Data Pump which is controlled by an external microprocessor to perform various recorder function.
The MX93521 is fully controlled by a HOST controller through a simple HOST interface protocol. The HOST could
initiate many digital recording functions such as record, play, repeat, search, skip, insertion, message managing and
self-diagnosis. Also, HOST could set MX93521 in VOCODER mode and use MX93521 as a speech compression/
decompression data pump. The functions supported by MX93521 are listed as followed.
MODEFUNCTION P A TH
RECORDCODEC-->(COMPRESS)-->FLASH
PLAYCODEC-->(DECOMPRESS)<--FLASH
RECORD (VOCODER)CODEC-->(COMPRESS)-->HOST
PLA Y (VOCODER)CODEC-->(DECOMPRESS)<--HOST
DIRECT CODEC PLA Y MODECODEC-->(PCM/u-Law)<--HOST
DOWNLOAD MESSAGEFLASH(MSG)-->HOST
UPLOAD MESSAGEFLASH(MSG)<--HOST
DAT ABANK ACCESSFLASH(DAT A)<-- -->HOST
P/N:PM0688REV. 3.3, APR 07, 2000
1
Page 2
3.PIN CONFIGURATIONS
3.1 Pinout Assignments for MX93521 100-Pin LQFP (Parallel Mode)
VDSP20,40,66,81,38,365V power source
GN D21,41,67,82Ground
FLL\I51FLL\ low to set MX93521 running from single
low crystal
XTLI8 532.256Mhz Crystal input
XTLO8632.256Mhz Crystal output
RST\I9 3Power on Reset, Schmite triggered
PACKB\OA1 1In serial mode, PACKB\ is N.C.
In parallel mode, PACKB\ becomes low when
MX93521 write data to BIO and high when
HOST read from BIO.
HOLD\I64Hold DSP clock down and release bus
HOLDA\OA63Ack to HOLD\ signal
EROMI94Disable internal ROM, use external ROM only
SCLKI37T ransmit/receive data clock
X32OOA1032.768Khz Crystal output
X32I932.768Khz Crystal input
EAD0-EAD15OB58~52,50,48~42,39Address Bus
ED0~ED15I/OB65,68~80,83~84Data Bus
EDCE\OB6 2External data chip enable
EPCE\OB6 1Resered for future use
ERD\OB60Flash external read
EWR\OB59Flash external write
N C87~90No connection
4.3 uP INTERF ACE(10 pins)
4.3.1 Serial Interface:(UPMODX=1)
SYMBOLTYPEPIN # (LQFP)DESCRIPTION
DA \O C34Data Availab le (Output port OPT17)
SOUTO C30Serial Data Out (Output port OPT16)
BIO(7..0)OB22~29Drive LCD Display
WP\OC9 7Flash memory write protection
SD AT AO C96Serial data transfer (for MX93000, MX93000C)
SDEN\OC95Serial data enable (for MX93000, MX93000C)
SPK-EOC92Speaker enable,Hi-active
MIC-E\O C9 1Microphone enable
USO3OC99User output port
USO2OC100User output port
USO1OC3User output port
USO0OC6User output port
NCI19
NCI18
SHOLD\I17Power down detect
NCI16
R/BI1 5Flash memory Ready/Busy
CODECTYPEI1 4Codec select (TP3054B or MX93000, MX93000C)
SINI1 3Serial data input
S/P\I12Serial/paralled interface
NOTE:O A:2mA,OB:4mA,OC:16mA output current
P/N:PM0688
REV. 3.3, APR 07, 2000
6
Page 7
5. HOST CONTROLLER INTERFACE
5.1 HOST CONTROLLER INTERF ACE
5.1.1 Configuration
MX93521
HOST
HOST
OUT1
OUT2
IN1
IN2
OUT3
IN3
OUT1
OUT2
IN1
OUT3
D0-7
IN2
40
16
37
33
96
1
SERIAL MODE
40
33
37
14
16
96
32-25
1
SCLK
SIN
DA\
SOUT
RST\
RxCmd
SCLK
PHWRB\
PHRDB\
PACKB\
SIN
RST\
PHDB0-7
RxCmd
MX93521
PHILO\
MX93521
S/P\
S/P\
15
VCC
39
VCC
15
Gnd
P/N:PM0688
PARALLEL MODE
REV. 3.3, APR 07, 2000
7
Page 8
MX93521
5.1.2 Timing Diagrams
HOST Write Timing (Parallel Mode)
PHDB0-7
ts
PHWRB\
SCLK
(INT1\)
RxCmd
HOST Write Timing (Parallel Mode)
tp
HOST should cycle PHWRB\ after writing data to PHDB0-7.
MX93521 will read data from PHDB0-7 on the falling edge of SCLK (rising edge of PHWRB\).
Rxcmd will be toggled if command byte has been processed by MX93521
th
tp
The PHWRB\ signal will cause MX93521 to latch data from bus PHDB0-7 to MX93521 internal register. The invertted
signal of PHWRB\ will trigger MX93521 INT1\ to read and process the received data byte from internal register. Due
to the interrupt contention, there might be an up to 50 us delay between the rising edge of PHWRB\ and INT1\ actually
being served. To keep from command overrun, HOST should check if RxCmd toggled or w ait 50 usec before sending
next command byte to MX93521.
HOST Read Timing (P arallel Mode)
PHDB0-7
ts
PACKB\
ta
PHRDB\
HOST Read Timing (Parallel Mode)
When MX93521 write data to PHDB0-7, P ACKB\ will become lo w. HOST needs to poll the status of PACKB\ continuously . When HOST detect low state on PACKB\, HOST should read out data from PHDB0-7. After HOST read the data
from PHDB0-7, PACKB\ will be reset to high.
The maxima delay between MX93521 write data to PHDB0-7 and PACKB\ become low is 10 ns.
The maxima delay between rising edge of PHRDB\ and PACKB\ become high is also 10 ns.
P/N:PM0688
REV. 3.3, APR 07, 2000
8
Page 9
HOST Write Timing (Serial Mode)
HOST output data SIN
HOST output clock SCLK
MX93521
ts
tp
tp
tp
RxCmd
DSP Sampling from SIN
HOST send data 61H tp DSP
startd01d10d20d30d4
0
61H
d5
d61d70stop
1
HOST Write Timing (Serial Mode)
RxCmd become low when start bit is received from HOST and toggle state when MX93521 received each follo wing
data bit or stop bit from HOST . Thus, instead of waiting f or a fixed period of time (50us) to send a command bit, HOST
could send the following command bit as soon as RxCmd toggled from pre vious state. The dela y between the falling
edge of SCLK and the RxCmd togglling time is range from 1 us to 50 us
P/N:PM0688
REV. 3.3, APR 07, 2000
9
Page 10
HOST Read Timing (Serial Mode)
DSP inform HOST
Data Available
DA\
>50us, clock rate
HOST output clock
SCLK
5-40us, SOUT response time
DSP output data
SOUT
HOST Sampling from
SOUT
DSP send data 49H
startx
to HOST
d0
d1
d2
1
0
d3
0
1
49H
HOST Read Timing (Serial Mode)
d4
MX93521
d5
0
0
d61d70stop
SOUT response time is 5-40us from the falling edge of SCLK
It is recommended that HOST sample SOUT right before the falling edge of SCLK
uP Interface Timing:
MinMax
Data setup time (ts)10ns
Data hold time (th)2ns
Data process time (tp)1us50us
P A CKB\ acknowledge time (ta)5ns
P/N:PM0688
REV. 3.3, APR 07, 2000
10
Page 11
MX93521
5.2 MX93521 IO INTERF AC E
5.2.1 Output Port
PIN (PQFP)PIN (LQFP)P ower down state
CODECTYPEI17(1: MX93000,MX93000C 0:TP3054)
DSPDRO38
DSPDXO34
CFSO35
CMCLKO36
SDA T AO99High
SDEN\O9 8High
SPK_EO95Lo w
MIC_E\O94High
P/N:PM0688
11
REV. 3.3, APR 07, 2000
Page 12
MX93521
5.2.4 uP Serial Mode Interface
MX93521uPLC D
RxCmdOIN3(optional) MX93521 Rxd Command Indicator
S/P\IVccHigh, Serial Mode, Low=P arallel Mode
SCLKIOUT1Serial Clock
DA \OIN1Data Available
SOUTOIN2Serial Data Output
SHOLD\IOUT3DSP HOLD
SINIOUT2Serial Data Input
RST\IOUT4DSP RESET
BIO2OE
BIO3ORS
BIO4OD4
BIO5OD5
BIO6OD6
BIO7OD7
5.2.5 uP Parallel Mode Interface
MX93521uPLCD
S/P\IGN DLo w , P ar allel Mode, High=Serial Mode
SCLKIOUT1\
PHRDB\IOUT2Read
PHWRB\IOUT1Write
SHOLD\IOUT3DSP HOLD
RST\IOUT4DSP RESET
PHILO\IVccHigh, Byte Mode
SINIIN 1SIN should be connected to PACKB\ externally
PACKB\OIN 1Acknowledge
RxCmdOIN2(optional) MX93521 Rxd Command Indicator
PHDB0I/OD0
PHDB1I/OD1
PHDB2I/OD2
PHDB3I/OD3
PHDB4I/OD4
PHDB5I/OD5
PHDB6I/OD6
PHDB7I/OD7
When SHOLD\ is low , MX93521 will go to power down mode .
When SHOLD\ change from low to high, DSP will power up and send ACK0 to HOST
P/N:PM0688
12
REV. 3.3, APR 07, 2000
Page 13
MX93521
6. HOST INTERFACE SOFTWARE COMMAND SET SUMMARY
6.1 HOST TO MX93521 COMMANDS
When MX9521 received a command from HOST, it will always respond the command with a ackno wledge. The
valid commands and corresponded ackno wledge are described as below .
D7D6D5D4D3D2D1D0
00001BBB008HPOINT TO SPECIFIC MESSAGE
00010BBB010HGET CURRENT MESSAGE INFOMATION
00011BBB018HDELETE MESSAGE(S)
00100BBB020HREC/PLA Y MISC . FUNCTION
00101BBB028HRECORD MESSAGE
00110BBB030HPLAY MESSAGE
00111BBB038HSKIP FORW ARD/BACKW ARD PLA Y
01000BBB040HMISC. FUNCTION
01001BBB048HTONE GENERA T OR
01011BBB058HMX93000 CODEC MISC. FUNCTION
01100BBB060HLED DISPLAY
01101BBB068HWRITE COMPRESSED V OICE D A TA T O MX93521
01110BBB070HLCD COMMAND
01111BBB078HLCD DAT A
10000BBB080HOUTPUT COUNTER
10001BBB088HDownload/Upload Message
10010BBB090HSet Silence level
DR-V4
10011BBB098HSet ROM/RAM wait state
10100BBB0A0HRead/Write RAM
10101BBB0A8HRead ROM
DR-V4
DR-V5
1011xBBB0BxHData Bank Functions
1100xBBB0CxHData Bank Functions
11010BBB0D0HData Bank Functions
11111BBB0F8HPlay Voice Prompt
DR-V4
BBB:BYTES SEND FOLLOWING THIS COMMAND
DR-V5
DR-V5
DR-V4
DR-V4
DR-V4
MX93521 T O HOST ACKNO WLEDGES (OK Messages)
ACK0: 0A0H, NO D A TA ACCOMPNIED THIS ACKNO WLEDGE
ACK1: 0A1H, 1 DAT A A CCOMPNIED THIS A CKNOWLEDGE
ACK2: 0A2H, 2 DAT A A CCOMPNIED THIS A CKNOWLEDGE
ACK6: 0A6H, 6 DAT A A CCOMPNIED THIS A CKNOWLEDGE
MX93521 TO HOST A CKNOWLEDGES (ERROR Messgaes)
ERR0(0E0H):Command ERROR
ERR1(0E1H):Out of memory , MX93521 cannot perform RECORD function
ERR2(0E2H):No message found, MX93521 cannot perf orm PLA Y function
ERR3(0E3H):No Flash Memory Detected when power on
ERR4(0E4H):MX93521 Busy
ERR5(0E5H):Vocoder Mode , Play b uff er full, data rejected
ERR6(0E6H):No previous or next message found
ERR7(0E7H):MX93000 Command Busy
ERR8(0E8H):No empty block could be allocated for data bank usage
P/N:PM0688
13
DR-V4
REV. 3.3, APR 07, 2000
Page 14
6.2 MX93521 Power On Initialization Flo w Chart
ST ART
Clear MX93521 internal RAM read
systemsetup serial or parallel?
TP3054 or MX93000, MX93000C?
Flash memory type and initial LCD
6.3 HOST TO MX93521 COMMAND DESCRIPTIONS
COMMAND 09H
FUNCTION:Move Message Pointer
RETURN:ACK0
RETURN:ERR6, IF REACH THE FIRST OR THE LAST MESSA GE IN THE MEMOR Y
DB7DB6DB5DB4DB3DB2DB1DB0
00001001
DMMMMMMM
IF CURRENT MESSAGE NUMBER IS N,
D=0, JUMP FORW ARDD=1, JUMP BACKW ARD
M=001H, POINT T O THE MESSA GE (N+1)M=001H, POINT T O THE MESSA GE (N-1)
M=002H, POINT T O THE MESSA GE (N+2)M=002H, POINT T O THE MESSA GE (N-2)
M=07FH, POINT T O THE LAST MESSA GEM=07FH, POINT T O THE FIRST MESSAGE
COMMAND 0AH
FUNCTION:Point to specefic message
RETURN:ACK0
RETURN:ERR2, If no such message found in the FLASH memory
DB7DB6DB5DB4DB3DB2DB1DB0
00001010
MMMMMMMMMessage Number (High Byte)
MMMMMMMMMessage Number (Low Byte)
*The message pointer is point to the last message in the flash memory upon power on.
SAMPLES:
Forward to the next message09 H01H
Rewind to the previous message0 9 H81H
Forward to the last message09 H7FH
Rewind to the the first message0 9 HFFH
Move Message P ointer to message #258 (102H)0AH01 H02 H
P/N:PM0688
REV. 3.3, APR 07, 2000
15
Page 16
MX93521
COMMAND 10H
FUNCTION:GET CURRENT MESSAGE INFOMA TION
RETURN:ACK6, DA TA1, DAT A2, D A TA3, DAT A4, D A TA5, DAT A6 or A CK0*
DB7DB6DB5DB4DB3DB2DB1DB0
0001000 0
D ATA1: HIGH BYTE OF CURRENT MESSAGE NUMBER
D ATA2: LOW BYTE OF CURRENT MESSAGE NUMBER
DATA3: USER DAT A #1
DATA4: USER DAT A #2
DATA5: USER DAT A #3
DATA6: USER DAT A #4
*RETURN ACK0 WHEN NO MESSAGE IN THE MEMOR Y
SAMPLES:
GET CURRENT MESSAGE INFOMATION10 H
COMMAND 11H
COMMAND 12H
COMMAND 13H
COMMAND 14H
FUNCTION:ATTACH USER DA T A TO CURRENT MESSAGE
RETURN:ACK0 or ERR0
DB7DB6DB5DB4DB3DB2DB1DB0
00010BB B
USER DAT A #1
USER DAT A #2
USER DAT A #3
USER DAT A #4
* The USER D ATA is default to 0FFH
* Any data writen with this command will be AND with previous data
* When USER D ATA #1 is 055H. If write data 0AAH to it again, USER DATA #1 will become 0H
* If no message in the FLASH memory , MX93521 will return ERR0
SAMPLES:
A TTACH DATA 12H T O CURRENT MESSAGE11 H12H
A TTACH DAT A 12H/34H T O CURRENT MESSAGE12 H12 H34H
A TTACH DAT A 12H/34H/56H T O CURRENT MESSAGE13H1 2H34H56H
A TTACH DAT A 12H/34H/56H/78H T O CURRENT MESSAGE14 H12H34H56 H78 H
COMMAND 18H
FUNCTION:GET TOT AL MESSSAGE NUMBER
RETURN:ACK2, MSG_NO_HI, MSG_NO_LOW
DB7DB6DB5DB4DB3DB2DB1DB0
0001 1000
P/N:PM0688
16
REV. 3.3, APR 07, 2000
Page 17
MX93521
COMMAND 19H
FUNCTION:DELETE MESSAGE(S)
RETURN:ACK0 after deletion completed
DB7 DB6DB5DB4DB3DB2DB1DB0
0001 1001
DMMM MMMM
IF CURRENT MESSAGE NUMBER IS N
D=0, DELETE FORW ARD
M=000H, DELETE CURRENT MESSAGE ONLY
M=001H, DELETE ONE MESSAGE AFTER MESSAGE #N (MSG #N WILL BE DELETED)
M=002H, DELETE TW O MESSA GES AFTER MESSA GE #N (MSG #N, #N+1 WILL BE DELETED)
M=07FH, DELETE ALL MESSAGES AFTER MESSA GE #N (MSG #N, #N+1,.., #LAST WILL BE DELETED)
D=1, DELETE BACKW ARD
M=001H, DELETE ONE MESSAGE BEFORE MESSAGE #N (MSG #N WILL BE DELETED)
M=002H, DELETE TW O MESSAGES BEFORE MESSA GE #N (MSG #N, #N-1 WILL BE DELETED)
M=07FH, DELETE ALL MESSAGES BEFORE MESSA GE #N (MSG #N, #N-1,.., #1 WILL BE DELETED)
SAMPLES:
DELETE CURRENT MESSAGE19 H0 0H
DELETE CURRENT MESSAGE19 H0 1H
DELETE CURRENT & NEXT MESSAGE19 H0 2 H
DELETE CURRENT & PREVIOUS MESSAGE1 9 H8 2H
DELETE ALL MESSAGES AFTER & INCLUDE CURRENT MESSAGE19H7FH
DELETE ALL MESSAGES BEFORE & INCLUDE CURRENT MESSAGE1 9 HFFH
COMMAND 21H
FUNCTION:REC/PLAY MISC FUNCTION
RETURN:
DB7 DB6DB5DB4DB3DB2DB1DB0
00100001
MMMMMMMM
* THIS COMMAND ONL Y V ALID WHEN IN RECORD/PLA Y MODE
MFunctionAcknowledgeMode
01 HStop RecordingACK2,CHKSUM_H,CHKSUM_LRE C
01 HStop PlayingACK0PLAY
02 HREC/PLA Y P A USE ON/OFFACK0REC/PLA Y
04 HT urn on counter display on LCDACK0REC/PLA Y
08 HDelete playing messageACK0PLAY
10HSet REPEAT start pointACK0PLAY
20 HSet REPEA T end pointACK0PLAY
40 HDisable REPEA T modeACK0PLAY
80HSet MarkACK0REC/PLA Y
If HOST send command 21H/04H after REC or PLAY start, MX93521 will automatically display a 5-digit REC or
PLAY counter MM:SS at current LCD cursor. MM is minute. SS is second.
FUNCTION : RECORD MSG
BBB = 000, 001, 010, 011, 100
RETURN : ACK2, MSGNUM_H, MSGNUM_L
RETURN : A CK1, FORMA T (V OCODER mode, FORMAT=81H when recording with new format)
(VOCODER mode, FORMAT=80H when recording with old format)
RETURN: ERR1, WHEN OUT OF FLASH MEMORY, CANNO T PERFORM RECORD
DB7DB6DB5DB4DB3DB2DB1DB0
00101BBB
USER DAT A #1
USER DAT A #2
USER DAT A #3
USER DAT A #4
* USER DATA will be stored in the flash memory
* When RECORD , MX93521 will not switch MIC on automatically, HOST must turn on MIC before RECORD and turn
off MIC after RECORD STOP
SAMPLES:
RECORD MESSAGE WITHOUT USER D A TA28 H
RECORD MESSAGE WITH 1 USER DAT A 12H29 H12 H
RECORD MESSAGE WITH 2 USER D AT A 12H, 34H2A H1 2H3 4H
RECORD MESSAGE WITH 3 USER D AT A 12H, 34H, 56H2 BH12H3 4H56 H
RECORD MESSAGE WITH 4 USER DAT A 12H, 34H, 56H, 78H2CH12H34H56 H78 H
COMMAND 30H
COMMAND 31H
FUNCTION:PLA Y MESSAGE
RETURN:ACK2, MSGNUM_H, MSGNUM_L, ACK0(Vocoder mode)
RETURN:ERR2, No Message to play
DB7DB6DB5DB4DB3DB2DB1DB0
00110001
MMMMMMMMLENGTH (sec / unit)
M=000H, PLA Y TILL THE END OF MESSAGE
M=001H, PLA Y CURRENT MESSA GE FOR 1 SEC
M=080H, PLA Y CURRENT MESSA GE FOR 128 SEC OR REACH THE END OF MESSAGE
M=0FFH, PLA Y CURRENT MESSA GE FOR 255 SEC OR REA CH THE END OF MESSA GE
* When PLAY , MX93521 will not s witch SPKR on automatically, HOST must turn on SPKR before PLA Y and turn off
SPKR after PLAY STOP
SAMPLES:
PLAY MESSAGE TILL THE END OF MESSAGE30H
PLAY MESSAGE TILL THE END OF MESSAGE31H00H
PLA Y FIRST 3 SEC OF CURRENT MESSAGE3 1H03H
P/N:PM0688
18
REV. 3.3, APR 07, 2000
Page 19
COMMAND 39H
FUNCTION:JUMP TO MARK
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
001 11001
DMM MMMMM
D=0, FORW ARDD=1, BACKWARD
M=00H, Normal Playing
M=01H, Forward/Rewind to the 1st found mark from current position
M=02H, Forward/Rewind to the 2nd found mark from current position
..
M=7FH, Forward/Backward to the 127th found mark from current position
MX93521
mark#1
-
-
Pos#A
mark#2-mark#3
-
-
Pos#B
mark#4
-
If current playing position is at Pos#A,command 39H/01H will forward to mark#1
command 39H/02H will forward to mark#2
command 39H/03H will forward to mark#3
command 39H/04H will forward to mark#4
command 39H/05H will forward to the end of message
command 39H/81H will rewind to the head of message
If current playing position is at Pos#B,command 39H/01H will forward to mark#3
command 39H/02H will forward to mark#4
command 39H/03H will forward to the end of message
command 39H/81H will rewind to mark#2
command 39H/82H will rewind to mark#1
command 39H/83H will rewind to the head of message
* If two marks are set too close to each other(<2 second), the second mark will be ignored.
DB7DB6DB5DB4DB3DB2DB1DB0
001110 10
DMMMMM MM
UUUUUUUUUnit Length (20ms/unit)
D=0, FORW ARD
M=00H, PLAY 1 UNIT, SKIP 0 UNIT (NORMAL PLAY SPEED)
M=01H, PLAY 1 UNIT, SKIP 1 UNIT (2x SPEED)
M=02H, PLAY 1 UNIT, SKIP 2 UNIT (3x SPEED)
M=03H, PLAY 1 UNIT, SKIP 3 UNIT (4x SPEED)
M=07H, PLAY 1 UNIT, SKIP 7 UNIT (8x SPEED)
..
M=7FH, PLAY 1 UNIT, SKIP 127 UNIT (128x SPEED)
D=1, BACKW ARD
M=01H, PLA Y 1 UNIT, REWIND 1 UNIT (REPEAT SAME UNIT)
M=02H, PLA Y 1 UNIT, REWIND 2 UNIT (1x SPEED REWIND)
M=03H, PLA Y 1 UNIT, REWIND 3 UNIT (2x SPEED REWIND)
M=05H, PLA Y 1 UNIT, REWIND 5 UNIT (4x SPEED REWIND)
..
M=7FH, PLA Y 1 UNIT, REWIND 127 UNIT (126x SPEED)
SAMPLES:
NORMAL PLA YING39 H00 H
FORW ARD T O THE 1ST FOUND MARK3 9 H01H
REWIND T O THE 2ND FOUND MARK39H82H
NORMAL PLA YING3AH00H01H
PLAY 20ms and SKIP 20ms (2x speed)3A H01H01H
PLA Y 20ms and REWIND 60ms (2x speed)3A H83 H01 H
PLAY 40ms and SKIP 40ms3AH01H02H
PLAY 100ms and SKIP 200ms3AH02 H05H
PLA Y 100ms and REWIND 200ms3A H82 H05H
P/N:PM0688
REV. 3.3, APR 07, 2000
20
Page 21
MX93521
COMMAND 41H
FUNCTION:MISC FUNCTION
RETURN:
DB7DB6DB5DB4DB3DB2DB1DB0
010000 01
MMMMMM MM
MFunctionACK OWLEDGEREMARK
01HT oggle VOCODER modeACK0
02 HAppend RecordingACK0supported only in "4.8k" mode
03 HOverwrite RecordingACK0
04 HT oggle SPKR on/offACK0valid only when using TP3054
05 HVoice Activ ated RecordingACK0
06 HLinear mode codec interfaceACK0
07 Hu-law mode codec interfaceACK0
08 HT oggle MIC on/offACK0valid only when using TP3054
09 HPlay accross message boundaryACK0
0AHPlay within message boundaryACK0
0BH4Direct CODEC AccessACK0
0CH5Old data formatACK0
0DH5New data formatACK0
10H1Erase all messageACK0ack after erase complete
11H2Hard erase flash memoryACK0ack after erase complete
12 HReinitial flash memoryACK0ack after erase complete
20HCheck busy/Idle statusACK0 / ERR4
30 HT urn on 13kbps codingACK0 / ERR4change to 13kbps coding
31 HT urn off 13kbps codingACK0 / ERR4change to 4.8kbps coding
40 HCheck available blockACK2,BLKCNT_H, BLKCNT_L
41HCheck total blockACK2,BLKCNT_H, BLKCNT_L
42 HCheck available timeACK3,MINH,MINL, SEC
43HCheck total timeACK3,MINH, MINL, SEC
44 HCheck message lengthACK3,MINH, MINL, SEC
80H3Overrun counterACK2,CNT_H,CNT_LVOCODER mode
81H3Get Message ChecksumACK2,CS_H,CS_LVOCODER mode
1
The command 41H/10H er ase all data in good blocks. After b lock erase, the flash management data will be written
back to the flash memory . If HOST use flash memory as speech data memory and data bank memory . The command
41H/10H will erase both of the memory. To erase only speech memory, use command 19H. To erase data bank
memory , use command 0CAH. The commands to control data bank memory are described from command 0B0H to
command 0D6H
2
Prior Samsung ship their flash memory to customer, they will test the parts and randomly write data 00H to those
bad blocks. During the first power on, MX93521 will scan flash memory and create a good/bad table accordingly . After
that, MX93521 will search the good/bad table during power on initialization. Unless good/bad table is missing, MX93521
will not do flash memory initialization again.
P/N:PM0688
21
REV. 3.3, APR 07, 2000
Page 22
MX93521
We call command 41H/11H is hard erase flash memory . Because this command will erase all data in both good and
bad blocks. It is possible to erase the data in those bad blocks and turn the bad blocks into good block. In this case,
the original bad blocks could be unstable during normal operation. So, w e are not recommend to use this command
unless it is necessary.
After send command 41H/11H, HOST should issue a hardware reset by toggling RST\.
3
Command 41H/80H & 41H/81H are only valid after recording in V OCODER mode.
4
HOST could send PCM or u-law format data to CODEC directly. In this mode, MX93521 send PCM/u-Law data
received from HOST to CODEC (MX93000 or TP3054). MX93521 could store up to 512 samples data internally. If
inetrnal buffer is empty , MX93521 will disab le this mode automatically and send CMD 10H to HOST . At the beginning
of Direct CODEC Access mode, MX93512 will not send data to CODEC until MX93521 received 384 samples from
HOST .
5
Old data format is the data format used in MX93510 and MX93521 V3. Ne w data format is used in MX93521 V4 and
V5. Ne w format supports silence compression. It is alw ays set to use ne w data format in MX93521 V4. MX93521 V5
will reset to use new data format after power on, RECORD or PLA Y. So , if HOST want to RECORD or PLA Y message
using old data format, HOST needs to send command 41H/0CH every time before sending RECORD or PLAY
command to MX93521.
COMMAND 42H
FUNCTION:DETECT M FRAMES SILENCE ON THE PLA Y/RECORD MODE
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
00 1 0 00 1 0
HHHHHHHHSilence Frame number (Hi-byte)
LLLLLLLLF rame number (Lo-byte) , 20ms/unit
SAMPLES:
DETECT 500 ms SILENCE ON THE PLAY/RECORD MODE42H00H19 H
* This setting will be clear after play end of this message.
* When detect the silence condition , mx93521 will response the data of 28H
COMMAND 48H
FUNCTION:Tone Off
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
01001000T one Off
COMMAND 49H
FUNCTION:BEEP GENERA TOR
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
010010011000Hz T ONE (100ms on / 100ms off)
CCCCCGGGGAIN
CCCCC:BEEP COUNT , MAXIMUM 31 BEEPS
P/N:PM0688
REV. 3.3, APR 07, 2000
22
Page 23
MX93521
COMMAND 4BH
FUNCTION:TONE GENERA TOR
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
01001011 TONE
LLLLLGGGLENGTH (100ms/unit) & GAIN
F1 5F14F13F12F11F10F9F8TONE FREQ (HIGH BYTE)
F7F6F5F4F3F2F1F0TONE FREQ (LO W BYTE)
*For command 49H, 4BH, 4EH and 4FH. HOST have to make sure SPKR is on when using this commands.
*User could use scale factor in command 4EH&4FH combined with CODEC gain setting to set the desirable DTMF
tone level
P/N:PM0688
REV. 3.3, APR 07, 2000
24
Page 25
MX93521
SAMPLES:
PLAY 2 BEEPS W/ -42DB GAIN49H14 H
PLA Y TONE #C5 (523HZ) W/ -36DB GAIN FOR 2 SECOND4BH A3H 10HBEH
PLA Y TONE #E5 (659HZ) W/ -48DB GAIN FOR 1 SECOND4BH 5 5H 1 5 H19H
Play DTMF-1 (High tone is 6 dB higher than low tone)4EH 26 H B 0H 1 6 H 4 EH FF H 7 FH
Play DTMF-0 (High tone is 6 dB lower than low tone) 100ms4F H 2AH C1 H 1E H 1DH 3F H 7FH 0A H
STOP PLA YING DTMF T ONE48H
*Please reference to MX93000 data sheet for the definition of the MX93000, MX93000C registers
SAMPLES:
T urn on MX93000, MX93000C MIC path5AH0 0H4 8H
T urn off MX93000, MX93000C MIC path5AH0 0H01H
Set MIC to maxima gain5A H0 2H0FH
Set MIC to minima gain5A H0 2H00H
T urn on MX93000, MX93000C SPKR path5AH0 0H0 3H
T urn off MX93000, MX93000C SPKR path5AH0 0H01H
Set SPKR to maxima gain5A H0 3H00H
Set SPKR to minima gain5A H0 3H0FH
P/N:PM0688
REV. 3.3, APR 07, 2000
25
Page 26
MX93521
COMMAND 61H
FUNCTION:LED DISPLA Y FUNCTION
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
01100001
LED2LED1TTTTTT
LED1=1,LED1 ON (MX93521 PIN5 LOW)
LED2=1,LED2 ON (MX93521 PIN4 LOW)
TTTTTT=0,NO FLASH
TTTTTT¹0,FLASH TIMER (64ms/unit)
SAMPLES:
LED1 ST AY ON61 H40 H
LED2 ST AY ON61 H80 H
LED1 FLASH (512ms ON / 512ms OFF)61 H48 H
LED2 FLASH (1024ms ON / 1024ms OFF)6 1 H90H
LED1 & LED2 FLASH (128ms ON / 128ms OFF)61 HC2 H
LED1 & LED2 OFF61 H00 H
P/N:PM0688
REV. 3.3, APR 07, 2000
26
Page 27
MX93521
COMMAND 6AH
COMMAND 6CH
COMMAND 6EH
FUNCTION:WRITE COMPRESSED VOICE D A TA TO MX93521 FOR PLA YING (V OCODER mode)
RETURN:ACK0 / ERR5
BBB = 010, 100, 110
DB7DB6DB5DB4DB3DB2DB1DB0
01101BBBWRITE DA TA T O MX93521
BYTE#1
BYTE#2
BYTE#3
BYTE#4
BYTE#5
BYTE#6
MX93521 equipped a 64 words PLAY BUFFER, HOST should keep feeding compressed voice data to MX93521
when doing PLA Y function. Once PLAY BUFFER have no enough data to pla y, MX93521 will stop playing and send
command 10H to HOST. When the PLAY BUFFER is full, MX93521 will response ERR5. If this is the case, HOST
should re-send this command later. HOST must feed MX93521 at least 12 bytes data per 20 mini-second. When
HOST send command 30H, MX93521 will not start to play until received first 60 bytes data.
The procedure to do PLA Y function in VOCODER mode:
STEP1:Turn on VOCODER mode (send command 41H/01H)
STEP2:Turn on SPKR
STEP3:Set PLAY mode (Send command 30H)
STEP4:Send Compressed V oice data to MX93521 (Send command 6?H+BYTE+BYTE+..)
STEP5:If received ACK0, goto STEP4 to send next 6AH/6CH/6EH command
If received ERR5, wait 20-180 ms, then go back to STEP4 to re-send previous command
If HOST want to stop PLAY function or HOST reach the end of message, then goto STEP6
If received 10H, goto STEP7 (HOST did not send data to MX93521 fast enough)
STEP6:Wait until MX93521 pla y out data in PLA Y BUFFER (receiv eing command 10H from MX93521)
STEP7:Turn off SPKR
STEP8:T urn off VOCODER mode (send command 41H/01H).
* THIS COMMAND ONLY V ALID WHEN MX93521 SET T O SERIAL INTERF A CE MODE
P/N:PM0688
REV. 3.3, APR 07, 2000
28
Page 29
MX93521
LCD COMMAND SET:
C7C6C5C4C3C2C1C0
0000000101HClear Display
0000001X02HCursor return Home
0000010004HCursor-1, no shift
0000010105HCursor-1, shift
0000011006HCursor+1, no shift
0000011107HCursor+1, shift
0000100008HDisplay off
000011000CHDisplay on, Cursor off, Blink off
000011010DHDisplay on, Cursor off, Blink on
000011100EHDisplay on, Cursor on, Blink off
000011110FHDisplay on, Cursor on, Blink on
000100XX10HMove Cursor left
000101XX14HMove Cursor right
000110XX18HDisplay shift left
000111XX1CHDisplay shift right
1XXXXXXX80H-FFHSet DD RAM address
1000000080HSet cursor to the start of 1st line
11000000C0HSet cursor to the start of 2nd line
SAMPLES:
CLEAR LCD DISPLA Y79 H01H
SET CURSOR T O THE START OF LINE 179 H80 H
SET CURSOR T O THE START OF LINE 279 HC0 H
SET CURSOR T O THE LINE 2, 3RD COLUMN79 HC2 H
MOVE CURSOR LEFT79 H10H
MOVE CURSOR RIGHT79 H14 H
EXAMPLE:
To Display [RECORD ] at line #1 & [MM:SS] at line #2
CLEAR LCD DISPLA Y & RETURN CURSOR T O HOME79 H0 1H
DISPLA Y [RECORD ] AT LCD LINE 176H52 H45H 43H4F H 52H44H
SET CURSOR T O THE LINE 2, 4TH COLUMN79 H C3 H
TURN ON COUNTER DISPLA Y ON LCD2 1 H0 4H
P/N:PM0688
REV. 3.3, APR 07, 2000
29
Page 30
MX93521
COMMAND 80H
FUNCTION:Request for RECORD/PLA Y counter
RETURN:ACK2, MINUTE, SECOND
DB7DB6DB5DB4DB3DB2DB1DB0
10000000
COMMAND 81H
FUNCTION:Request for continuously RECORD/PLA Y counter
RETURN:ACK0
When MX93521 received command 81H, MX93521 will periodically send command 42H (Section 6.4) to HOST.
HOST could display the RECORD/PLAY counter on LCD accordingly. This function will be disabled by MX93521
when RECORD/PLA Y stop.
COMMAND 88H
FUNCTION: Download Message
RETURN:ACK1, FORMA T(VOCODER mode, FORMAT=81H if message is recorded with new format)
(VOCODER mode, FORMAT=80H if message is recorded with old format)
DB7DB6DB5DB4DB3DB2DB1DB0
10001000
Once MX93521 received this command, MX93521 will start to send compressed voice data to HOST by using
command 32H or 36H. When reach the end of message, MX93521 will send out command 30H. We recommend
HOST do checksum calculation during downloading. After download completed, use command 41H/81H to get the
checksum from MX93521 and compare if the checksum is match. The Chec ksum is calculated by EXCLUSIVE OR
all speech data in word format.
LLLL=0000 (Level 0)Set Highest silence threshold (Some of the speech will be treated as silence)
LLLL=0011 (Level 3)Default value
LLLL=1111 (Level 15)Set Lowest silence threshold (All signal are treated as speech, No silence compression at
all)
COMMAND 98H
FUNCTION:Read ROM/RAM wait state setting
RETURN:ACK2, WSTH,WSTL
DB7DB6DB5DB4DB3DB2DB1DB0
100100 00
P/N:PM0688
31
REV. 3.3, APR 07, 2000
Page 32
COMMAND 99H
FUNCTION:Set ROM/RAM wait state
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
10010001
OOOOAAAAWait State
OOOO: RAM Wait StateAAAA: ROM Wait State
COMMAND A2H
FUNCTION:Read MX93521 RAM
RETURN:ACK2, DA TA_H, DAT A_L
DB7DB6DB5DB4DB3DB2DB1DB0
11010010
Address (High)
Address (Low)
MX93521
COMMAND A4H
FUNCTION:Write MX93521 RAM
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
11010100
* Only for testing purpose, user should not change any data in the RAM area
COMMAND AAH
FUNCTION:Read MX93521 internal ROM
RETURN:ACK2, DA TA_H, DAT A_L
DB7DB6DB5DB4DB3DB2DB1DB0
11010010
Address (High)
Address (Low)
Data (High)
Data (Low)
Address (High)
Address (Low)
P/N:PM0688
REV. 3.3, APR 07, 2000
32
Page 33
MX93521
COMMAND B0H
FUNCTION:Output all blocks number which are used as data bank block
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
10110000
MX93521 return block number by sending command 32H/34H/36H and ended with command 30H
32H, BLK_H, BLK_L
34H, BLK_H, BLK_L, BLK_H, BLK_L
36H, BLK_H, BLK_L, BLK_H, BLK_L, BLK_H, BLK_L
30H
COMMAND B1H
FUNCTION:Read Flash Memory
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
10 1 10 0 01
Counter (read 1-255 byte from flash memory)
COMMAND B2H
FUNCTION:Read Flash Memory
RETURN:ACK0
DB7DB6DB5DB4DB3DB2DB1DB0
101 10010
CNT_H
CNT_L (read 1-65535 bytes from flash memory)
When continuously read flash memory , MX93521 will send data with command 3XH to HOST & ended with command
30H. The address pointer will point to the next byte of the last b yte read. HOST could send another continuous read
command 0B1H or 0B2H to read out following data from flash memory .
COMMAND B8H
FUNCTION:Request for data bank block
RETURN:ACK2, BLK_H, BLK_L
FUNCTION:Write data to flash memory(Data Bank)
RETURN:ACK0 or ERR0 (Block number or address pointer is not accepted)
DB7DB6DB5DB4DB3DB2DB1DB0
11 0 00 B BB
data to write to flash memory
data to write to flash memory
data to write to flash memory
data to write to flash memory
data to write to flash memory
data to write to flash memory
data to write to flash memory
P/N:PM0688
REV. 3.3, APR 07, 2000
34
Page 35
COMMAND CAH
FUNCTION:Erase Block (Release data block)
RETURN:ACK0 or ERR0
DB7DB6DB5DB4DB3DB2DB1DB0
11 0 01 0 10
Block (High)
Block (Low)
COMMAND C0H
FUNCTION:Read user output port status
RETURN:ACK1, user output port status ( 4bits )
Flash Memory Pointer range from 10H to 0FFEH
* When MX93521 received command 0FAH or 0FCH from HOST, MX93521 start to play voice prompt from ROM/
FLASH. After pla ying out all data, MX93521 will send command 10H to HOST . The voice prompt data are compressed
speech data which is ended with one 0000H or six 0FFFFH in the data stream.
P/N:PM0688
REV. 3.3, APR 07, 2000
36
Page 37
MX93521
6.4 MX93521 TO HOST COMMANDS
MX93521 will always respond a A CK if received a command from HOST. Besides that, MX93521 will send command
to notify HOST that a specific event has happened. HOST could do action according to the command received.
COMMAND 10H
FUNCTION:Play mode, Reach the end of the playing message
DB7DB6DB5DB4DB3DB2DB1DB0
00 0 10 0 00
COMMAND 18H
FUNCTION:Play mode, Reach the start of the playing message
FUNCTION:MX93521 outputs data with command 3XH and ending the function with command 30H
COMMAND 32H
FUNCTION:Vocoder record mode, MX93521 outputs compressed v oice data (silence frame)
DB7DB6DB5DB4DB3DB2DB1DB0
00 1 10 0 10
BYTE #1
BYTE #2
COMMAND 36H
FUNCTION:Vocoder record mode, MX93521 outputs compressed voice data (speech frame)
DB7DB6DB5DB4DB3DB2DB1DB0
00 1 10 1 10
BYTE #1
BYTE #2
BYTE #3
BYTE #4
BYTE #5
BYTE #6
When in V OCODER mode, MX93521 use this command to send compressed voice data to HOST.
MX93521 equipped with 64 byte buff er internally. If buffer is full, data will be discarded.
P/N:PM0688
REV. 3.3, APR 07, 2000
38
Page 39
MX93521
7. DC Characteristics¡G TA=0 to 70°C , VCC=5V±10¢H
Storage temperature range¡G-55°C - 150°C
SYMBOLPARAMETERCONDITIONMINTYPMAXUNIT
VC Csupply voltage4.55.05.5Volt
GNDground0Volt
TTL LEVEL INPUT(IT)
VIHInput high voltage2.0V
VILInput low voltage0.8V
SCHMITT TRIGGER INPUT (IS)
VIHInput high voltage0.7*VCCV
VILInput low voltage0.3*VCCV
8mA OUTPUT (OA)
V OHOnput high voltageIOH=-8mA2.4
V OLOnput low voltageIOL=8mA0.4V
16mA OUTPUT (OB)
V OHOnput high voltageIOH=-16mA2.4V
V OLOnput low voltageIOL=16mA0.4V
SUPPL Y CERRENT
ICCNORMAL4570mA
ICCHOLD MODE10mA
ICCPOWER DOWN36mA
P/N:PM0688
REV. 3.3, APR 07, 2000
39
Page 40
8.AC TIMING AND CHARACTERISTICS:
RESET TIMING
MX93521
RST\
EAD15~EAD0
ED15~ED0
CONTROL
SIGNALS
OPT18~OPT0
BIO7~BIO0
T w(rst)
0001PC=0000
validvalid
(inactive)
0000
Note: Control Signals
HOLDA\EDCE\EPCE\ERD\EWR\
CAS\RAS\DRD\DWR\
SYMBOLP ARAMETERMINNOMMAXUNIT
T w(rst)Reset low pulse width2*46.5ns
OUTPUT PORT TIMING
AD15-AD0
EAD15-EAD0
OPT18~OPT0
BIO7~BIO0
XF\
PC=N, SXF/RXF
or OUT XX
PC=N+1PC=N+2
Td(a-o)
OUTPUT PORTS AND EXTERNAL FLA G(XF\) TIMING
SYMBOLP ARAMETERMINNOMMAXUNIT
Td(a-o)Address to output ports delay time010ns
P/N:PM0688
40
REV. 3.3, APR 07, 2000
Page 41
CODEC TRANSMIT AND RECEIVE TIMING
S
S
MX93521
CMCK
CFS
CDR0
CDX0
Td(ch-fs)
Tc
Td(ch-fs)
Th(dr)
Ts(dr)
N=1N=2N=3N=4SAMPLING 16 BIT
Td(ch-dx)
N=1N=2N=3N=4TRANSMIT 16 BIT
Tlpd
Thpd
SYMBOLPARAMETERMINNOMMAXUNIT
TcCMCK cycle time650ns
TlpdCMCK low pulse duration31 533 5ns
ThpdCMCK high pulse duration31 53 35ns
Td(ch-fs)CMCK to CFS delay time20ns
Td(ch-dx)CMCK rising edge to Dx valid10ns
Ts(dr)DR set-up time before CMCK falling edge10ns
Th(dr)DR hold time before CMCK falling edge10ns
INTERRUPT TIMING
INT0\
INT1\
INT2\
AD15-AD0
fetch N+0fetch N+1fetch N+1fetch N+1fetch I
Tw
SYMBOLPARAMETERMINNOMMAXUNIT
TwINT\ low pulse duration3Q *ns
NOTE:Q=15.5 ns
P/N:PM0688
41
REV. 3.3, APR 07, 2000
Page 42
SRAM/ROM READ TIMING
MX93521
EDCE\,EPCE\
EAD15-EAD0
ERD\
ED15-ED0
SRAM WRITE TIMING
EDCE\
EAD15-EAD0
TCS
TAA
TDR
DATA IN
TOH
EWR\
ED15-ED0
TAS
TDW
DATA OUT
TWR
TDH
SYMBOLP ARAMETERMINNOMMAXUNIT
TCSChip select access time26.5+WxTns
TAAAddress access time26.5+WxTns
TD RData read setup time12ns
T O HData hold from end of read0ns
TASAddress setup time05ns
T D WData to EWR\ low overlap1 2ns
TD HData hold from end of write0ns
TW RWrite recovery time0ns
*NOTE: T=31ns
W:Wait state number
P/N:PM0688
REV. 3.3, APR 07, 2000
42
Page 43
HOLD TIMING
MX93521
EAD15-EAD0
ED15-ED0
EPCE\
EDCE\
EWR\
ERD\
HOLD\
HOLDA\
NN+1N+2N+3N+4
T en(ah-a)
Ts(a-h)
Td(hh-ha)
SYMBOLPARAMETERMINNOMMAXUNIT
Ts(a-h)Address set-up time before HOLD\ low53Q-10ns
Td(hh-ha)HOLD\ high to HOLD A\ high01Q1Q+10ns
T en(ah-a)Address driven after HOLDA\ high1Q-101Q2Qns
*NOTE: Q=15.5n
H/W requirement
1. READ/WRITE pulse T of host to MX93521, should be no longer than 0.125ms
T
PHWRB/PHRDB/
READ/WRITE
T < 0.125ms
2. The SAMSUMG flash WP\ pin request timing...
4.5 V olt
VCC
WP\
While power on, reset MX93521 after the external power e xceed 4.5 V olt.
When external power drop below 4.5 V olt, host should stop all functions and set MX93521 into po wer down mode.
.25mm[.01 inch] of its true position [TP] at a
maximum material condition.
MX93521
P/N:PM0688
REV. 3.3, APR 07, 2000
44
Page 45
MX93521
10. Ordering Information
P AR T NO.P ACKAGE
MX93521FCPQFP
MX93521UCLQFP
MX93521?C
MXICCOMMERCIAL
COMPANY 0-70oC
PREFIX
PACKAGE TYPE
U: LQFP
F AMILY
PREFIXPRODUCT NUMBER
P/N:PM0688
REV. 3.3, APR 07, 2000
45
Page 46
Appendix 2. Sample Flow Chart for HOST to Implement uP Serial Interface
call SND_RCVD_CMD ( ) every 50 usec
BYTE:txdata, cmdout[0..7]
SEND_RCVD_CMD( )
YES
SCLK low?
DA\ low?
NO
NIBBLE; tbcnt, txcnt
BIT:data2snd, clk, obit
MX93521
txdata, cmdin[0..7]
tbcnt, rxcnt
set SCLK high
RETURN
YES
txcnt++
txdata=cmdout [txcnt]
tbcnt
obit=1
txdata.0==0?
data2snd=0
txcnt=0
NO
YES
clk=0
tbcnt==0?
data2snd==0?
txdata=cmdout[0]
tbcnt=10
obit=0
tbcnt==10?
tbcnt==1?
txdata.0==0?
obit=1
txdata>>=1
YES
YES
YES
NO
YES
clk=1
obit=SOUT
rbcnt==9?
NO
rbcnt==0?
YES
obit==0?
YES
rbcnt ++
YES
NO
rxdata>>=1
rxdata=(obit<<7)
decode_cmd( )
rxcent=0
data bit
YES
YES
obit==0?
NO
cmdin[rxcnt]=rxdata
rbcent=0
rxdata=0
rxcnt==
(cmdin[0] & 7)
NO
rxcnt==0?
(cmdin[0] & 0xf0)
==0xe0?
NO
rxcnt ++
YES
NO
stop bit
error
rxcnt=0
rxdata=0
rbcnt=0
P/N:PM0688
YES
To send command to MX93521:
Load command to cmdout[0:7]
then set data2snd=1
After sending out all commands,
dats2snd will be cleared to 0.
tbcnt--
obit==1?
NO
SIN lowSIN high
clk=1
NO
46
CLK==1?
YES
set SCLK low
RETURN
Received a complete Command from MX93521.
Precess command which is stored in cmdin[0:7]
REV. 3.3, APR 07, 2000
Page 47
MX93521
Appendix 3. Recommend commands sequence to implement a digital recorder
(star* means function is optional)
A3.1 Record Message (TP3054):
FunctionsHOST sendMX93521 Acknowledge
*T urn on SPKR41H/04HACK0
*Beep49H/0AHACK0
*Turn off SPKR41H/04HACK0
T urn on MIC41H/08HACK0
*LED #1 flash61H/48HACK0
*Append Recording41H/02HACK0
*Overwrite Recording41H/03HACK0
*Turn on Voice Activ ated Mode41H/05HACK0
Start to Record28 HACK2,MSG#_H,MSG#_L
*Clear LCD79H/01HACK0
*Display [RECORD] on LCD76H/52H/45H/43H/4FH/52H/44HACK0
*Move cursor to line #2, col #379H/C3HACK0
*T urn on message counter displa y on LCD21H/04HACK0
A3.2 Stop Recording (TP3054):
FunctionsHOST sendMX93521 Acknowledge
Stop Recording21H/01HACK2,CHKSUM_H, CHKSUM_L
T urn off MIC41H/08HACK0
*LED #1 off61H/00HACK0
*T urn on SPKR41H/04HACK0
*Beep49H/0AHACK0
*Turn off SPKR41H/04HACK0
A3.3 Out of Memory , Received command 20H fr om MX93521 during Recording (TP3054):
FunctionsHOST sendMX93521 Acknowledge
T urn off MIC41H/08HACK0
*LED #1 off61H/00HACK0
*T urn on SPKR41H/04HACK0
*Beep49H/0AHACK0
*Turn off SPKR41H/04HACK0
P/N:PM0688
REV. 3.3, APR 07, 2000
47
Page 48
MX93521
A3.4 Play Message (TP3054):
FunctionsHOST sendMX93521 Acknowledge
Move message pointer to specific message09H/xxHACK0/ERR6
T urn on SPKR41H/04HACK0
*Beep49H/0AHACK0
*LED #2 flash61H/88HACK0
Start to Play30HACK2,MSG#_H,MSG#_L
*Send msg counter to HOST every 512 ms81H/04HACK0
*Clear LCD79H/01HACK0
*Display [PLAY] on LCD74H/50H/4CH/41H/59HACK0
*Move cursor to line #2, col #379H/C3HACK0
*T urn on message counter displa y on LCD21H/04HACK0
FunctionsHOST sendMX93521 Acknowledge
1T urn on SPKR41H/04HACK0
2Move message pointer to the 1st msg09H/FFHACK0/ERR6
3Play current message for 3 second31H/03HACK0
410H
5Move message pointer to the next message09H/01HACK0/ERR6
6if received ACK0, goto Step #3
if received ERR6, goto Step #7
7Turn off SPKR41H/04HACK0
A3.9 Message Found
FunctionsHOST sendMX93521 Acknowledge
1Stop playing21H/01HACK0
2Play current message30 HACK0
3Turn off SPKR41H/04HACK0
MX93521
P/N:PM0688
REV. 3.3, APR 07, 2000
49
Page 50
MX93521
A3.10 The procedure f or using flash memory as data bank memory
HOST SENDMX93521 RESPONSE
1 Request a empty block to be used0B8H0A2H, BLK_H, BLK_L
as data block
2 Set continuous read start address0BCH, BLK_H, BLK_L, ADR_H, ADR_L0A0H
3 Continuous Read 20 bytes0B1H, 14H0A0H
Each block in flash memory is 4K byte. The first 16 b ytes are reserved f or MX93521 as data link data, HOST could
read but could not write data to it. So, the host usab le data are from address 10H-0FFFH.
P/N:PM0688
50
REV. 3.3, APR 07, 2000
Page 51
Appendix 4. Flow Chart of using MX93521 in V OCODER mode (Parallel Interface)