This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] TLV320DAC32: Example Scripts and Unused I/O Pins Connection Tips

Part Number: TLV320DAC32

Hi!

The TLV320DAC32 is one of our low power stereo DAC that supports headphone outputs. This device has 2 registers pages with around 128 registers that need to be configured in order to use all the functions of the TLV320DAC32. In some cases, the registers configuration may be confusing and it also results in a misuse of the TLV320DAC32. Additionally, it might result in a bad device performance. 

Here there are some of the most common configuration scripts for the TLV320DAC32.

  • Stereo playback. Single-Ended configuration at 44.1KHz. HPLOUT and HPROUT as single-ended outputs. HPLCOM and HPRCOM unused.

Headphone_Single_ended_output_44_1_Khz.txt
#Playback configuration for fs = 44.1kHz (MCLK = 11.2896MHz)
#
# Page 0
w 30 00 00
#
# Software reset
w 30 01 80
#
# Fsref setting at 44.1kHz
w 30 07 80
#
# CLKDIV_OUT as DAC_CLKIN
w 30 65 01
# 
# DAC path selection
w 30 07 8A
#
# Left DAC Digital Volume
w 30 2B 00
#
# Right DAC volume follows left channel volume
w 30 29 02
#
# DACs powered up
w 30 25 C0
#
# HPROUT is not muted
w 30 41 0C
#
# DAC_R is routed to HPROUT
w 30 40 80
#
# HPLOUT is not muted
w 30 33 0C
#
# DAC_L is routed to HPLOUT
w 30 2F 80
#
# HPRCOM as independent single-ended output
w 30 26 10
#
# HPLCOM as independent single-ended output
w 30 25 E0
#
# HPROUT is fully powered up
w 30 41 0D
#
# HPLOUT is fully powered up
w 30 33 0D

  • Stereo playback. Differential configuration at 44.1KHz. HPLOUT and HPLCOM as left channel differential output. HPROUT and HPRCOM as right channel differential output.

7140.Headphone_Differential_output_44_1_Khz.txt
#Playback configuration for fs = 44.1kHz (MCLK = 11.2896MHz)
#
# Page 0
w 30 00 00
#
# Software reset
w 30 01 80
#
# Fsref setting at 44.1kHz
w 30 07 80
#
# CLKDIV_OUT as DAC_CLKIN
w 30 65 01
# 
# DAC path selection
w 30 07 8A
#
# Left DAC Digital Volume
w 30 2B 00
#
# Right DAC volume follows left channel volume
w 30 29 02
#
# DACs powered up
w 30 25 C0
#
# HPROUT is not muted
w 30 41 0C
#
# DAC_R is routed to HPROUT
w 30 40 80
#
# HPLOUT is not muted
w 30 33 0C
#
# DAC_L is routed to HPLOUT
w 30 2F 80
#
# HPRCOM as differential output of HPROUT
w 30 26 00
#
# HPLCOM as differential output of HPLOUT
w 30 25 00
#
# HPROUT is fully powered up
w 30 41 0D
#
# HPLOUT is fully powered up
w 30 33 0D
#
# HPRCOM is fully powered up
w 30 48 0D
#
# HPLCOM is fully powered up
w 30 3A 0D

  • Analog bypass. LINEL routed to HPLOUT. LINER routed to HPROUT.

Analog_bypass.txt
#Playback configuration for fs = 44.1kHz (MCLK = 11.2896MHz)
#
# Page 0
w 30 00 00
#
# Software reset
w 30 01 80
#
# Fsref setting at 44.1kHz
w 30 07 80
#
# CLKDIV_OUT as DAC_CLKIN
w 30 65 01
#
# LINEL and LINER Bypass Path Control
w 30 28 14
#
# LINEL to HPLOUT
w 30 2D 80
#
# LINER to HPROUT
w 30 3E 80
#
# LINEx Bypass enabled
w 30 29 A0 
#
# HPROUT is not muted
w 30 41 0C
#
# HPLOUT is not muted
w 30 33 0C
#
# HPRCOM as independent single-ended output
w 30 26 10
#
# HPLCOM as independent single-ended output
w 30 25 E0
#
# HPROUT is fully powered up
w 30 41 0D
#
# HPLOUT is fully powered up
w 30 33 0D

These scripts are written in the format w 30 xx yy, where w is an I2C write command, 30 is the I2C device address in hex format, xx is the register address in hex format and yy is the register data in hex format.

Unused I/O Pins Connection Tips.

In some applications, not all the TLV320DAC32 features or pins are completely used. Even in some cases, some pins are not required. One of the most common questions from the users is what to do with these unused pins. In general, for all the audio ADCs, DACs and CODECs, the unused pins follow the next rule:

" All the unused analog inputs (like LINEL or LINER in case of the TLV320DAC32) must be routed to a 0.1uF to 0.47uF to analog ground (AVSS). The rest of unused pins (analog outputs, digital inputs and digital outputs) must be left floated".

Here is an example of the unused analog inputs: