Datasheet

TLV320AIC3120
www.ti.com
SLAS653A FEBRUARY 2010REVISED MAY 2012
The two registers used for programming the 16-bit sine-wave coefficient are page 0 / register 76 and
page 0 / register 77. The two registers used for programming the 16-bit cosine-wave coefficient are
page 0 / register 78 and page 0 / register 79. This coefficient resolution allows virtually any frequency of
sine wave in the audio band to be generated, up to f
S
/2.
The three registers used to control the length of the sine-burst waveform are page 0 / register 73 through
page 0 / register 75. The resolution (bit) in the registers of the sine-burst length is one sample time, so this
allows great control on the overall time of the sine-burst waveform. This 24-bit length timer supports
16,777,215 sample times. (For example, if f
S
is set at 48 kHz, and the register value equals 96,000d
(01 7700h), then the sine burst lasts exactly 2 seconds.) The default settings for the tone generator, based
on using a sample rate of 48 kHz, are 1-kHz (approximately) sine wave, with a sine-burst length of five
cycles (5 ms).
Table 5-31. Beep Generator Register Locations (Page 00h)
BEEP LENGTH SINE COSINE
LEFT BEEP CONTROL RIGHT BEEP CONTROL
MSB MID LSB MSB LSB MSB LSB
REGISTER 71 72 73 74 75 76 77 78 79
Table 5-32. Example Beep-Generator Settings for a 1000-Hz Tone
BEEP FREQUENCY BEEP LENGTH SINE COSINE SAMPLE RATE
MSB MID LSB MSB LSB MSB LSB
Hz Hz
(hex) (hex) (hex) (hex) (hex) (hex) (hex)
1000
(1)
0 0 EE 10 D8 7E E3 48,000
(1) These are the default settings.
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,
f
in
= Beep frequency desired
f
S
= Sample rate
Cycle = Number of beep (sine wave) cycles that are needed
dec2hex = Decimal to hexadecimal conversion function
NOTES:
1. f
in
should be less than f
S
/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.
Copyright © 2010–2012, Texas Instruments Incorporated APPLICATION INFORMATION 57
Submit Documentation Feedback
Product Folder Link(s): TLV320AIC3120