Texas Instruments TLV320AIC12KEVMB-K appendix #example script i i2cfast 80 01 45 A0 r 80 01

Page 27

www.ti.com

Kit Operation

For example, to write the values 0x45 0xA0 to an I2C device with a slave address of 0x80, starting at a register address of 0x01, one would write:

#example script i i2cfast

w 80 01 45 A0 r 80 01 02

This script begins with a comment, specifies that a fast I2C bus will be used, then writes 0x45 0xA0 to the I2C slave device at address 0x80, writing the values into registers 0x01 and 0x02. The script then reads back two bytes from the same device starting at register address 0x01. Note that the slave device value does not change. It is not necessary to set the R/W bit for I2C devices in the script; the read or write commands will do that for the user.

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 and save it as specified in Section 6.9.

Once the script is in the command buffer, it may be executed by pressing the Execute Command Buffer button. If the user has placed breakpoints in the script, it will execute to that point, and a dialog box will show up with a continue button to continue executing the script.

Please refer to sections 3.1 (Power Down and Reset) and section 3.2 (AIC12 Control Register Programming Procedures) on the TLV320AIC12/13/14/15 Codec Operating In Stand-Alone Slave Mode application note for important details on programming the codec.

Special care must be taken when writing subregisters (4A-4B and 5A-5D).

Example: w 80 01 45 A0 01 20 B8 00

The previous command writes registers 1, 2, 3, 4A, 5C and 6. It will not increment from 3 to 4A and then to 4B. The subregister to be written will depend on the data.

SLAU229B–October 2007–Revised August 2008

TLV320AIC12KEVMB-K and TLV320AIC14KEVMB-K User's Guide

27

Submit Documentation Feedback

Image 27
Contents EVM-Compatible Device Data Sheets SN74LVC125ASN74LVC1G07 Power Supply Pinout List of Jumpers USB-MODEVM SW2 Settings Analog Interface FeaturesEVM Overview IntroductionAlternate Analog Connectors Digital InterfaceDigital Interface Pinout Sclk AIC12K/14K ResetSCL SDAStand-Alone Operation Power SuppliesUSB-MODEVM Interface Power Power Supply PinoutAnalog Output Default Jumper LocationsTLV320AIC12KEVMB-K/14KEVMB-K Block Diagram Analog InputTLV320AIC12KEVMB-K/14KEVMB-K Block Diagram USB-MODEVM SW2 Settings InstallationProgram Description USB-MODEVM Interface BoardInformation Tab Indicators and Main Screen ControlsInformation Tab Sounds and Audio Devices Properties Preset Configurations TabDevice Controls Tab Preset ConfigurationsDevice Controls Tab Control Register 1 Tab Control Register 1 Tab Control Register 2 Tab Control Register 2 Tab Control Register 3 Tab Control Register 4 Tab Control Register 5 Tab Command Line Interface Tab Command Line Interface Tab File Menu USB-MODEVM Protocol USB Control Endpoint Hidsetreport RequestSetreport Data Packet Configuration 0x01 0x80 0x02 Gpio Pin Assignments Gpio CapabilitySpi8 Writing ScriptsI2cstd I2cfast#example script i i2cfast 80 01 45 A0 r 80 01 Here is an example of a script TLV320AIC12KEVMB/14KEVMB Bill of Materials EVM Bill of MaterialsUSB-MODEVM Bill of Materials JMP7 JMP1-JMP4JMP8-JMP14 JMP5, JMP6Schematic diagram is provided as a reference Appendix a TLV320AIC12KEVMB/14KEVMB SchematicTLV320AIC12K14KDBTEVMB Ti a Appendix B USB-MODEVM Schematic Untitled USB-MODEVM Interface Rick Downs Evaluation BOARD/KIT Important Notice FCC WarningsRfid DSP