SN66040B
4-Channel Speech Controller
1
INTRODUCTION
SN66040B is a 40 seconds single chip 4-channel voice synthesizer IC that
contains I/O pins and a tiny controller. By programming through the tiny controller,
users’ applications including section combination, trigger modes, output status,
high performance melody, multiple voices, and other logic functions can be
implemented.
2
FEATURES
Single power supply 2.4V – 5.1V
Built in a tiny controller
40 seconds voice capacity are provided
One 4-bit input port, two 4-bit I/O ports and one 4-bit output port are provided
128*4 bits RAM are provided
Maximum 64k program ROM is provided
Readable ROM code data
Built in a high quality speech synthesizer
Four independent voice channels
Adaptive playing speed from 4k-40kHz is provided for all 4 channels
individually
Automatic repetition for every channel
A 6-bit*8-bit Multiplier is embed to modulate the volume of synthesized voices
Two digital mixers (with saturation control) are provided
Two 8-bit current output DA converters (Channel 1 + Channel 2
→
DA1,
Channel 3 + Channel 4
→
DA2 )
System clock: 2M Hz ( RC-type or Crystal Option)
Low Voltage Reset
Ver: 1.1
1
December 6, 2004
SN66040B
4-Channel Speech Controller
3
Block Diagram
ROM
Program/Speech/Melody/Instrument waveform
128K×12 bits
Address Pointers/ STACK
SRAM (128 nibbles)
Sampling Rate Counter
×
4
Timing
Generator
OSC
DA8-bit
DA8-bit
IO4
IO1
Timer
ALU
IO2
Voice
Synthesizer
IO3
4
PIN ASSIGNMENT
Symbol
P13, P12, P11, P10
P23, P22, P21, P20
P33, P32, P31, P30
P43, P42, P41, P40
VDD
GND
OSC/XIN
XOUT
CKSEL
I/O Function Description
I
Bit3 ~ Bit0 of input port 1
I/O Bit3 ~ Bit0 of I/O port 2
I/O Bit3 ~ Bit0 of I/O port 3
O
I
I
I
O
I
Bit3 ~ Bit0 of output port 4
Positive power supply
Negative power supply
Oscillator / Crystal In
Crystal Out
Clock type select
‘L’ or floating
→
RC oscillator
‘H’
→Crystal
D/A current output, for channel 1 and 2
D/A current output, for channel 3 and 4
2
VO1
VO2
O
O
Ver: 1.1
December 6, 2004
SN66040B
4-Channel Speech Controller
5
FUNCTION DESCRIPTIONS
5.1. Oscillator
SN66040B accepts crystal oscillator / ceramic resonator or RC type oscillator
(selected by pin CKSEL) for system clock. The typical circuit diagrams for oscillator
are listed as follows.
VDD
VDD
20pf
CKSEL
OSC/XIN
XOUT
CKSEL
OSC/XIN
XOUT
20pf
2MHz
Crystal / Resonator
RC Oscillator
5.2. ROM
SN66040B contains 128K word (12-bit) internal ROM. Program, voices, melodies,
data, and instrument waveforms share the same ROM with the others.
5.3. RAM
SN66040B contains 128 nibble RAM. The 128 nibble RAM is separated into two
pages (page 0 and page 1). An implicit page indicator is utilized to specify page
address. Two instructions, PAGE0 and PAGE1, can switch the page indicator. All 64
nibbles of each page can be accessed by direct mode (to specify M0 ~ M63 in the data
transfer type instructions.)
5.4. Power Down Mode
“End” instruction will let SN66040B enter power down mode and consumer very little
amount of current. (<2uA @VDD=3V and <5uA @VDD=5V) After SN66040B enters
power down mode, any valid data transition (L H or H L) occurring on any input
ports or IO ports (P1, P2, and P3) lead SN66040B back to normal operation mode.
Ver: 1.1
3
December 6, 2004
SN66040B
4-Channel Speech Controller
5.5. Sampling Rate Counters
4 independent sampling rate counters are dedicated to 4 individual voice channels to
play voices with different playing rates. The playing rate is programmable from 4KHz
to 40KHz. The resolution of sampling period of each sampling rate counter is 0.25 uS.
This feature helps SN66040B play sounds with accurate pitches in the case of music
instrument synthesis.
5.6. Auto repetition
Auto repetition function helps SN66040B realize a “looping” sound automatically by
hardware without any software effort.
equipped with this function.
SN66040B.
Auto repetition function is a very useful
mechanism to implement “Sustain” sound in instrument synthesis. All 4 channels are
Arbitrary lengths of looping sound are accepted by
5.7. I/O Ports
P1 is a 4-bit input port, P2/P3 are two 4-bit I/O ports and P4 is a 4-bit output port. Any
bit of P2 and P3 can be programmed to be input or output individually. Any valid data
transition (H L or L H) of P1, P2 and P3 can reactivate the chip when it is in
power-down stage.
PAD
To Internal Data Bus
Read Control
Weak
Input Port Configuration (P10~P13)
Ver: 1.1
4
December 6, 2004
SN66040B
4-Channel Speech Controller
Port Data
PAD
Port Status
Weak
To Internal Data Bus
Read Control
I/O Port Configuration (P20~P23, P30~P33)
Port Data
PAD
Port Status
weak
Output Port Configuration (P40~P43)
Note: All weak N-MOS’s can serve as pull-low resistors.
Ver: 1.1
5
December 6, 2004