Texas Instruments TLV320AIC3256EVM-U Evaluation Module TLV320AIC3256EVM-U TLV320AIC3256EVM-U Datenbogen

Produktcode
TLV320AIC3256EVM-U
Seite von 22
Related Documentation
#example script
I i2cfast
w 30 03 AA 55
r 30 03 02e
This script begins with a comment, specifies that a fast I
2
C bus is used, then writes 0xAA 0x55 to the I
2
C
slave device at address 0x30, writing the values into registers 0x03 and 0x04. The script then reads back
two bytes from the same device starting at register address 0x03. Note that the slave device value does
not change. It is unnecessary to set the R/W bit for I
2
C devices in the script; the read or write commands
does that.
If extensive repeated write commands are sent and commenting is desired for a group of bytes, the >
command can be used to extend the bytes to other lines that follow. A usage example for the command
follows:
#example script for '>' command
I i2cfast
# Write AA and BB to registers 3 and 4, respectively
w 30 03 AA BB
# Write CC, DD, EE and FF to registers 5, 6, 7 and 8, respectively
> CC DD EE FF
# Place a commented breakpoint
b "AA BB CC DD EE FF was written, starting at register 3"
# Read back all six registers, starting at register 3
r 30 03 06b
The following example demonstrates usage of the Wait for Flag command, f:
#example script for 'wait for flag' command
I i2cfast
# Switch to Page 44
w 30 00 2C
# Switch buffer
w 30 01 05
# Wait for bit D0 to clear. 'x' denotes a don't care.
f 30 01 xxxxxxx0
Any text editor can 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 Script File... from the File menu. Locate the script and open it. The script then is displayed
in the command buffer. The user also can edit the script once it is in the buffer and save it by selecting
Save Script File... from the File menu.
Once the script is in the command buffer, it can be executed by pressing the Execute Command Buffer
button. If breakpoints are in the script, the script executes to that point, and the user is presented with a
dialog box with a button to press to continue executing the script. When ready to proceed, the user
pushes that button and the script continues.
8
Related Documentation
1. TLV320AIC3256EVM-U Software (
)
20
TLV320AIC3256EVM-U Evaluation Module
SLOU294B – July 2010 – Revised October 2012
Copyright © 2010–2012, Texas Instruments Incorporated