English
Language : 

TLV320DAC3120_15 Datasheet, PDF (37/113 Pages) Texas Instruments – Low-Power Mono Audio DAC With Embedded miniDSP and Mono Class-D Speaker Amplifier
www.ti.com
TLV320DAC3120
SLAS659A – NOVEMBER 2009 – REVISED MAY 2012
Table 5-18. Example Beep-Generator Settings for a 1000-Hz Tone
BEEP FREQUENCY
BEEP LENGTH
Hz
1000 (1)
MSB
(hex)
0
MID
(hex)
0
LSB
(hex)
EE
(1) These are the default settings.
SINE
MSB
(hex)
LSB
(hex)
10
D8
COSINE
MSB
(hex)
LSB
(hex)
7E
E3
SAMPLE RATE
Hz
48,000
Two registers are used to control the left sine-wave volume and the right sine-wave volume independently.
The 6-bit digital volume control used allows level control of 2 dB to –61 dB in 1-dB steps. The left-channel
volume is controlled by writing to page 0 / register 71, bits D5–D0. The right-channel volume is controlled
by writing to page 0, register 72, bits D5–D0. A master volume control that controls the left and right
channels of the beep generator can be set up by writing to page 0 / register 72, bits D7–D6. The default
volume control setting is 2 dB, which provides the maximum tone-generator output level.
For generating other tones, the three tone-generator coefficients can be found by running the following
script using MATLAB™ :
Sine = dec2hex(round(sin(2*pi*Fin/Fs)*2^15)) Cosine =
dec2hex(round(cos(2*pi*Fin/Fs)*2^15)) Beep Length =
dec2hex(floor(Fs*Cycle/Fin))
where,
fin = Beep frequency desired
fS = Sample rate
Cycle = Number of beep (sine wave) cycles that are needed
dec2hex = Decimal to hexadecimal conversion function
NOTES:
1. fin should be less than fS/4.
2. For the sine and cosine values, if the number of bits is less than the full 16-bit value, then the unused
MSBs must be written as 0s.
3. For the beep-length values, if number of bits is less than the full 24-bit value, then the unused MSBs
must be written as 0s.
Following the beep-volume control is a digital mixer that mixes in a playback data stream whose level has
already been set by the DAC volume control. Therefore, once the key-click volume level is set, the key-
click volume is not affected by the DAC volume control, which is the main control available to the end
user. This functionality is shown in Figure 1-1.
Following the DAC, the signal can be further scaled by the analog output volume control and power-
amplifier level control.
The beep generator is used for the key-click function. A single beep is generated by writing to page 0 /
register 71, bit D7. After the programmed beep length has finished, register 71, bit D7 is reset back to
zero.
5.6.6 Programming DAC Digital Filter Coefficients
The digital filter coefficients must be programmed through the I2C interface. All digital filtering for the DAC
signal path must be loaded into the RAM before the DAC is powered on. (Note that default ALLPASS filter
coefficients for programmable biquads are located in boot ROM. The boot ROM automatically loads the
default values into the RAM following a hardware reset (toggling the RESET pin) or after a software reset.
After resetting the device, loading boot ROM coefficients into the digital filters requires 100 μs of
programming time. During this time, reading or writing to page 8 through page 15 for updating DAC filter
coefficient values is not permitted. (The DAC should not be powered up until after all of the DAC
configurations have been done by the system microprocessor.)
Copyright © 2009–2012, Texas Instruments Incorporated
Submit Documentation Feedback
Product Folder Link(s): TLV320DAC3120
APPLICATION INFORMATION
37