Texas Instruments TLV320AIC3104EVM User Manual Download Page 58

www.ti.com

Writing Scripts

Here is an example of using an SPI device that requires 16-bit register addresses:

# setup TSC2101 for input and output
# uses SPI16 interface
# this script sets up DAC and ADC at full volume, input from onboard mic
#
# Page 2: Audio control registers
w 10 00 00 00 80 00 00 00 45 31 44 FD 40 00 31 C4
w 13 60 11 20 00 00 00 80 7F 00 C5 FE 31 40 7C 00 02 00 C4 00 00 00 23 10 FE
00 FE 00

Note that blank lines are allowed. However, be sure that the script does not end with a blank line. While
ending with a blank line will not cause the script to fail, the program will execute that line, and therefore,
may prevent the user from seeing data that was written or read back on the previous command.

In this example, the first two bytes of each command are the command word to send to the TSC2101
(0x1000, 0x1360); these are followed by data to write to the device starting at the address specified in the
command word. The second line may wrap in the viewer being used to look like more than one line;
careful examination will show, however, that there is only one carriage return on that line, following the last
00.

Any text editor may be used to write these scripts; Jedit is an editor that is highly recommended for
general usage. For more information, go to:

http://www.jedit.org

.

Once the script is written, it can be used in the command window by running the program, and then
selecting Open Command File... from the File menu. Locate the script and open it. The script will then be
displayed in the command buffer. The user may also edit the script once it is in the buffer, but saving of
the command buffer is not possible at this time (this feature may be added at a later date).

Once the script is in the command buffer, it may be executed by pressing the Execute Command Buffer
button. If there are breakpoints in the script, the script will execute to that point, and the user will be
presented with a dialog box with a button to press to continue executing the script. When ready to
proceed, push that button and the script will continue.

Here an example of a (partial) script with breakpoints:

# setup AIC33 for input and output
# uses I2C

interface

I i2cfast
# reg 07 - codec datapath
w 30 07 8A
r 30 07 1
d 1000
# regs 15/16 - ADC volume, unmute and set to 0dB
w 30 0F 00 00
r 30 0F 2
b

This script writes the value 8A at register 7, then reads it back to verify that the write was good. A delay of
1000ms (one second) is placed after the read to pause the script operation. When the script continues, the
values 00 00 will be written starting at register 0F. This output is verified by reading two bytes, and
pausing the script again, this time with a break. The script would not continue until the user allows it to by
pressing OK in the dialog box that will be displayed due to the break.

54

USB-MODEVM Protocol

SLAU218 – August 2007

Submit Documentation Feedback

Summary of Contents for TLV320AIC3104EVM

Page 1: ...iption and Basics 3 3 TLV320AIC3104EVM PDK Setup and Installation 7 4 TLV320AIC3104EVM Software 9 Appendix A EVM Connector Descriptions 37 Appendix B TLV320AIC3104EVM Schematic 41 Appendix C TLV320AIC...

Page 2: ...30 Command Line Interface Tab 35 31 File Menu 36 C 1 Assembly layer 42 C 2 Top Layer 42 C 3 Layer 3 43 C 4 Layer 4 43 C 5 Silk Screen 44 C 6 Bottom Layer 44 List of Tables 1 USB MODEVM SW2 Settings 5...

Page 3: ...s operational with one USB cable connection to a personal computer The USB connection provides power control and streaming audio data to the EVM for reduced setup and configuration The EVM also provid...

Page 4: ...modular EVM it is installed with connections to both EVM positions which connects the TLV320AIC3104 digital control interface to the I2 C port realized using the TAS1020B as well as the TAS1020B digit...

Page 5: ...scription JMP1 2 3 When connecting 2 3 mic bias comes from the MICBIAS pin on the device when connecting 1 2 mic bias is supplied from the power supply through a resistor which the user must install J...

Page 6: ...tion details of each header connector can be found in Appendix A The analog outputs to the EVM can be connected through two different methods The analog outputs are available from the J13 and J14 top...

Page 7: ...he individual voltages required by the USB MODEVM Interface JMP6 should have no shunt installed Voltages are then applied to J2 5 VA J3 5 VD J4 1 8 VD and J5 3 3 VD The 1 8 VD and 3 3 VD can also be g...

Page 8: ...and begin an initialization process The user may be prompted to identify the location of the drivers or allow the PC to automatically search for them Allow the automatic detection option 5 Once the PC...

Page 9: ...hen the program first starts up a small window Figure 4 appears that gives two choices for the control interface IC or SPI Click on the interface that will be used by the EVM as selected by the jumper...

Page 10: ...ed to help program multiple devices Figure 5 I2 C Address Selection Window Note For operation of the EVM in the default status no changes are required on this panel The default settings are A1 A0 0 Ch...

Page 11: ...eps results in not generating a hardware reset or causing unstable operation of the EVM which may require cycling power to the USB MODEVM Below the Firmware box the Device Connected LED should be gree...

Page 12: ...the Preset Configuration Description are shows a summary of the codec setup associated with the choice made If the choice is acceptable the Load button can be pressed and the preset configuration wil...

Page 13: ...nly connect to one ADC 3 Adjust the Level control to the desired attenuation for the connected channel This level adjustment can be done independently for each connection The TLV320AIC3104 offers a pr...

Page 14: ...s muted Rotating the knob clockwise increases the PGA gain which is displayed in the box directly above the volume control Figure 8 Bypass Paths The Bypass Paths tab shows the active and passive bypas...

Page 15: ...e mode when there is not valid data and transmitting BLCK and WCLK when the codec is powered down Re synchronization of the audio bus is enabled using the controls in the lower right corner of this sc...

Page 16: ...pplication note Using the Digital Microphone Function on TLV320AIC3104 with AIC33EVM USB MODEVM System SLAA275 available for download at www ti com The default mode for the EVM is configured as 44 1 k...

Page 17: ...ration from the USB MODEVM clock reference the EVM settings can be restored automatically by pushing the Load EVMS Clock Settings button at the bottom of this tab Note that changing any of the clock s...

Page 18: ...e frequency is entered into the PLLCLK_IN Source box in megahertz MHz 2 The desired Fsref should be set using the Fsref switch 3 Push the Search for Ideal Settings button The software will start searc...

Page 19: ...oise Threshold detection Jack Headset detection For use as an interrupt output the behavior of the interrupt can be selected using the Interrupt Duration control A Single 2ms pulse can be delivered wh...

Page 20: ...ntrols function for these pins in the same way that they do for GPIO1 or GPIO2 When the control interface for the TLV320AIC3104 is selected to be SPI the Multifunction Pins group box and controls with...

Page 21: ...ft Right AGC Settings button determines the mode selection The Standard mode provides several preset times that can be selected by adjustments made to the Attack and Decay knobs If finer control over...

Page 22: ...nctions such as Hysteresis Enable Clip stepping Threshold dB Signal Detect Debounce ms and Noise Detect Debounce ms are set using the corresponding controls in the Noise Gate group box for each channe...

Page 23: ...through the digital effects filtering before passing through the optional de emphasis filter before the DAC The digital effects filtering can only be connected to either the ADC or DAC not both at th...

Page 24: ...grammable function allows custom coefficients to achieve a different filter than provided by the preset filters The controls for the programmable high pass filter are located under the Programmable Fi...

Page 25: ...l be shown on the Effect Filter Response graph however note that this response is not included in graphs of other effect responses when on the other filter design tabs Figure 19 De emphasis Filters Th...

Page 26: ...nts are not loaded into the TLV320AIC3104 until the Download Coefficients button is pressed To avoid noise during the update of coefficients it is recommended that the user uncheck the Effect Filter e...

Page 27: ...are quite good at simulating analog filter designs For each biquad section on this tab enter the desired analog filter type to simulate Butterworth Chebyshev Inverse Chebyshev Elliptic or Bessel Param...

Page 28: ...of four preset filter responses Rock Jazz Classical or Pop Figure 24 Preset Filters If filter coefficients are known they can be entered directly on this tab see Figure 25 for both biquads for both l...

Page 29: ...ct properly make sure the appropriate coefficients are already loaded into the two biquad sections The User Filters tab may be used to load the coefficients See Figure 26 Figure 26 3D Effect Settings...

Page 30: ...Common Mode Voltage control The TLV320AIC3104 offers several options to help reduce the turnon off pop of the output amplifiers The Power On Delay of the output drivers can be set using the correspon...

Page 31: ...ounce times in varying numbers of milliseconds See the TLV320AIC3104 data sheet for a discussion of headset detection Output short circuit protection can be enabled in the Short Circuit Protection gro...

Page 32: ...ob setting Data going to the DACs is selected using the drop down boxes under the Left and Right DAC Datapath Each DAC channel can be selected to be off use left channel data use right channel data or...

Page 33: ...ine output can also be controlled using the button below this master output knob Powered Up If the DAC Output Path control is set to Mix with Analog Inputs the six knobs in each panel can be used to s...

Page 34: ...onding outputs or may be set to be a common mode voltage Constant VCM Out When used in these configurations the Powered Up button for the HPxCOM output is disabled as the power mode for that output wi...

Page 35: ...eturn packets of data which result from each command will be displayed in the Read Data array control When executing several commands the Read Data control shows only the results of the last command T...

Page 36: ...software Figure 31 File Menu Under the Help menu is an About menu item which displays information about the TLV320AIC3104EVM software The actual USB protocol used as well as instructions on writing s...

Page 37: ...LP MIC1 or LINE1 Analog Input Left Plus or Multifunctional J13 7 LINE1RM MIC1 or LINE1 Analog Input Right Minus or Multifunctional J13 8 LINE1RP MIC1 or LINE1 Analog Input Right Plus or Multifunctiona...

Page 38: ...screw terminals or audio jacks The stereo microphone input is also tied to J6 and the stereo headphone output the HP set of outputs is available at J7 Table A 2 summarizes the screw terminals availabl...

Page 39: ...IC33EVM J16 9 NC Not Connected J16 10 DGND Digital Ground J16 11 MOSI SPI MOSI Slave Serial Data Input J16 12 SPI SELECT Select Pin SPI vs I2 C Control Mode J16 13 MISO SPI MISO Slave Serial Data Outp...

Page 40: ...ommon power bus for the TLV320AIC3104EVM Power is supplied on the pins listed in Table A 4 Table A 4 Power Supply Pinout SIGNAL PIN NUMBER SIGNAL NC J15 1 J15 2 NC 5VA J15 3 J15 4 NC DGND J15 5 J15 6...

Page 41: ...Appendix B TLV320AIC3104EVM Schematic Appendix B The schematic diagram for the modular TLV320AIC3104EVM is provided as a reference SLAU218 August 2007 TLV320AIC3104EVM Schematic 41 Submit Documentatio...

Page 42: ...1 2 JMP8 1 2 JMP7 1 2 JMP5 1 2 JMP6 SCL R9 100K RESET AVDD_DAC DRVDD IN2L IN2R TP28 IN1RP TP29 IN1RM R8 0 C19 0 1uF R6 2 2K TP7 IN2L C16 NI J9 SJ1 3515 SMT PLUS MINUS PLUS MINUS 1 2 JMP12 HPCOM IN2L I...

Page 43: ...DX 11 DR 13 INT 15 TOUT 17 GPIO5 19 J5 DAUGHTER SERIAL A0 2 A1 4 A2 6 A3 8 A4 10 A5 12 A6 14 A7 16 REF 18 REF 20 A0 1 A1 3 A2 5 A3 7 AGND 9 AGND 11 AGND 13 VCOM 15 AGND 17 AGND 19 J2 DAUGHTER ANALOG...

Page 44: ...www ti com Appendix C TLV320AIC3104EVM Layout Views Appendix C Figure C 1 Assembly layer Figure C 2 Top Layer 42 TLV320AIC3104EVM Layout Views SLAU218 August 2007 Submit Documentation Feedback...

Page 45: ...www ti com Appendix C Figure C 3 Layer 3 Figure C 4 Layer 4 SLAU218 August 2007 TLV320AIC3104EVM Layout Views 43 Submit Documentation Feedback...

Page 46: ...www ti com Appendix C Figure C 5 Silk Screen Figure C 6 Bottom Layer 44 TLV320AIC3104EVM Layout Views SLAU218 August 2007 Submit Documentation Feedback...

Page 47: ...3 3 1 U2 64K I2C EEPROM MicroChip 24AA64 I SN 2 J10 J11 Screw Terminal Block 2 Position On Shore Technology ED555 2DS 5 J6 J7 J12 J14 Screw Terminal Block 3 Position On Shore Technology ED555 3DS 2 J8...

Page 48: ...MODEVM Schematic Appendix E The schematic diagram for USB MODEVM Interface Board included only in the TLV320AIC3104EVM PDK is provided as a reference 46 USB MODEVM Schematic SLAU218 August 2007 Submi...

Page 49: ...C11 1uF C12 1uF USB SLAVE CONN EXT PWR IN 6 00 MHZ 6463996 RED 1OE 1 1A 2 1Y 3 2OE 4 2A 5 2Y 6 GND 7 3Y 8 3A 9 3OE 10 4Y 11 4A 12 4OE 13 VCC 14 U3 SN74LVC125APW 1OE 1 1A 2 1Y 3 2OE 4 2A 5 2Y 6 GND 7...

Page 50: ...4 SCL 16 DGND 18 SDA 20 CNTL 1 CLKX 3 CLKR 5 FSX 7 FSR 9 DX 11 DR 13 INT 15 TOUT 17 GPIO5 19 J22 DAUGHTER SERIAL 5VD 5VA A0 2 A1 4 A2 6 A3 8 A4 10 A5 12 A6 14 A7 16 REF 18 REF 20 A0 1 A1 3 A2 5 A3 7 A...

Page 51: ...0 F 6 3V Ceramic Chip Capacitor 10 X5R TDK C3216X5R0J1306K D1 50V 1A Diode MELF SMD Micro Commercial Components DL4001 D2 Yellow Light Emitting Diode Lumex SML LX0603YW TR D3 D7 Green Light Emitting D...

Page 52: ...mper 0 1 spacing Samtec TSW 102 07 L S JMP5 JMP6 3 position jumper 0 1 spacing Samtec TSW 103 07 L S JMP7 3 position dual row jumper 0 1 spacing Samtec TSW 103 07 L D SW1 SMT half pitch 2 position swi...

Page 53: ...The data packet consists of the following bytes shown in Table G 2 Table G 2 Data Packet Configuration BYTE NUMBER TYPE DESCRIPTION 0 Interface Specifies serial interface and operation The two values...

Page 54: ...f reg addr 2 0x02 3 0xE0 4 0xAA 5 0x55 In each case the TAS1020 will return in an HID interrupt packet the following 0 interface byte status status REQ_ERROR 0x80 INTF_ERROR 0x40 REQ_DONE 0x20 1 for I...

Page 55: ...ould come back as 0 0x51 interface INTF_ERROR 1 0xA0 2 0x02 3 0x05 4 0xAA 5 0x55 If the request is malformed that is the interface byte byte 0 takes on a value which is not described above the return...

Page 56: ...0 this value is ignored 2 0x01 length ALWAYS a 1 3 0x00 this value is ignored 4 0x40 01000000 The user may also read back from the GPIO to see the state of the pins Let s say we just wrote the previou...

Page 57: ...byte value is expressed in hexadecimal and each byte must be separated by a space Commands are interpreted and sent to the TAS1020 by the program using the protocol described in Section G 1 The first...

Page 58: ...sed in the command window by running the program and then selecting Open Command File from the File menu Locate the script and open it The script will then be displayed in the command buffer The user...

Page 59: ...oduct This notice contains important safety information about temperatures and voltages For additional information on TI s environmental and or safety programs please contact the TI application engine...

Page 60: ...ce and is an unfair and deceptive business practice TI is not responsible or liable for any such statements TI products are not authorized for use in safety critical applications such as life support...

Reviews: