MCNIX MX93521FC

MX93521
ALL DIGITAL VOICE RECORDER MACHINE
BASED ON THE MX93521 VOCODER CHIP
1. FEATURES
• Host writable message header (4 bytes) for identifica
-tion 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
• Excellent sound quality by adopting 4800bps CELP
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/8/16/32 Mbit Samsung Flash Memory or its
compatible parts
• Support both parallel and serial microprocessor inter
face.
• Codec Interface circuit (support both TP3054 and
MX93000)
• Host controllable LCD Module Interface
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.
MODE
FUNCTION PATH
CODEC-->(COMPRESS)-->FLASH
CODEC-->(DECOMPRESS)<--FLASH
CODEC-->(COMPRESS)-->HOST
CODEC-->(DECOMPRESS)<--HOST
CODEC-->(PCM/u-Law)<--HOST
FLASH(MSG)-->HOST
FLASH(MSG)<--HOST
FLASH(DATA)<-- -->HOST
RECORD
PLAY
RECORD (VOCODER)
PLAY (VOCODER)
DIRECT CODEC PLAY MODE
DOWNLOAD MESSAGE
UPLOAD MESSAGE
DATABANK ACCESS
P/N:PM0426
REV. 2.2, JAN 20, 1998
1
MX93521
3.PIN CONFIGURATIONS
3.1 Pinout Assignments for MX93521 100-Pin PQFP (Parallel Mode)
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
ED8
ED7
ED6
ED5
ED4
ED3
ED2
ED1
GND
VDSP
ED0
HOLD\
HOLDA\
EDCE\
EPCE\
ERD\
EWR\
EAD0
EAD1
EAD2
EAD3
EAD4
EAD5
EAD6
FLL\
100-LQFP PIN ASSIGNMENT¡G
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
MX93521
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
EAD7
NC
EAD8
EAD9
EAD10
EAD11
EAD12
EAD13
EAD14
GND
VDSP
EAD15
VDSP
SCLK
VDSP
DSPDR
DA\
CMCLK
CFS
DSPDX
SOUT
PHDB0
PHDB1
PHDB2
PHDB3
LED2\
LED1\
NC
CE1\
CE2\
NC
ALE
CLE
X32I
X32O
PACKB\
S/P
SIN
CODEC TYPE
R/B
MTYPE0
SHOLD\
MTYPE2
MTYPE1
VDSP
GND
PHDB7
PHDB6
PHDB5
PHDB4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ED9
ED10
ED11
ED12
ED13
VDSP
GND
ED14
ED15
XTLI
XTLO
NC
NC
NC
NC
MIC-E\
SPK-E\
RST\
EROM
SDEN\
SDATA
WP\
RxCmd
NC
NC
REV. 2.2, JAN 20, 1998
P/N:PM0426
2
RxCmd
NC
NC
LED2\
LED1\
NC
CE1\
CE2\
NC
ALE
CLE
X32I
X32O
PACKB\
S/P
SIN
CODECTYPE
R/B
MTYPE0
SHOLD\
MTYPE2
MTYPE1
VDSP
GND
PHDB7
PHDB6
PHDB5
PHDB4
PHDB3
PHDB2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
ED10
ED9
ED8
ED7
ED6
ED5
ED4
ED3
ED2
ED1
GND
VDSP
ED0
HOLD\
HOLDA\
EDCE\
EPCE\
ERD\
EWR\
EAD0
EAD1
EAD2
EAD3
EAD4
EAD5
EAD6
FLL\
GND
EAD7
EAD8
MX93521
100-PQFP PIN ASSIGNMENT¡G
ED11
ED12
ED13
VDSP
GND
ED14
ED15
XTLI
XTLO
NC
NC
NC
NC
MIC-E\
SPK-E\
RST\
EROM
SDEN\
SDATA
WP\
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
MX93521
P/N:PM0426
3
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
EAD9
EAD10
EAD11
EAD12
EAD13
EAD14
GND
VDSP
EAD15
VDSP
SCLK
VDSP
DSPDR
PHRDB\
CMCLK
CFS
DSPDX
PHWRB\
PHDB0
PHDB1
REV. 2.2, JAN 20, 1998
MX93521
3.2 Pinout Assignments for MX93521 100-Pin TQFP (Serial Mode)
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
ED8
ED7
ED6
ED5
ED4
ED3
ED2
ED1
GND
VDSP
ED0
HOLD\
HOLDA\
EDCE\
EPCE\
ERD\
EWR\
EAD0
EAD1
EAD2
EAD3
EAD4
EAD5
EAD6
FLL\
100-LQFP PIN ASSIGNMENT¡G
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
MX93521
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
EAD7
NC
EAD8
EAD9
EAD10
EAD11
EAD12
EAD13
EAD14
GND
VDSP
EAD15
VDSP
SCLK
VDSP
DSPDR
DA\
CMCLK
CFS
DSPDX
SOUT
BIO0
BIO1
BIO2
BIO3
LED2\
LED1\
NC
CE1\
CE2\
NC
ALE
CLE
X32I
X32O
PACKB\
S/P
SIN
CODEC TYPE
R/B
MTYPE0
SHOLD\
MTYPE2
MTYPE1
VDSP
GND
BIO7
BIO6
BIO5
BIO4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ED9
ED10
ED11
ED12
ED13
VDSP
GND
ED14
ED15
XTLI
XTLO
NC
NC
NC
NC
MIC-E\
SPK-E\
RST\
EROM
SDEN\
SDATA
WP\
RxCmd
NC
NC
REV. 2.2, JAN 20, 1998
P/N:PM0426
4
RxCmd
NC
NC
LED2\
LED1\
NC
CE1\
CE2\
NC
ALE
CLE
X32I
X32O
PACKB\
S/P
SIN
CODECTYPE
R/B
MTYPE0
SHOLD\
MTYPE2
MTYPE1
VDSP
GND
BIO7
BIO6
BIO5
BIO4
BIO3
BIO2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
ED10
ED9
ED8
ED7
ED6
ED5
ED4
ED3
ED2
ED1
GND
VDSP
ED0
HOLD\
HOLDA\
EDCE\
EPCE\
ERD\
EWR\
EAD0
EAD1
EAD2
EAD3
EAD4
EAD5
EAD6
FLL\
GND
EAD7
EAD8
MX93521
100-PQFP PIN ASSIGNMENT¡G
ED11
ED12
ED13
VDSP
GND
ED14
ED15
XTLI
XTLO
NC
NC
NC
NC
MIC-E\
SPK-E\
RST\
EROM
SDEN\
SDATA
WP\
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
MX93521
P/N:PM0426
5
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
EAD9
EAD10
EAD11
EAD12
EAD13
EAD14
GND
VDSP
EAD15
VDSP
SCLK
VDSP
DSPDR
PHRDB\
CMCLK
CFS
DSPDX
PHWRB\
BIO0
BIO1
REV. 2.2, JAN 20, 1998
MX93521
4.PIN DESCRIPTION
4.1 DSP BASIC (22 PINS )
SYMBOL
VDSP
GND
FLL\
XTLI
XTLO
RST\
PACKB\
HOLD\
HOLDA\
EROM
SCLK
X32O
X32I
TYPE
I
PIN # (PQFP)
23,43,69,84,41,39
24,44,53,70,85
54
PIN # (LQFP)
20,40,66,81,38,36
21,41,67,82
51
I
OA
88
89
96
14
85
86
93
11
67
66
97
40
13
12
64
63
94
37
10
9
I
OA
I
I
OA
DESCRIPTION
5V power source
Ground
FLL\ low to set MX93521 running from single
low crystal
32.256Mhz Crystal input
32.256Mhz Crystal output
Power on Reset, Schmite triggered
In 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 DSP clock down and release bus
Ack to HOLD\ signal
Disable internal ROM, use external ROM only
Transmit/receive data clock
32.768Khz Crystal output
32.768Khz Crystal input
4.2 DSP EXTERNAL MEMORY(40 pins)
SYMBOL
EAD0-EAD15
ED0~ED15
EDCE\
EPCE\
ERD\
EWR\
NC
TYPE
OB
I/OB
OB
OB
OB
OB
PIN # (PQFP)
61~55,52~45,42
68,71~83,86~87
65
64
63
62
90~93
PIN # (LQFP)
58~52,50,48~42,39
65,68~80,83~84
62
61
60
59
87~90
DESCRIPTION
Address Bus
Data Bus
External data chip enable
Resered for future use
Flash external read
Flash external write
No connection
4.3 uP INTERFACE(10 pins)
4.3.1 Serial Interface:(UPMODX=1)
SYMBOL
DA\
SOUT
BIO(7..0)
TYPE
OC
OC
OB
PIN # (PQFP)
37
33
25~32
PIN # (LQFP)
34
30
22~29
DESCRIPTION
Data Available (Output port OPT17)
Serial Data Out (Output port OPT16)
Drive LCD Display
REV. 2.2, JAN 20, 1998
P/N:PM0426
6
MX93521
4.3.2 Parallel Interface:(UPMODX=0)
SYMBOL
PHRDB\
PHWRB\
PHDB(7:0)
TYPE
I
I
B
PIN # (PQFP)
37
33
25~32
PIN # (LQFP)
34
30
22~29
DESCRIPTION
Host read
Host write
Host data bus
4.4 CODEC (4 pins)
SYMBOL
CFS
CMCLK
TYPE
OB
OB
PIN # (PQFP)
35
36
PIN # (LQFP)
32
33
DESCRIPTION
Codec frame sync, 8Khz
Codec master clock, 1.536Mhz
DSPDX
DSPDR
OA
I
34
38
31
35
Codec data transmit
Codec data receive
PIN # (LQFP)
8
7
3,6
5
4
2
1
DESCRIPTION
Flash memory command latch enable
Flash memory address latch enable
4.5 OPT:OUT PORT(16 pins)
SYMBOL
CLE
ALE
N.C.
CE2\
CE1\
LED1\
LED2\
N.C. DR-V5
RxCmd DR-V5
TYPE
OC
OC
OC
OC
OC
OC
OC
PIN # (PQFP)
11
10
6,9
8
7
5
4
2,3
1
98
Chip enable 2
Chip enable 1
LED1 enable
LED2 enable
WP\
OC
100
97
Received Command (toggle when re
ceived command from HOST)
Flash memory write protection
SDATA
SDEN\
SPK-E
MIC-E\
OC
OC
OC
OC
99
98
95
94
96
95
92
91
Serial data transfer (for MX93000)
Serial data enable (for MX93000)
Speaker enable,Hi-active
Microphone enable
REV. 2.2, JAN 20, 1998
P/N:PM0426
7
MX93521
4.6 IPT:INPUT PORT(8 pins)
SYMBOL
MTYPE1
MTYPE2
SHOLD\
MTYPE0
R/B
CODECTYPE
SIN
S/P\
TYPE
I
I
I
I
I
I
I
I
PIN # (PQFP)
22
21
20
19
18
17
16
15
PIN # (LQFP)
19
18
17
16
15
14
13
12
DESCRIPTION
Memory type select 1
Memory type select 2
Power down detect
Memory type select 0
Flash memory Ready/Busy
Codec select (TP3054B or MX93000)
Serial data input
Serial/paralled interface
NOTE:OA:2mA,OB:4mA,OC:16mA output current
REV. 2.2, JAN 20, 1998
P/N:PM0426
8
MX93521
5. HOST CONTROLLER INTERFACE
5.1 HOST CONTROLLER INTERFACE
5.1.1 Configuration
40
OUT1
16
OUT2
HOST
37
IN1
33
IN2
96
OUT3
1
IN3
SCLK
SIN
MX93521
DA\
S/P\
15
VCC
PHILO\
39
VCC
15
Gnd
SOUT
RST\
RxCmd
SERIAL MODE
40
OUT1
33
SCLK
PHWRB\
37
OUT2
HOST
PHRDB\
14
IN1
16
96
OUT3
D0-7
32-25
1
IN2
PACKB\
MX93521
SIN
S/P\
RST\
PHDB0-7
RxCmd
PARALLEL MODE
REV. 2.2, JAN 20, 1998
P/N:PM0426
9
MX93521
5.1.2 Timing Diagrams
HOST Write Timing (Parallel Mode)
PHDB0-7
ts
th
PHWRB\
SCLK
(INT1\)
tp
tp
RxCmd
HOST Write Timing (Parallel Mode)
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
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 wait 50 usec before
sending next command byte to MX93521.
HOST Read Timing (Parallel Mode)
PHDB0-7
ts
PACKB\
ta
PHRDB\
HOST Read Timing (Parallel Mode)
When MX93521 write data to PHDB0-7, PACKB\ will become low. 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.
REV. 2.2, JAN 20, 1998
P/N:PM0426
10
MX93521
HOST Write Timing (Serial Mode)
ts
HOST output data SIN
HOST output clock SCLK
tp
tp
tp
RxCmd
DSP Sampling from SIN
HOST send data 61H tp DSP
start
d0
1
d1
0
d2
0
d3
0
d4
d5
0
1
61H
d6
1
d7
0
stop
HOST Write Timing (Serial Mode)
RxCmd become low when start bit is received from HOST and toggle state when MX93521 received each following
data bit or stop bit from HOST. Thus, instead of waiting for a fixed period of time (50us) to send a command bit, HOST
could send the following command bit as soon as RxCmd toggled from previous state. The delay between the falling
edge of SCLK and the RxCmd togglling time is range from 1 us to 50 us
REV. 2.2, JAN 20, 1998
P/N:PM0426
11
MX93521
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
to HOST
x
start
d0
1
d1
0
d2
0
d3
1
d4
0
d5
0
d6
1
d7
0
stop
49H
HOST Read Timing (Serial Mode)
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:
Min
10ns
2ns
1us
Data setup time (ts)
Data hold time (th)
Data process time (tp)
PACKB\ acknowledge time (ta)
Max
50us
5ns
REV. 2.2, JAN 20, 1998
P/N:PM0426
12
MX93521
5.2 MX93521 IO INTERFACE
5.2.1 Output Port
LED1\
LED2\
UO0*
UO1*
UO2*
PIN
5
4
3
2
1
O
O
O
O
O
LED1 CONTROL
LED2 CONTROL
User Programmable Output Port
User Programmable Output Port
User Programmable Output Port
Power down state
High
High
High
High
High
* User Programmable Output Port are only available in DR-V3 and DR-V4 version
5.2.2 Flash Memory Interface
MX93521
MTYPE1
MTYPE2
MTYPE0
CLE
ALE
ERD\
CE2\
CE1\
EWR\
R\B
WP\
ED0
ED1
ED2
ED3
ED4
ED5
ED6
ED7
PIN
22
21
19
11
10
63
8
7
62
18
100
68
71
72
73
74
75
76
77
I
I
I
O
O
O
O
O
O
I
O
IO
IO
IO
IO
IO
IO
IO
IO
Flash
GND
GND
Vcc
CLE
ALE
RD\
CE2\
CE1\
WR\
R/B\
WP\
IO0
IO1
IO2
IO3
IO4
IO5
IO6
IO7
Power down state
0: SAMSUNG
0: SAMSUNG
(1:KM29N16000, 0:KM29N040)
Low
Low
High
High
Low
5.2.3 CODEC Interface
MX93521
CODECTYPE
DSPDR
DSPDX
CFS
CMCLK
SDATA
SDEN\
SPK_E
MIC_E\
I
O
O
O
O
O
O
O
O
PIN
17
38
34
35
36
99
98
95
94
Power down state
(1: MX93000, 0:TP3054)
High
High
Low
High
REV. 2.2, JAN 20, 1998
P/N:PM0426
13
MX93521
5.2.4 uP Serial Mode Interface
MX93521
RxCmd
S/P\
SCLK
DA\
SOUT
SHOLD\
SIN
RST\
BIO2
BIO3
BIO4
BIO5
BIO6
BIO7
O
I
I
O
O
I
I
I
O
O
O
O
O
O
uP
IN3
Vcc
OUT1
IN1
IN2
OUT3
OUT2
OUT4
LCD
(optional) MX93521 Rxd Command Indicator
High, Serial Mode
Serial Clock
Data Available
Serial Data Output
DSP HOLD
Serial Data Input
DSP RESET
E
RS
D4
D5
D6
D7
5.2.5 uP Parallel Mode Interface
MX93521
S/P\
SCLK
PHRDB\
PHWRB\
SHOLD\
RST\
PHILO\
SIN
PACKB\
RxCmd
PHDB0
PHDB1
PHDB2
PHDB3
PHDB4
PHDB5
PHDB6
PHDB7
I
I
I
I
I
I
I
I
O
O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
uP
GND
OUT1\
OUT2
OUT1
OUT3
OUT4
Vcc
IN1
IN1
IN2
D0
D1
D2
D3
D4
D5
D6
D7
LCD
Low, Parallel Mode
Read
Write
DSP HOLD
DSP RESET
High, Byte Mode
SIN should be connected to PACKB\ externally
Acknowledge
(optional) MX93521 Rxd Command Indicator
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
REV. 2.2, JAN 20, 1998
P/N:PM0426
14
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 acknowledge. The
valid commands and corresponded acknowledge are described as below.
D7 D6
D5
D4
D3
D2
D1
D0
0
0
0
0
1
B
B
B
008H
0
0
0
1
0
B
B
B
010H
0
0
0
1
1
B
B
B
018H
0
0
1
0
0
B
B
B
020H
0
0
1
0
1
B
B
B
028H
0
0
1
1
0
B
B
B
030H
0
0
1
1
1
B
B
B
038H
0
1
0
0
0
B
B
B
040H
0
1
0
0
1
B
B
B
048H
0
1
0
1
1
B
B
B
058H
0
1
1
0
0
B
B
B
060H
0
1
1
0
1
B
B
B
068H
0
1
1
1
0
B
B
B
070H
0
1
1
1
1
B
B
B
078H
1
0
0
0
0
B
B
B
080H
1
0
0
0
1
B
B
B
088H
1
0
0
1
0
B
B
B
090H
1
0
0
1
1
B
B
B
098H
1
0
1
0
0
B
B
B
0A0H
1
0
1
0
1
B
B
B
0A8H
1
0
1
1
x
B
B
B
0BxH
1
1
0
0
x
B
B
B
0CxH
1
1
0
1
0
B
B
B
0D0H
1
1
1
1
1
B
B
B
0F8H
BBB:BYTES SEND FOLLOWING THIS COMMAND
POINT TO SPECIFIC MESSAGE
GET CURRENT MESSAGE INFOMATION
DELETE MESSAGE(S)
REC/PLAY MISC. FUNCTION
RECORD MESSAGE
PLAY MESSAGE
SKIP FORWARD/BACKWARD PLAY
MISC. FUNCTION
TONE GENERATOR
MX93000 CODEC MISC. FUNCTION
LED DISPLAY
WRITE COMPRESSED VOICE DATA TO MX93521
LCD COMMAND
LCD DATA
OUTPUT COUNTER
Download/Upload Message DR-V5
Set Silence level DR-V4
Set ROM/RAM wait state DR-V5
Read/Write RAM DR-V4
Read ROM DR-V5
Data Bank Functions DR-V4
Data Bank Functions DR-V4
Data Bank Functions DR-V4
Play Voice Prompt DR-V4
MX93521 TO HOST ACKNOWLEDGES (OK Messages)
ACK0: 0A0H, NO DATA ACCOMPNIED THIS ACKNOWLEDGE
ACK1: 0A1H, 1 DATA ACCOMPNIED THIS ACKNOWLEDGE
ACK2: 0A2H, 2 DATA ACCOMPNIED THIS ACKNOWLEDGE
ACK6: 0A6H, 6 DATA ACCOMPNIED THIS ACKNOWLEDGE
MX93521 TO HOST ACKNOWLEDGES (ERROR Messgaes)
ERR0(0E0H): Command ERROR
ERR1(0E1H): Out of memory, MX93521 cannot perform RECORD function
ERR2(0E2H): No message found, MX93521 cannot perform PLAY function
ERR3(0E3H): No Flash Memory Detected when power on
ERR4(0E4H): MX93521 Busy
ERR5(0E5H): Vocoder Mode, Play buffer 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 DR-V4
REV. 2.2, JAN 20, 1998
P/N:PM0426
15
MX93521
6.2 MX93521 Power On Initialization Flow Chart
START
Clear MX93521 internal RAM read
systemsetup serial or parallel?
TP3054 or MX93000?
4M or 16M Flash memory init LCD
NO
Flash memory
ID correct?
Is data link in
Flash memory correct?
YES
NO
Is check data link
2nd time?
YES
NO
Format Flash memory &
create data link
Flash memory error
send CMD E3H
Flash memory OK send CMD
A1H+xxH
MX93521 Normal operation
0A1H+000H
0A1H+001H
0A1H+002H
0A1H+003H
0A1H+004H
0A1H+005H
0A1H+006H
0A1H+007H
ERR3(0E3H)
DETECT SAMSUNG KM29N040 FLASH MEMORY
DETECT SAMSUNG KM29N16000 FLASH MEMORY
RESERVED
RESERVED
RESERVED
RESERVED
RESERVED
RESERVED
NO MEMORY DETECTED
REV. 2.2, JAN 20, 1998
P/N:PM0426
16
MX93521
6.3 HOST TO MX93521 COMMAND DESCRIPTIONS
COMMAND 09H
FUNCTION:
RETURN:
RETURN:
DB7
0
D
DB6
0
M
Move Message Pointer
ACK0
ERR6, IF REACH THE FIRST OR THE LAST MESSAGE IN THE MEMORY
DB5
0
M
DB4
0
M
DB3
1
M
IF CURRENT MESSAGE NUMBER IS N,
D=0, JUMP FORWARD
M=001H, POINT TO THE MESSAGE (N+1)
M=002H, POINT TO THE MESSAGE (N+2)
M=07FH, POINT TO THE LAST MESSAGE
DB2
0
M
DB1
0
M
DB0
1
M
D=1, JUMP BACKWARD
M=001H, POINT TO THE MESSAGE (N-1)
M=002H, POINT TO THE MESSAGE (N-2)
M=07FH, POINT TO THE FIRST MESSAGE
COMMAND 0AH DR-V5
FUNCTION:
RETURN:
RETURN:
DB7
0
M
M
DB6
0
M
M
Point to specefic message
ACK0
ERR2, If no such message found in the FLASH memory
DB5
0
M
M
DB4
0
M
M
DB3
1
M
M
DB2
0
M
M
DB1
1
M
M
DB0
0
M
M
Message Number (High Byte)
Message Number (Low Byte)
*The message pointer is point to the last message in the flash memory upon power on.
SAMPLES:
Forward to the next message
Rewind to the previous message
Forward to the last message
Rewind to the the first message
Move Message Pointer to message #258 (102H)
09H
09H
09H
09H
0AH
01H
81H
7FH
FFH
01H
02H
REV. 2.2, JAN 20, 1998
P/N:PM0426
17
MX93521
COMMAND 10H
FUNCTION:
GET CURRENT MESSAGE INFOMATION
RETURN:
ACK6, DATA1, DATA2, DATA3, DATA4, DATA5, DATA6 or ACK0
DB7 DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
0
1
0
0
0
0
DATA1:
DATA2:
DATA3:
DATA4:
DATA5:
DATA6:
HIGH BYTE OF CURRENT MESSAGE NUMBER
LOW BYTE OF CURRENT MESSAGE NUMBER
USER DATA #1
USER DATA #2
USER DATA #3
USER DATA #4
*RETURN ACK0 WHEN NO MESSAGE IN THE MEMORY
SAMPLES:
GET CURRENT MESSAGE INFOMATION
10H
COMMAND 11H
COMMAND 12H
COMMAND 13H
COMMAND 14H
FUNCTION:
RETURN:
DB7 DB6
0
0
ATTACH USER DATA TO CURRENT MESSAGE
ACK0 or ERR0
DB5
DB4
DB3
DB2
DB1
0
1
0
B
B
DB0
B
USER DATA #1
USER DATA #2
USER DATA #3
USER DATA #4
* The USER DATA is default to 0FFH
* Any data writen with this command will be AND with previous data
* When USER DATA #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:
ATTACH DATA 12H TO CURRENT MESSAGE
ATTACH DATA 12H/34H TO CURRENT MESSAGE
ATTACH DATA 12H/34H/56H TO CURRENT MESSAGE
ATTACH DATA 12H/34H/56H/78H TO CURRENT MESSAGE
11H
12H
13H
14H
12H
12H
12H
12H
34H
34H
34H
56H
56H
78H
REV. 2.2, JAN 20, 1998
P/N:PM0426
18
MX93521
COMMAND 19H
FUNCTION:
RETURN:
DB7 DB6
0
0
D
M
DELETE MESSAGE(S)
ACK0 after deletion completed
DB5
DB4
DB3
0
1
1
M
M
M
DB2
0
M
DB1
0
M
DB0
1
M
IF CURRENT MESSAGE NUMBER IS N
D=0, DELETE FORWARD
M=001H, DELETE ONE MESSAGE AFTER MESSAGE #N (MSG #N WILL BE DELETED)
M=002H, DELETE TWO MESSAGES AFTER MESSAGE #N (MSG #N, #N+1 WILL BE DELETED)
M=07FH, DELETE ALL MESSAGES AFTER MESSAGE #N (MSG #N, #N+1,.., #LAST WILL BE DELETED)
D=1, DELETE BACKWARD
M=001H, DELETE ONE MESSAGE BEFORE MESSAGE #N (MSG #N WILL BE DELETED)
M=002H, DELETE TWO MESSAGES BEFORE MESSAGE #N (MSG #N, #N-1 WILL BE DELETED)
M=07FH, DELETE ALL MESSAGES BEFORE MESSAGE #N (MSG #N, #N-1,.., #1 WILL BE DELETED)
SAMPLES:
DELETE CURRENT MESSAGE
DELETE CURRENT & NEXT MESSAGE
DELETE CURRENT & PREVIOUS MESSAGE
DELETE ALL MESSAGES AFTER & INCLUDE CURRENT MESSAGE
DELETE ALL MESSAGES BEFORE & INCLUDE CURRENT MESSAGE
19H
19H
19H
19H
19H
01H
02H
82H
7FH
FFH
COMMAND 21H
FUNCTION:
RETURN:
DB7 DB6
0
0
M
M
REC/PLAY MISC FUNCTION
DB5
1
M
DB4
0
M
DB3
0
M
DB2
0
M
DB1
0
M
DB0
1
M
* THIS COMMAND ONLY VALID WHEN IN RECORD/PLAY MODE
M
01H
01H
02H
04H
08H
10H
20H
40H
80H
Function
Stop Recording
Stop Playing
REC/PLAY PAUSE ON/OFF
Turn on counter display on LCD
Delete playing message
Set REPEAT start point
Set REPEAT end point
Disable REPEAT mode
Set Mark
Acknowledge
ACK2,CHKSUM_H,CHKSUM_L
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
Mode
REC
PLAY
REC/PLAY
REC/PLAY
PLAY
PLAY
PLAY
PLAY
REC/PLAY
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.
REV. 2.2, JAN 20, 1998
P/N:PM0426
19
MX93521
COMMAND 28H
COMMAND 29H
COMMAND 2AH
COMMAND 2BH
COMMAND 2CH
FUNCTION : RECORD MSG
BBB = 000, 001, 010, 011, 100
RETURN : ACK2, MSGNUM_H, MSGNUM_L
RETURN : ACK1, FORMAT (VOCODER mode, FORMAT=81H when recording with new format)
(VOCODER mode, FORMAT=80H when recording with old format)
RETURN: ERR1, WHEN OUT OF FLASH MEMORY, CANNOT PERFORM RECORD
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
1
0
1
B
B
B
USER DATA #1
USER DATA #2
USER DATA #3
USER DATA #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 DATA
RECORD MESSAGE WITH 1 USER DATA 12H
RECORD MESSAGE WITH 2 USER DATA 12H, 34H
RECORD MESSAGE WITH 3 USER DATA 12H, 34H, 56H
RECORD MESSAGE WITH 4 USER DATA 12H, 34H, 56H, 78H
28H
29H
2AH
2BH
2CH
12H
12H
12H
12H
34H
34H
34H
56H
56H
78H
COMMAND 30H
COMMAND 31H
FUNCTION:
PLAY MESSAGE
RETURN:
ACK2, MSGNUM_H, MSGNUM_L, ACK0(Vocoder mode)
RETURN:
ERR2, No Message to play
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
1
1
0
0
0
1
M
M
M
M
M
M
M
M
LENGTH (sec / unit)
M=000H, PLAY TILL THE END OF MESSAGE
M=001H, PLAY CURRENT MESSAGE FOR 1 SEC
M=080H, PLAY CURRENT MESSAGE FOR 128 SEC OR REACH THE END OF MESSAGE
M=0FFH, PLAY CURRENT MESSAGE FOR 255 SEC OR REACH THE END OF MESSAGE
* When PLAY, MX93521 will not switch SPKR on automatically, HOST must turn on SPKR before PLAY and turn off
SPKR after PLAY STOP
SAMPLES:
PLAY MESSAGE TILL THE END OF MESSAGE
PLAY MESSAGE TILL THE END OF MESSAGE
PLAY FIRST 3 SEC OF CURRENT MESSAGE
30H
31H
31H
00H
03H
REV. 2.2, JAN 20, 1998
P/N:PM0426
20
MX93521
COMMAND 32H
FUNCTION:
Skip first M frames in the message with playback
RETURN:
ACK2,MSGNUM_H,MSGNUM_L
DB7
DB6
DB5
DB4
DB3
DB2
DB1
0
0
0
1
1
0
1
H
H
H
H
H
H
H
L
L
L
L
L
L
L
DB0
0
H
L
SAMPLES:
PLAY THIS MESSAGE WITH SKIP FIRST 200 ms
Frame number (Hi-byte)
Frame number (Lo-byte) , 20ms/unit
32H
00H
0AH
* This setting will be clear after play end of this message.
COMMAND 39H
FUNCTION:
JUMP TO MARK
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
1
1
1
0
0
1
D
M
M
M
M
M
M
M
D=0, FORWARD
D=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
mark#1
-
mark#2
-
Pos#A
mark#3
-
mark#4
-
Pos#B
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.
REV. 2.2, JAN 20, 1998
P/N:PM0426
21
MX93521
COMMAND 3AH
FUNCTION:
RETURN:
DB7
0
D
U
FAST FORWARD/BACKWARD PLAYING
ACK0
DB6
0
M
U
DB5
1
M
U
DB4
1
M
U
DB3
1
M
U
DB2
0
M
U
DB1
1
M
U
DB0
0
M
U
Unit Length (20ms/unit)
D=0, FORWARD
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, BACKWARD
M=01H, PLAY 1 UNIT, REWIND 1 UNIT (REPEAT SAME UNIT)
M=02H, PLAY 1 UNIT, REWIND 2 UNIT (1x SPEED REWIND)
M=03H, PLAY 1 UNIT, REWIND 3 UNIT (2x SPEED REWIND)
M=05H, PLAY 1 UNIT, REWIND 5 UNIT (4x SPEED REWIND)
..
M=7FH, PLAY 1 UNIT, REWIND 127 UNIT (126x SPEED)
SAMPLES:
NORMAL PLAYING
FORWARD TO THE 1ST FOUND MARK
REWIND TO THE 2ND FOUND MARK
NORMAL PLAYING
PLAY 20ms and SKIP 20ms (2x speed)
PLAY 20ms and REWIND 60ms (2x speed)
PLAY 40ms and SKIP 40ms
PLAY 100ms and SKIP 200ms
PLAY 100ms and REWIND 200ms
39H
39H
39H
3AH
3AH
3AH
3AH
3AH
3AH
00H
01H
82H
00H
01H
83H
01H
02H
82H
01H
01H
01H
02H
05H
05H
REV. 2.2, JAN 20, 1998
P/N:PM0426
22
MX93521
COMMAND 41H
FUNCTION:
MISC FUNCTION
RETURN:
DB7
DB6
DB5
DB4
0
1
0
0
M
M
M
M
M
01H
02H
03H
04H
05H
06H
07H
08H
09H
0AH
0BH4
0CH5
0DH5
10H1
11H2
12H
20H
40H
41H
42H
43H
44H
80H3
81H3
DB3
0
M
Function
Toggle VOCODER mode
Append Recording
Overwrite Recording
Toggle SPKR on/off
Voice Activated Recording DR-V4
Linear mode codec interface DR-V4
u-law mode codec interface DR-V4
Toggle MIC on/off
Play accross message boundary DR-V4
Play within message boundary DR-V4
Direct CODEC Access DR-V5
Old data format DR-V5
New data format DR-V5
Erase all message
Hard erase flash memory DR-V4
Reinitial flash memory
Check busy/Idle status
Check available block
Check total block DR-V4
Check available time DR-V4
Check total time DR-V4
Check message length DR-V4
Overrun counter
Get Message Checksum DR-V4
DB2
0
M
DB1
0
M
DB0
1
M
ACKOWLEDGE
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0 / ERR4
ACK2,BLKCNT_H, BLKCNT_L
ACK2,BLKCNT_H, BLKCNT_L
ACK2,MIN,SEC
ACK2,MIN,SEC
ACK2,MIN,SEC
ACK2,CNT_H,CNT_L
ACK2,CS_H,CS_L
REMARK
valid only when using TP3054
valid only when using TP3054
ack after erase complete
ack after erase complete
ack after erase complete
VOCODER mode
VOCODER mode
1
The command 41H/10H erase all data in good blocks. After block 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.
REV. 2.2, JAN 20, 1998
P/N:PM0426
23
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, we 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 VOCODER 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 disable 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. New data format is used in MX93521 V4 and
V5. New format supports silence compression. It is always set to use new data format in MX93521 V4. MX93521 V5
will reset to use new data format after power on, RECORD or PLAY. So, if HOST want to RECORD or PLAY 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 PLAY/RECORD MODE
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
1
0
0
0
1
0
H
H
H
H
H
H
H
H
Silence Frame number (Hi-byte)
L
L
L
L
L
L
L
L
Frame number (Lo-byte) , 20ms/unit
SAMPLES:
DETECT 500 ms SILENCE ON THE PLAY/RECORD MODE
42H
00H
19H
* 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 DR-V5
FUNCTION:
Tone Off
RETURN:
ACK0
DB7
DB6
DB5
0
1
0
DB4
0
DB3
1
DB2
0
DB1
0
DB0
0
Tone Off
COMMAND 49H
FUNCTION:
BEEP GENERATOR
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
0
1
0
0
1
0
C
C
C
C
C
G
CCCCC:
BEEP COUNT, MAXIMUM 31 BEEPS
DB1
0
G
DB0
1
G
1000Hz TONE (100ms on / 100ms off)
GAIN
REV. 2.2, JAN 20, 1998
P/N:PM0426
24
MX93521
COMMAND 4BH
FUNCTION:
RETURN:
DB7
0
L
F15
F7
GGG: 000
001
010
011
TONE GENERATOR
ACK0
DB6
DB5
DB4
1
0
0
L
L
L
F14
F13
F12
F6
F5
F4
GAIN= -18
dB,
GAIN= -24
dB,
GAIN= -30
dB,
GAIN= -36
dB,
DB3
1
L
F11
F3
DB2
0
G
F10
F2
100
101
110
111
DB1
1
G
F9
F1
GAIN= -42
GAIN= -48
GAIN= -56
GAIN= -62
DB0
1
G
F8
F0
dB
dB
dB
dB
DUAL TONE GENERATOR
ACK0
DB6
DB5
DB4
DB3
1
0
0
1
F14
F13
F12
F11
F6
F5
F4
F3
F14
F13
F12
F11
F6
F5
F4
F3
G1
G1
G1
G1
G2
G2
G2
G2
DB2
1
F10
F2
F10
F2
G1
G2
DB1
1
F9
F1
F9
F1
G1
G2
DB0
0
F8
F0
F8
F0
G1
G2
TONE#1 FREQ (HIGH BYTE)
TONE#1 FREQ (LOW BYTE)
TONE#2 FREQ (HIGH BYTE)
TONE#2 FREQ (LOW BYTE)
Scale for TONE#1
Scale for TONE#2
DB6
1
F14
F6
F14
F6
G1
G2
L
DB2
1
F10
F2
F10
F2
G1
G2
L
DB1
1
F9
F1
F9
F1
G1
G2
L
DB0
1
F8
F0
F8
F0
G1
G2
L
TONE#1 FREQ (HIGH BYTE)
TONE#1 FREQ (LOW BYTE)
TONE#2 FREQ (HIGH BYTE)
TONE#2 FREQ (LOW BYTE)
Scale for TONE#1
Scale for TONE#2
Length (10ms/unit)
TONE
LENGTH (100ms/unit) & GAIN
TONE FREQ (HIGH BYTE)
TONE FREQ (LOW BYTE)
COMMAND 4EH DR-V5
COMMAND 4FH DR-V5
FUNCTION:
RETURN:
DB7
0
F15
F7
F15
F7
G1
G2
DB7
0
F15
F7
F15
F7
G1
G2
L
DB5
0
F13
F5
F13
F5
G1
G2
L
DB4
0
F12
F4
F12
F4
G1
G2
L
DB3
1
F11
F3
F11
F3
G1
G2
L
REV. 2.2, JAN 20, 1998
P/N:PM0426
25
MX93521
F = (FREQ/8000)*65536
TONE (#)
FREQ (HZ)
C5
523.25
D5
587.33
E5
659.26
F5
698.46
G5
783.99
A5
880.00
B5
987.77
C6
1046.50
D6
1174.66
E6
1328.51
F6
1396.91
G6
1567.98
A6
1760.00
B6
1975.53
C7
2093.00
DTMF
1
2
3
A
4
5
6
B
7
8
9
C
*
0
#
D
F1 (Hz)
1209
1336
1477
1633
1209
1336
1477
1633
1209
1336
1477
1633
1209
1336
1477
1633
F1 (Dec)
9904.1
10944.5
12099.6
13377.5
9904.1
10944.5
12099.6
13377.5
9904.1
10944.5
12099.6
13377.5
9904.1
10944.5
12099.6
13377.5
F (DECIMAL)
4286.464
4811.407
5400.658
5721.784
6422.446
7208.960
8091.812
8572.928
9622.815
10883.154
11443.487
12844.892
14417.920
16183.542
17145.856
F (HEX)
10BEH
12CBH
1519H
165AH
1916H
1C29H
1F9CH
217DH
2597H
2A83H
2CB3H
322DH
3852H
3F38H
42FAH
F1 (Hex)
26B0H
2AC1H
2F44H
3442H
26B0H
2AC1H
2F44H
3442H
26B0H
2AC1H
2F44H
3442H
26B0H
2AC1H
2F44H
3442H
F2 (Hz)
697
697
697
697
770
770
770
770
852
852
852
852
941
941
941
941
F (HIGH)
10H
12H
15H
16H
19H
1CH
1FH
21H
25H
2AH
2CH
32H
38H
3FH
42H
F2 (Dec)
5709.8
5709.8
5709.8
5709.8
6307.8
6307.8
6307.8
6307.8
6979.6
6979.6
6979.6
6979.6
7708.7
7708.7
7708.7
7708.7
F (LOW)
BEH
CBH
19H
5AH
16H
29H
9CH
7DH
97H
83H
B3H
2DH
52H
38H
FAH
F2 (Hex)
164EH
164EH
164EH
164EH
18A4H
18A4H
18A4H
18A4H
1B44H
1B44H
1B44H
1B44H
1E1DH
1E1DH
1E1DH
1E1DH
*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
REV. 2.2, JAN 20, 1998
P/N:PM0426
26
MX93521
SAMPLES:
PLAY 2 BEEPS W/ -42DB GAIN
PLAY TONE #C5 (523HZ) W/ -36DB GAIN FOR 2 SECOND
PLAY TONE #E5 (659HZ) W/ -48DB GAIN FOR 1 SECOND
Play DTMF-1 (High tone is 6 dB higher than low tone)
Play DTMF-0 (High tone is 6 dB lower than low tone) 100ms
STOP PLAYING DTMF TONE
49H
4BH
4BH
4EH
4FH
48H
14H
A3H
55H
26H
2AH
10H
15H
B0H
C1H
BEH
19H
16H 4EH FFH 7FH
1EH 1DH 3FH 7FH 0AH
COMMAND 51H
FUNCTION:
WRITE OUTPUT PORT UO0-2
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
0
1
0
1
0
X
X
X
X
X
DB2
0
UO2
DB1
0
UO1
DB0
1
UO0
DB1
1
A1
D1
DB0
0
A0
D0
*CMD 51H is only available in version DR-V3 and DR-V4
COMMAND 5AH
FUNCTION:
RETURN:
DB7
0
X
D7
MX93000 CODEC MISC. FUNCTION
ACK0 or ERR7
DB6
DB5
DB4
DB3
DB2
1
0
1
1
0
X
X
X
X
A2
D6
D5
D4
D3
D2
*Please reference to MX93000 data sheet for the definition of the MX93000 registers
SAMPLES:
Turn on MX93000 MIC path
Turn off MX93000 MIC path
Set MIC to maxima gain
Set MIC to minima gain
Turn on MX93000 SPKR path
Turn off MX93000 SPKR path
Set SPKR to maxima gain
Set SPKR to minima gain
5AH
5AH
5AH
5AH
5AH
5AH
5AH
5AH
00H
00H
02H
02H
00H
00H
03H
03H
48H
01H
0FH
00H
03H
01H
00H
0FH
REV. 2.2, JAN 20, 1998
P/N:PM0426
27
MX93521
COMMAND 61H
FUNCTION:
LED DISPLAY FUNCTION
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
0
1
1
0
0
LED2
LED1
T
T
T
LED1=1,
LED2=1,
TTTTTT=0,
TTTTTT¹ 0,
DB2
0
T
DB1
0
T
DB0
1
T
LED1 ON (MX93521 PIN5 LOW)
LED2 ON (MX93521 PIN4 LOW)
NO FLASH
FLASH TIMER (64ms/unit)
SAMPLES:
LED1 STAY ON
LED2 STAY ON
LED1 FLASH (512ms ON / 512ms OFF)
LED2 FLASH (1024ms ON / 1024ms OFF)
LED1 & LED2 FLASH (128ms ON / 128ms OFF)
LED1 & LED2 OFF
61H
61H
61H
61H
61H
61H
40H
80H
48H
90H
C2H
00H
REV. 2.2, JAN 20, 1998
P/N:PM0426
28
MX93521
COMMAND 6AH
COMMAND 6CH
COMMAND 6EH
FUNCTION:
WRITE COMPRESSED VOICE DATA TO MX93521 FOR PLAYING (VOCODER mode)
RETURN:
ACK0 / ERR5
BBB = 010, 100, 110
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
1
1
0
1
B
B
B
WRITE DATA TO 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 PLAY function. Once PLAY BUFFER have no enough data to play, 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 PLAY 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 Voice 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 play out data in PLAY BUFFER (receiveing command 10H from MX93521)
STEP7: Turn off SPKR
STEP8: Turn off VOCODER mode (send command 41H/01H).
REV. 2.2, JAN 20, 1998
P/N:PM0426
29
MX93521
COMMAND 70H
COMMAND 71H
COMMAND 72H
COMMAND 73H
COMMAND 74H
COMMAND 75H
COMMAND 76H
COMMAND 77H
FUNCTION:
WRITE LCD DATA
BBB = 000, 001, 010, 011, 100, 101, 110, 111
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
0
1
1
1
0
DB2
B
DB1
B
DB0
B
LCD DATA
BYTE#1
BYTE#2
BYTE#3
BYTE#4
BYTE#5
BYTE#6
BYTE#7
* THIS COMMAND ONLY VALID WHEN MX93521 SET TO SERIAL INTERFACE MODE
SAMPLES:
DISPLAY [ABCD] ON LCD LINE 1
74H
41H
42H
43H
44H
COMMAND 79H
FUNCTION:
RETURN:
DB7
0
C7
WRITE LCD COMMAND
ACK0
DB6
1
C6
DB5
1
C5
DB4
1
C4
DB3
1
C3
DB2
0
C2
DB1
0
C1
DB0
1
C0
* THIS COMMAND ONLY VALID WHEN MX93521 SET TO SERIAL INTERFACE MODE
REV. 2.2, JAN 20, 1998
P/N:PM0426
30
MX93521
LCD COMMAND SET:
C7
C6
C5
C4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
1
X
X
X
1
0
0
0
1
1
0
0
C3
0
0
0
0
0
0
1
1
1
1
1
0
0
1
1
X
0
0
C2
0
0
1
1
1
1
0
1
1
1
1
0
1
0
1
X
0
0
C1
0
1
0
0
1
1
0
0
0
1
1
X
X
X
X
X
0
0
C0
1
X
0
1
0
1
0
0
1
0
1
X
X
X
X
X
0
0
01H
02H
04H
05H
06H
07H
08H
0CH
0DH
0EH
0FH
10H
14H
18H
1CH
80H-FFH
80H
C0H
Clear Display
Cursor return Home
Cursor-1, no shift
Cursor-1, shift
Cursor+1, no shift
Cursor+1, shift
Display off
Display on, Cursor off, Blink off
Display on, Cursor off, Blink on
Display on, Cursor on, Blink off
Display on, Cursor on, Blink on
Move Cursor left
Move Cursor right
Display shift left
Display shift right
Set DD RAM address
Set cursor to the start of 1st line
Set cursor to the start of 2nd line
SAMPLES:
CLEAR LCD DISPLAY
SET CURSOR TO THE START OF LINE 1
SET CURSOR TO THE START OF LINE 2
SET CURSOR TO THE LINE 2, 3RD COLUMN
MOVE CURSOR LEFT
MOVE CURSOR RIGHT
EXAMPLE:
To Display [RECORD ] at line #1 & [MM:SS] at line #2
CLEAR LCD DISPLAY & RETURN CURSOR TO HOME
DISPLAY [RECORD ] AT LCD LINE 1
SET CURSOR TO THE LINE 2, 4TH COLUMN
TURN ON COUNTER DISPLAY ON LCD
79H
76H
79H
21H
01H
52H
C3H
04H
79H
79H
79H
79H
79H
79H
01H
80H
C0H
C2H
10H
14H
45H 43H
4FH 52H
44H
REV. 2.2, JAN 20, 1998
P/N:PM0426
31
MX93521
COMMAND 80H
FUNCTION:
Request for RECORD/PLAY counter
RETURN:
ACK2, MINUTE, SECOND
DB7
DB6
DB5
DB4
DB3
DB2
1
0
0
0
0
0
DB1
0
DB0
0
FUNCTION:
Request for continuously RECORD/PLAY counter
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
DB1
1
0
0
0
0
0
0
T
T
T
T
T
T
T
DB0
1
T
COMMAND 81H
128 ms/unit
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/PLAY stop.
COMMAND 88H DR-V4
FUNCTION: Download Message
RETURN: ACK1, FORMAT
DB7
1
DB6
0
DB5
0
(VOCODER mode, FORMAT=81H if message is recorded with new format)
(VOCODER mode, FORMAT=80H if message is recorded with old format)
DB4
DB3
DB2
DB1
DB0
0
1
0
0
0
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 Checksum is calculated by EXCLUSIVE OR
all speech data in word format.
COMMAND 89H DR-V5
FUNCTION:
Upload Message (Vocoder mode)
RETURN:
ACK2, MSGNUM_H, MSGNUM_L(Upload start) / ACK2, Checksum_H, checksum_L(Upload End)
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
1
0
0
0
1
0
0
1
m
m
m
m
m
m
m
m
m=00H, Upload Start
m=01H, Upload End
COMMAND 8AH DR-V5
FUNCTION:
RETURN:
DB7
1
D
D
Upload Data
ACK0
DB6
DB5
0
0
D
D
D
D
DB4
0
D
D
DB3
1
D
D
DB2
0
D
D
DB1
1
D
D
DB0
0
D
D
High Byte
Low Byte
REV. 2.2, JAN 20, 1998
P/N:PM0426
32
MX93521
COMMAND 8CH DR-V5
FUNCTION:
Upload Data
RETURN:
ACK0
DB7
DB6
DB5
1
0
0
D
D
D
D
D
D
D
D
D
D
D
D
DB4
0
D
D
D
D
DB3
1
D
D
D
D
DB2
1
D
D
D
D
DB1
0
D
D
D
D
DB0
0
D
D
D
D
High Byte
Low Byte
High Byte
Low Byte
DB4
0
D
D
D
D
D
D
DB3
1
D
D
D
D
D
D
DB2
1
D
D
D
D
D
D
DB1
1
D
D
D
D
D
D
DB0
0
D
D
D
D
D
D
High Byte
Low Byte
High Byte
Low Byte
High Byte
Low Byte
FUNCTION:
Set Silence Level
RETURN:
ACK0
DB7
DB6
DB5
DB4
1
0
0
1
x
x
x
x
DB3
0
L
DB2
0
L
DB1
0
L
DB0
1
L
Level
COMMAND 8EH DR-V5
FUNCTION:
Upload Data
RETURN:
ACK0
DB7
DB6
DB5
1
0
0
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
COMMAND 91H DR-V4
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 DR-V5
FUNCTION:
Read ROM/RAM wait state setting
RETURN:
ACK2, WSTH,WSTL
DB7
DB6
DB5
DB4
DB3
DB2
1
0
0
1
0
0
DB1
0
DB0
0
REV. 2.2, JAN 20, 1998
P/N:PM0426
33
MX93521
COMMAND 99H DR-V5
FUNCTION:
Set ROM/RAM wait state
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
1
0
0
1
0
0
O
O
O
O
A
A
OOOO: RAM Wait State
AAAA: ROM Wait State
DB1
0
A
DB0
1
A
DB1
1
DB0
0
Wait State
COMMAND A2H DR-V4
FUNCTION:
Read MX93521 RAM
RETURN:
ACK2, DATA_H, DATA_L
DB7
DB6
DB5
DB4
DB3
1
1
0
1
0
DB2
0
Address (High)
Address (Low)
COMMAND A4H DR-V4
FUNCTION:
Write MX93521 RAM
RETURN:
ACK0
DB7
DB6
DB5
DB4
1
1
0
1
DB3
0
DB2
1
DB1
0
DB0
0
Address (High)
Address (Low)
Data (High)
Data (Low)
* Only for testing purpose, user should not change any data in the RAM area
COMMAND AAH DR-V5
FUNCTION:
Read MX93521 internal ROM
RETURN:
ACK2, DATA_H, DATA_L
DB7
DB6
DB5
DB4
DB3
1
1
0
1
0
DB2
0
DB1
1
DB0
0
Address (High)
Address (Low)
REV. 2.2, JAN 20, 1998
P/N:PM0426
34
MX93521
COMMAND B0H DR-V4
FUNCTION:
Output all blocks which are used as data bank block
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
1
0
1
1
0
0
0
0
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 DR-V4
FUNCTION:
Read Flash Memory
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
1
0
1
1
0
DB2
0
DB1
0
DB0
1
Counter (read 1-255 byte from flash memory)
COMMAND B2H DR-V4
FUNCTION:
Read Flash Memory
RETURN:
ACK0
DB7 DB6
DB5
DB4 DB3
1
0
1
1
0
DB2
0
DB1
1
DB0
0
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 byte read. HOST could send another continuous read
command 0B1H or 0B2H to read out following data from flash memory.
COMMAND B8H DR-V4
FUNCTION:
Request for data bank block
RETURN:
ACK2, BLK_H, BLK_L
DB7
DB6
DB5
DB4
DB3
1
0
1
1
1
DB2
0
DB1
0
DB0
0
REV. 2.2, JAN 20, 1998
P/N:PM0426
35
MX93521
COMMAND BAH DR-V4
FUNCTION:
Set read/write starting address
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
1
0
1
1
1
0
DB1
1
DB0
0
Address Pointer (High)
Address Pointer (Low)
COMMAND BCH DR-V4
FUNCTION:
Set read/write starting address
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
1
0
1
1
1
1
DB1
0
DB0
0
Block Number (High)
Block Number (Low)
Address Pointer (High)
Address Pointer (Low)
COMMAND C1H DR-V4
COMMAND C2H DR-V4
COMMAND C3H DR-V4
COMMAND C4H DR-V4
COMMAND C5H DR-V4
COMMAND C6H DR-V4
COMMAND C7H DR-V4
FUNCTION:
Write data to flash memory(Data Bank)
RETURN:
ACK0 or ERR0 (Block number or address pointer is not accepted)
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
1
1
0
0
0
B
B
B
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
REV. 2.2, JAN 20, 1998
P/N:PM0426
36
MX93521
COMMAND CAH DR-V4
FUNCTION:
Erase Block (Release data block)
RETURN:
ACK0 or ERR0
DB7
DB6
DB5
DB4
DB3
DB2
1
1
0
0
1
0
DB1
1
DB0
0
Block (High)
Block (Low)
COMMAND D4H DR-V4
FUNCTION:
Read 1 word data from flash memory
RETURN:
ACK2, DATA_H, DATA_L
DB7
DB6
DB5
DB4
DB3
DB2
DB1
1
1
0
1
0
1
0
DB0
0
Block (High)
Block (Low)
Address (High)
Address (Low)
COMMAND D5H DR-V4
FUNCTION:
Write 1 byte data to flash memory
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
1
1
0
1
0
1
DB1
0
DB0
1
Block (High)
Block (Low)
Address (High)
Address (Low)
Data
COMMAND D6H DR-V4
FUNCTION:
Write 1 word (2 bytes) data to flash memory
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
1
1
0
1
0
1
0
1
Block (High)
Block (Low)
Address (High)
Address (Low)
Data (High)
Data (Low)
REV. 2.2, JAN 20, 1998
P/N:PM0426
37
MX93521
COMMAND FAH DR-V5
FUNCTION:
Play Voice Prompt From ROM
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
1
1
1
1
1
0
DB1
0
DB0
1
Voice Prompt ROM Starting address High Byte
Voice Prompt ROM Starting address Low Byte
COMMAND FCH DR-V5
FUNCTION:
Play Voice Prompt from FLASH memory
RETURN:
ACK0
DB7
DB6
DB5
DB4
DB3
DB2
DB1
1
1
1
1
1
0
0
DB0
1
Flash Memory Block # (High Byte)
Flash Memory Block # (Low Byte)
Flash Memory Pointer (High Byte)
Flash Memory Pointer (Low Byte)
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 playing 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.
REV. 2.2, JAN 20, 1998
P/N:PM0426
38
MX93521
6.4 MX93521 TO HOST COMMANDS
MX93521 will always respond a ACK 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
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
0
1
0
0
0
0
COMMAND 18H
FUNCTION:
Play mode, Reach the start of the playing message
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
0
1
1
0
0
0
COMMAND 20H
FUNCTION:
Record mode, out of flash memory
DB7
DB6
DB5
DB4
DB3
DB2
0
0
1
0
0
0
DB1
0
DB0
0
COMMAND 42H
FUNCTION:
MX93521 outputs record / play counter
DB7
DB6
DB5
DB4
DB3
DB2
DB1
0
1
0
0
0
0
1
M
M
M
M
M
M
M
S
S
S
S
S
S
S
DB0
0
M
Minute
S
Second
COMMAND 52H DR-V4
FUNCTION:
MX93521 outputs Message Number
DB7
DB6
DB5
DB4
DB3
DB2
DB1
0
1
0
1
0
0
1
DB0
0
Message number (high byte)
Message number (low byte)
REV. 2.2, JAN 20, 1998
P/N:PM0426
39
MX93521
COMMAND 30H DR-V4
COMMAND 31H DR-V4
COMMAND 32H
COMMAND 33H DR-V4
COMMAND 34H DR-V4
COMMAND 35H DR-V4
COMMAND 36H
COMMAND 37H DR-V4
FUNCTION:
MX93521 outputs data with command 3XH and ending the function with command 30H
COMMAND 32H
FUNCTION:
Vocoder record mode, MX93521 outputs compressed voice data (silence frame)
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
1
1
0
0
1
0
BYTE #1
BYTE #2
COMMAND 36H
FUNCTION:
Vocoder record mode, MX93521 outputs compressed voice data (speech frame)
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
0
0
1
1
0
1
1
0
BYTE #1
BYTE #2
BYTE #3
BYTE #4
BYTE #5
BYTE #6
When in VOCODER mode, MX93521 use this command to send compressed voice data to HOST.
MX93521 equipped with 64 byte buffer internally. If buffer is full, data will be discarded.
REV. 2.2, JAN 20, 1998
P/N:PM0426
40
MX93521
7. DC Characteristics¡GTA=0 to 70°C , VCC=5V±10¢H
Storage temperature range¡G-55° C - 150°C
SYMBOL
PARAMETER
VCC
supply voltage
GND
ground
TTL LEVEL INPUT(IT)
VIH
Input high voltage
VIL
Input low voltage
SCHMITT TRIGGER INPUT (IS)
VIH
Input high voltage
VIL
Input low voltage
8mA OUTPUT (OA)
VOH
Onput high voltage
VOL
Onput low voltage
16mA OUTPUT (OB)
VOH
Onput high voltage
VOL
Onput low voltage
SUPPLY CERRENT
ICC
NORMAL
ICC
HOLD MODE
ICC
POWER DOWN
CONDITION
MIN
4.5
TYP
5.0
0
MAX
5.5
2.0
0.8
V
V
0.3*VCC
V
V
0.4
V
0.4
V
V
0.7*VCC
IOH=-8mA
IOL=8mA
2.4
IOH=-16mA
IOL=16mA
2.4
45
10
3
UNIT
Volt
Volt
70
6
mA
mA
mA
REV. 2.2, JAN 20, 1998
P/N:PM0426
41
MX93521
8.AC TIMING AND CHARACTERISTICS:
RESET TIMING
Tw(rst)
RST\
EAD15~EAD0
PC=0000
0001
ED15~ED0
valid
CONTROL
SIGNALS
valid
(inactive)
OPT18~OPT0
0000
BIO7~BIO0
Note: Control Signals
HOLDA\EDCE\EPCE\ERD\EWR\
CAS\RAS\DRD\DWR\
SYMBOL
Tw(rst)
PARAMETER
Reset low pulse width
MIN
NOM
2*46.5ns
MAX
UNIT
MAX
10
UNIT
ns
OUTPUT PORT TIMING
AD15-AD0
EAD15-EAD0
PC=N, SXF/RXF
or OUT XX
PC=N+1
PC=N+2
Td(a-o)
OPT18~OPT0
BIO7~BIO0
XF\
OUTPUT PORTS AND EXTERNAL FLAG(XF\) TIMING
SYMBOL
Td(a-o)
PARAMETER
Address to output ports delay time
MIN
0
NOM
REV. 2.2, JAN 20, 1998
P/N:PM0426
42
MX93521
CODEC TRANSMIT AND RECEIVE TIMING
Tc
Thpd
CMCK
Td(ch-fs)
Td(ch-fs)
Tlpd
Th(dr)
CFS
Ts(dr)
CDR0
N=1
N=2
N=3
N=4
SAMPLING 16 BITS
N=2
N=3
N=4
TRANSMIT 16 BITS
Td(ch-dx)
CDX0
SYMBOL
Tc
Tlpd
Thpd
Td(ch-fs)
Td(ch-dx)
Ts(dr)
Th(dr)
N=1
PARAMETER
CMCK cycle time
CMCK low pulse duration
CMCK high pulse duration
CMCK to CFS delay time
CMCK rising edge to Dx valid
DR set-up time before CMCK falling edge
DR hold time before CMCK falling edge
MIN
NOM
650
315
315
MAX
335
335
20
10
10
10
UNIT
ns
ns
ns
ns
ns
ns
ns
INTERRUPT TIMING
Tw
INT0\
INT1\
INT2\
AD15-AD0
SYMBOL
Tw
fetch N+0
fetch N+1
fetch N+1
PARAMETER
INT\ low pulse duration
fetch N+1
MIN
3Q*
fetch I
NOM
MAX
UNIT
ns
NOTE:Q=15.5 ns
REV. 2.2, JAN 20, 1998
P/N:PM0426
43
MX93521
SRAM/ROM READ TIMING
TCS
EDCE\,EPCE\
TAA
EAD15-EAD0
ERD\
TOH
TDR
ED15-ED0
DATA IN
SRAM WRITE TIMING
EDCE\
EAD15-EAD0
TAS
TWR
EWR\
TDH
TDW
DATA OUT
ED15-ED0
SYMBOL
TCS
TAA
TDR
TOH
TAS
TDW
TDH
TWR
PARAMETER
Chip select access time
Address access time
Data read setup time
Data hold from end of read
Address setup time
Data to EWR\ low overlap
Data hold from end of write
Write recovery time
MIN
12
0
0
0
0
NOM
MAX
26.5+WxT
26.5+WxT
5
12
UNIT
ns
ns
ns
ns
ns
ns
ns
ns
*NOTE: T=31ns
W:Wait state number
REV. 2.2, JAN 20, 1998
P/N:PM0426
44
MX93521
HOLD TIMING
EAD15-EAD0
N
N+1
N+2
N+3
N+4
Ten(ah-a)
ED15-ED0
EPCE\
EDCE\
EWR\
ERD\
Ts(a-h)
Td(hh-ha)
HOLD\
HOLDA\
SYMBOL
Ts(a-h)
Td(hh-ha)
Ten(ah-a)
PARAMETER
Address set-up time before HOLD\ low
HOLD\ high to HOLDA\ high
Address driven after HOLDA\ high
MIN
5
0
1Q-10
NOM
1Q
1Q
MAX
3Q-10
1Q+10
2Q
UNIT
ns
ns
ns
*NOTE: Q=15.5n
REV. 2.2, JAN 20, 1998
P/N:PM0426
45
MX93521
9.PACKAGE INFORMATION
100-PIN LQFP
ITEM
MILLIMETERS
INCHES
A
A
16.00 ± .05
.630 ± .002
B
B
14.00 ± .05
.551 ± .002
C
14.00 ± .05
.551 ± .002
D
16.00 ± .05
.630 ± .002
E
12.00 [REF]
.472 [REF]
F
.60 [REF]
.024 [REF]
G
.60 [REF]
.024 [REF]
H
.16 [Typ.]
.006 [Typ.]
I
.50 [Typ.]
.020 [Typ.]
J
1.00 [Typ.]
.039 [Typ.]
K
0.60 [Typ.]
.024 [Typ.]
L
.25 [Typ.]
.010 [Typ.]
M
.10 max.
.004 max.
N
1.4 ± .05
.055
O
.10 min.
.004 min.
P
1.50 max.
.059 max.
75
76
51
50
E
D
26
25
100
1
F
C
P
O
G
H
I
J
N
L
M
NOTE: Each lead centerline is located within
.25mm[.01 inch] of its true position [TP] at a
maximum material condition.
K
100-PIN PQFP
ITEM
MILLIMETERS
INCHES
A
A
24.80 ± .40
.976 ± .016
B
B
20.00 ± .13
.787 ± .005
C
14.00 ± .13
.551 ± .005
D
18.80 ± .40
.740 ± .016
E
12.35 [REF]
.486 [REF]
F
.83 [REF]
.033 [REF]
G
.58 [REF]
.023 [REF]
H
.30 [Typ.]
.012 [Typ.]
I
.65 [Typ.]
.026 [Typ.]
J
2.40 [Typ.]
.094 [Typ.]
K
1.20 [Typ.]
.047 [Typ.]
L
.15 [Typ.]
.006 [Typ.]
M
.10 max.
.004 max.
N
2.75 ± .15
.018 ± .006
O
.10 min.
.004 min.
P
3.30 max.
.103 max.
80
81
51
50
E
F
31
30
100
1
C
D
P
O
G
H
I
J
N
L
M
K
NOTE: Each lead centerline is located within
.25mm[.01 inch] of its true position [TP] at a
maximum material condition.
REV. 2.2, JAN 20, 1998
P/N:PM0426
46
MX93521
10. Ordering Information
PART NO.
MX93521FC
MX93521UC
PACKAGE
PQFP
LQFP
MX
93
521
?
MXIC
COMPANY
PREFIX
C
COMMERCIAL
0-70oC
PACKAGE TYPE
F: PQFP, U: LQFP
FAMILY
PREFIX
PRODUCT NUMBER
Appendix 1. New added Features Compared with DR-V4
New features in dr-v5
1.Support both format used in v3 (without silence compression) and v4 (with silence compression)
2.Add version number and date information at rom address 10h-13h
3.Add direct codec accessing function
4.Add command 0AH (point to specific message)
5.Add DTMF tone generator
6.Add upload message from host to mx93521 function
7.Add command 99H (change rom/ram wait state)
8.Add play voice prompt from flash memory function
9.Change silence threshold setting
New features in dr-v6
1.Add silence detection function
2.New codec.asm that improve tone response
3.Add safe_chip_erase function (erase only good blocks)
4.Improve find_empty_blk subroutine
5.Add skip frames function in play mode
REV. 2.2, JAN 20, 1998
P/N:PM0426
47
MX93521
Appendix 2. Sample Flow Chart for HOST to Implement uP Serial Interface
call SND_RCVD_CMD ( ) every 50 usec
BYTE:
NIBBLE;
SEND_RCVD_CMD( )
txdata, cmdout[0..7]
txdata, cmdin[0..7]
tbcnt, txcnt
tbcnt, rxcnt
BIT:
YES
data2snd, clk, obit
NO
SCLK low?
DA\ low?
set SCLK high
YES
clk=1
obit=SOUT
clk=0
RETURN
NO
YES
tbcnt==0?
rbcnt==9?
NO
data2snd==0?
NO
YES
YES
rbcnt==0?
stop bit
error
obit==0?
YES
NO
txdata=cmdout[0]
tbcnt=10
NO
obit==0?
obit=0
tbcnt==10?
YES
data bit
rxdata>>=1
rxdata=(obit<<7)
cmdin[rxcnt]=rxdata
rbcent=0
rxdata=0
YES
rbcnt ++
YES
rxcnt==
(cmdin[0] & 7)
NO
YES
tbcnt==1?
NO
rxcnt==0?
obit=1
YES
txdata.0==0?
YES
YES
txdata.0==0?
rxcnt=0
rxdata=0
rbcnt=0
(cmdin[0] & 0xf0)
==0xe0?
NO
obit=1
txcnt++
txdata=cmdout [txcnt]
tbcnt
data2snd=0
decode_cmd( )
rxcent=0
txcnt=0
txdata>>=1
rxcnt ++
tbcnt-Received a complete Command from MX93521.
Precess command which is stored in cmdin[0:7]
NO
YES
CLK==1?
obit==1?
YES
NO
SIN high
To send command to MX93521:
Load command to cmdout[0:7]
set SCLK low
SIN low
RETURN
clk=1
then set data2snd=1
After sending out all commands,
dats2snd will be cleared to 0.
REV. 2.2, JAN 20, 1998
P/N:PM0426
48
MX93521
Appendix 3. Recommend commands sequence to implement a digital recorder
(star* means function is optional)
A3.1 Record Message (TP3054):
Functions
*
Turn on SPKR
*
Beep
*
Turn off SPKR
Turn on MIC
*
LED #1 flash
*
Append Recording
*
Overwrite Recording
*
Turn on Voice Activated Mode
Start to Record
*
Clear LCD
*
Display [RECORD] on LCD
*
Move cursor to line #2, col #3
*
Turn on message counter display on LCD
A3.2 Stop Recording (TP3054):
Functions
Stop Recording
Turn off MIC
*
LED #1 off
*
Turn on SPKR
*
Beep
*
Turn off SPKR
HOST send
41H/04H
49H/0AH
41H/04H
41H/08H
61H/48H
41H/02H
41H/03H
41H/05H
28H
79H/01H
76H/52H/45H/43H/4FH/52H/44H
79H/C3H
21H/04H
HOST send
21H/01H
41H/08H
61H/00H
41H/04H
49H/0AH
41H/04H
MX93521 Acknowledge
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK0
ACK2,MSG#_H,MSG#_L
ACK0
ACK0
ACK0
ACK0
MX93521 Acknowledge
ACK2,CHKSUM_H, CHKSUM_L
ACK0
ACK0
ACK0
ACK0
ACK0
A3.3 Out of Memory, Received command 20H from MX93521 during Recording (TP3054):
Functions
HOST send
MX93521 Acknowledge
Turn off MIC
41H/08H
ACK0
*
LED #1 off
61H/00H
ACK0
*
Turn on SPKR
41H/04H
ACK0
*
Beep
49H/0AH
ACK0
*
Turn off SPKR
41H/04H
ACK0
REV. 2.2, JAN 20, 1998
P/N:PM0426
49
MX93521
A3.4 Play Message (TP3054):
Functions
Move message pointer to specific message
Turn on SPKR
* Beep
* LED #2 flash
Start to Play
* Send msg counter to HOST every 512 ms
* Clear LCD
* Display [PLAY] on LCD
* Move cursor to line #2, col #3
* Turn on message counter display on LCD
HOST send
09H/xxH
41H/04H
49H/0AH
61H/88H
30H
81H/04H
79H/01H
74H/50H/4CH/41H/59H
79H/C3H
21H/04H
MX93521 Acknowledge
ACK0/ERR6
ACK0
ACK0
ACK0
ACK2,MSG#_H,MSG#_L
ACK0
ACK0
ACK0
ACK0
ACK0
A3.5 Function During Playing Message
Functions
*
Fast Forward Playing (2x)
*
Rewind Playing (2x)
*
Set REPEAT start point
*
Set REPEAT end point
*
Disable REPEAT mode
HOST send
3AH/01H/01H
3AH/81H/01H
21H/10H
21H/20H
21H/40H
MX93521 Acknowledge
ACK0
ACK0
ACK0
ACK0
ACK0
A3.6 Stop Playing Message (TP3054):
Functions
Stop Playing
*
LED #2 off
*
Beep
Turn off SPKR
HOST send
21H/01H
61H/00H
49H/0AH
41H/04H
MX93521 Acknowledge
ACK0
ACK0
ACK0
ACK0
A3.7 End of Message, Received command 10H from MX93521 during Playing (TP3054):
*
*
Functions
LED #2 off
Beep
Turn off SPKR
HOST send
61H/00H
49H/0AH
41H/04H
MX93521 Acknowledge
ACK0
ACK0
ACK0
REV. 2.2, JAN 20, 1998
P/N:PM0426
50
MX93521
A3.8 Message Search
1
2
3
4
5
6
7
Functions
Turn on SPKR
Move message pointer to the 1st msg
Play current message for 3 second
HOST send
41H/04H
09H/FFH
31H/03H
Move message pointer to the next message
if received ACK0, goto Step #3
if received ERR6, goto Step #7
Turn off SPKR
09H/01H
MX93521 Acknowledge
ACK0
ACK0/ERR6
ACK0
10H
ACK0/ERR6
41H/04H
ACK0
A3.9 Message Found
1
2
3
Functions
Stop playing
Play current message
Turn off SPKR
HOST send
21H/01H
30H
41H/04H
MX93521 Acknowledge
ACK0
ACK0
ACK0
REV. 2.2, JAN 20, 1998
P/N:PM0426
51
MX93521
A3.10 The procedure for using flash memory as data bank memory
1
Request a empty block to be used
HOST SEND
MX93521 RESPONSE
0B8H
0A2H, BLK_H, BLK_L
as data block
2
Set continuous read start address
0BCH, BLK_H, BLK_L, ADR_H, ADR_L
0A0H
3
Continuous Read 20 bytes
0B1H, 14H
0A0H
037H,D1,D2,D3,D4,D5,D6,D7
037H,D1,D2,D3,D4,D5,D6,D7
036H,D1,D2,D3,D4,D5,D6
030H
Continuous Read 298 bytes
0B2H, 01H,2AH
0A0H
037H,D1,D2,D3,D4,D5,D6,D7
037H,D1,D2,D3,D4,D5,D6,D7
......
034H,D1,D2,D3,D4
030H
4
Continuous Write 7 bytes
0C7H,D1,D2,D3,D4,D5,D6,D7
0A0H
Continuous Write 6 bytes
0C6H,D1,D2,D3,D4,D5,D6
0A0H
Continuous Write 5 bytes
0C5H,D1,D2,D3,D4,D5
0A0H
Continuous Write 4 bytes
0C4H,D1,D2,D3,D4
0A0H
Continuous Write 3 bytes
0C3H,D1,D2,D3
0A0H
Continuous Write 2 bytes
0C2H,D1,D2
0A0H
Continuous Write 1 bytes
0C1H,D1
0A0H
5
Erase Block
CAH, BLK_H, BLK_L
0A0H
6
Read 1 word from flash memory
0D4H, BLK_H, BLK_L, ADR_H, ADR_L
7
Write 1 byte to flash memory
0D5H, BLK_H, BLK_L, ADR_H, ADR_L, D1 0A0H
8
Write 2 bytes to flash memory
0D6H, BLK_H, BLK_L, ADR_H, ADR_L, D1, 0A0H
0A2H, DATA1, DATA2
D2
Each block in flash memory is 4K byte. The first 16 bytes are reserved for MX93521 as data link data, HOST could
read but could not write data to it. So, the host usable data are from address 10H-0FFFH.
REV. 2.2, JAN 20, 1998
P/N:PM0426
52
MX93521
Appendix 4. Flow Chart of using MX93521 in VOCODER mode (Parallel Interface)
A4.1 Record mode (Background)
RECORD
RESET MX93521
[BIT]
WAIT4ACK=1
RCVD=DATA2SND=0
STOP1=STOP2=0
PAUSE1=PAUSE2=0
END_OF_REC=0
[BYTE]
TXCNT=RXCNT=0
NO
WAIT4ACK==0?
YES
WAIT4ACK==0?
YES
TOGGLE PAUSE?
NO
PAUSE1=WATI4ACK=1
NO
YES
[VOCODER MODE ON]
CMDOUT[0]=0x41
CMOUT[1]=0x01
DATA2SND=WAIT4ACK=1
YES
STOP RECORDING?
PAUSE1=WATI4ACK=1
NO
WAIT4ACK==0?
NO
NO
END_OF_REC==1?
YES
[MIC ON]
CMDOUT[0]=0x5A
CMDOUT[1]=0x00
CMDOUT[2]=0x48
DATA2SND=WAIT4ACK=1
YES
[VOCODER MODE OFF]
CMDOUT[0]=0x41
CMDOUT[1]=0x01
DATA2SND=WAIT4ACK=1
Wait 10 msec for MX93000 to settle
WAIT4ACK==0?
WAIT4ACK==0?
NO
YES
YES
RETURN
[SET MIC GAIN]
CMDOUT[0]=0x5A
CMDOUT[1]=0x02
CMDOUT[2]=0x04
DATA2SND=WAIT4ACK=1
WAIT4ACK==0?
NO
NO
YES
[START TO RECORD]
CMDOUT[0]=0x28
DATA2SND=WAIT4ACK=1
REV. 2.2, JAN 20, 1998
P/N:PM0426
53
MX93521
A4.2 Play mode (Background)
PLAY
RESET MX93521
[BIT]
WAIT4ACK=1
RCVD=DATA2SND=0
[BYTE]
TXCNT=RXCNT=0
YES
RCVD==1?
NO
YES
WAIT4ACK==0?
CMDIN[0]==0x10?
NO
YES
YES
[VOCODER MODE ON]
CMDOUT[0]=0x41
CMOUT[1]=0x01
DATA2SND=WAIT4ACK=1
NO
WAT4ACK==0?
YES
WAIT4ACK==0?
NO
CMDIN[0]==0xA0?
YES
NO
NO
YES
CMDIN[0]==0xE5?
[SPEAKER ON]
CMDOUT[0]=0x5A
CMDOUT[1]=0x00
CMDOUT[2]=0x03
DATA2SND=WAIT4ACK=1
YES
[MX93521 BUSY]
[RESEND PREVIOUS DATA]
DELAY 2 msec
DATA2SND=WAIT4ACK=1
Wait 10 msec for MX93000 to settle
CMDIN[0]==0xA0?
WAIT4ACK==0?
NO
(LOAD DATA FROM MEMORY TO BYTE[0..5])
(LOAD NO MORE THAN 6 BYTES AT A TIME)
(BYTECNT=BYTES LOADED)
YES
[SET SPKR GAIN]
CMDOUT[0]=0x5A
CMDOUT[1]=0x03
CMDOUT[2]=0x05
DATA2SND=WAIT4ACK=1
CMDOUT[0]=0x68+BYTECNT
FOR (i=0; i<BYTECNT;i++)
Wait 10 msec for MX93000 to settle
[VOCODER MODE OFF]
CMDOUT[0]=0x41
CMDOUT[1]=0x01
DATA2SND=WAIT4ACK=1
WAIT4ACK==0?
NO
YES
WAIT4ACK==0?
[START TO RECORD]
CMDOUT[0]=0x30
DATA2SND=WAIT4ACK=1
NO
YES
RETURN
REV. 2.2, JAN 20, 1998
P/N:PM0426
54
MX93521
A4.3 Command/Data Send/Receive Handling Routine (Interrupt)
INTERRUPT
NO
PACK\ = LOW?
YES
[READ DATA FROM MX93521]
RXDATA[7..0]=BIO[7..0]
YES
STOP2==1?
NO
YES
STOP1==1?
[WRITE CMD TO MX93521]
BIO=0x21
STOP2=1
NO
[WRITE CMD TO MX93521]
BIO=0x01
STOP1=STOP2=1
CMDIN[RXCNT]=RXDATA
DATA2SND==1?
NO
RXCNT==
CMDIN[0]& 0x7 ?
NO
YES
YES
[WRITE DATA TO MX93521
BIO=CMDOUT[TXCNT]
(RXCNT==0) &&
(CMDIN[0] &0xF0
==0xE0?
NO
TXCNT==
CMDOUT[0] & 0x7 ?
DECODE_CMD ( )
RXCNT=0
NO
RXCNT++
YES
TXCNT=0
DATA2SND=0
TXCNT++
RETURN
REV. 2.2, JAN 20, 1998
P/N:PM0426
55
MX93521
A4.4 Received Command Interpretation Routine (Interrupt)
DECODE_CMD ( )
CMDIN[0]==0x36?
YES
NO
CMDIN[0]==0x32?
YES
NO
[WRITE DATA TO MEMORY}
BYTECNT=CMDIN{0} & 0x7
FOR (i=0; i<BYTECNT; i++)
BYTE[i] =CMDIN[i+1]
YES
CMDIN[0]==0x30?
END_OF_REC=1
NO
YES
CMDIN[0]==0x10?
RCVD=1
CMDIN[0] & 0xF0
==0xA0?
YES
NO
CMDIN[0] & 0xF0
==0xE0?
NO
YES
END_OF_REC=1
RETURN
REV. 2.2, JAN 20, 1998
P/N:PM0426
56
MX93521
MACRONIX INTERNATIONAL CO., LTD.
HEADQUARTERS:
TEL:+886-3-578-8888
FAX:+886-3-578-8887
EUROPE OFFICE:
TEL:+32-2-456-8020
FAX:+32-2-456-8021
JAPAN OFFICE:
TEL:+81-44-246-9100
FAX:+81-44-246-9105
SINGAPORE OFFICE:
TEL:+65-747-2309
FAX:+65-748-4090
TAIPEI OFFICE:
TEL:+886-3-509-3300
FAX:+886-3-509-2200
MACRONIX AMERICA, INC.
TEL:+1-408-453-8088
FAX:+1-408-453-8488
CHICAGO OFFICE:
TEL:+1-847-963-1900
FAX:+1-847-963-1909
http : //www.macronix.com
MACRONIX INTERNATIONAL CO., LTD. reserves the rignt to change product and specifications without notice.
57