English
Language : 

SGTL5000XNAA3R2 Datasheet, PDF (30/68 Pages) Freescale Semiconductor, Inc – Low Power Stereo Codec with Headphone Amp
FUNCTIONAL DEVICE OPERATION
PROGRAMMING EXAMPLES
// SELECT bits 1:0
Modify DAP_SGTL_SURROUND->SELECT 0x0003;
// Ramp down the width to original value
for (int i = 0; i++; (7 - usOriginalVal)
{
--usNextVal;
Modify DAP_SGTL_SURROUND->WIDTH_CONTROL
usNextVal;
}
BASS ENHANCE ON/OFF
This programming example shows how to program the
Bass Enhance on/off when end-user turns it on/off on their
device.
The Bass level should be ramped down to the lowest Bass
before Bass Enhance feature is turned on/off.
// Read current Bass level value
// BASS_LEVEL bits 6:0
usOriginalVal = Read DAP_BASS_ENHANCE_CTRL &&
0x007F;
usNextVal = usOriginalVal;
// Ramp Bass level to lowest bass (lowest bass = 0x007F)
usNumSteps = abs(0x007F - usOriginalVal);
for (int i = 0; i++; usNumSteps)
Table 16. CHIP_ID 0x0000
{
++usNextVal;
Modify DAP_BASS_ENHANCE_CTRL->BASS_LEVEL
usNextVal;
}
// Enable (To disable, write 0x0000) Bass Enhance
// EN bit 0
Modify DAP_BASS_ENHANCE->EN 0x0001;
// Ramp Bass level back to original value
for (int i = 0; i++; usNumSteps)
{
--usNextVal;
Modify DAP_BASS_ENHANCE_CTRL->BASS_LEVEL
usNextVal;
}
AUTOMATIC VOLUME CONTROL (AVC) ON/OFF
This programming example shows how to program the
AVC on/off when end-user turns it on/off on their device.
// Enable AVC (To disable, write 0x0000)
Modify DAP_AVC_CTRL->EN 0x0001
// bit 0
Register description
CHIP_ID
0x0000
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PARTID
REVID
BITS
15:8
7:0
FIELD
PARTID
REVID
RW RESET
DEFINITION
RO
0xA0 SGTL5000 Part ID
0xA0 - 8 bit identifier for SGTL5000
RO
0x00 SGTL5000 Revision ID
0xHH - revision number for SGTL5000.
Table 17. CHIP_DIG_POWER 0x0002
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RSVD
RSVD
BITS
15:7
6
FIELD
RSVD
ADC_POWERUP
RW RESET
DEFINITION
RO
0x0
Reserved
RW
0x0
Enable/disable the ADC block, both digital and analog
0x0 = Disable
0x1 = Enable
SGTL5000
30
Analog Integrated Circuit Device Data
Freescale Semiconductor