Freelance Electronics Components Distributor
Closed Dec 25th-26th
800-300-1968
We Stock Hard to Find Parts

897-30-004-90-000000

Part # 897-30-004-90-000000
Description CONN USB RECEPT TYPE B PCB
Category CONNECTOR
Availability In Stock
Qty 15967
Qty Price
1 - 55 $4.46714
56 - 140 $3.55341
141 - 298 $3.35036
299 - 642 $3.11346
643 + $2.77504
Manufacturer Available Qty
MILL-MAX MFG. CORP.
  • Shipping Freelance Stock: 8913
    Ships Immediately
MILL-MAX MFG. CORP.
  • Shipping Freelance Stock: 7054
    Ships Immediately



Technical Document


DISCLAIMER: The information provided herein is solely for informational purposes. Customers must be aware of the suitability of this product for their application, and consider that variable factors such as Manufacturer, Product Category, Date Codes, Pictures and Descriptions may differ from available inventory.

www.ti.com
USB-MODEVM Protocol
If the command is sent with no problem, the returning byte [0] should be the same as the sent one
logically ORed with 0x20 - in our first example above, the returning packet should be:
[0] 0x31
[1] 0xA0
[2] 0x02
[3] 0x05
[4] 0xAA
[5] 0x55
If for some reason the interface fails (for example, the I
2
C device does not acknowledge), it would 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 packet would be:
[0] 0x93 --> the user sent 0x13, which is not valid, so 0x93 returned
[1] 0xA0
[2] 0x02
[3] 0x05
[4] 0xAA
[5] 0x55
Examples above used writes. Reading is similar:
Read two bytes from device starting at register 5 of an I
2
C device with address A0:
[0] 0x01
[1] 0xA0
[2] 0x02
[3] 0x05
SLAU218 August 2007 USB-MODEVM Protocol 51
Submit Documentation Feedback
www.ti.com
G.2 GPIO Capability
G.3 Writing Scripts
GPIO Capability
The return packet should be
[0] 0x21
[1] 0xA0
[2] 0x02
[3] 0x05
[4] 0xAA
[5] 0x55
assuming that the values we wrote above starting at Register 5 were actually written to the device.
The USB-MODEVM has seven GPIO lines. Access them by specifying the interface to be 0x08, and then
using the standard format for packets—but addresses are unnecessary. The GPIO lines are mapped into
one byte (see Table G-3 ):
Table G-3. GPIO Pin Assignments
Bit 7 6 5 4 3 2 1 0
x P3.5 P3.4 P3.3 P1.3 P1.2 P1.1 P1.0
Example: write P3.5 to a 1, set all others to 0:
[0] 0x18 --> write, GPIO
[1] 0x00 --> 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
previous example to the port pins.
Example: read the GPIO
[0] 0x08 --> read, GPIO
[1] 0x00 --> this value is ignored
[2] 0x01 --> length - ALWAYS a 1
[3] 0x00 --> this value is ignored
The return packet should be:
[0] 0x28
[1] 0x00
[2] 0x01
[3] 0x00
[4] 0x40
A script is simply a text file that contains data to send to the serial control buses. The scripting language is
quite simple, as is the parser for the language. Therefore, the program is not very forgiving about mistakes
made in the source script file, but the formatting of the file is simple. Consequently, mistakes should be
rare.
52 USB-MODEVM Protocol SLAU218 August 2007
Submit Documentation Feedback
www.ti.com
Writing Scripts
Each line in a script file is one command. There is no provision for extending lines beyond one line. A line
is terminated by a carriage return.
The first character of a line is the command. Commands are:
I Set interface bus to use
r Read from the serial control bus
w Write to the serial control bus
# Comment
b Break
d Delay
The first command, I, sets the interface to use for the commands to follow. This command must be
followed by one of the following parameters:
i2cstd Standard mode I
2
C Bus
i2cfast Fast mode I
2
C bus
spi8 SPI bus with 8-bit register addressing
spi16 SPI bus with 16-bit register addressing
gpio Use the USB-MODEVM GPIO capability
For example, if a fast mode I
2
C bus is to be used, the script would begin with:
I i2cfast
No data follows the break command. Anything following a comment command is ignored by the parser,
provided that it is on the same line. The delay command allows the user to specify a time, in milliseconds,
that the script will pause before proceeding.
Note: UNLIKE ALL OTHER NUMBERS USED IN THE SCRIPT COMMANDS, THE DELAY
TIME IS ENTERED IN A DECIMAL FORMAT. Also, note that because of latency in the
USB bus as well as the time it takes the processor on the USB-MODEVM to handle
requests, the delay time may not be precise.
A series of byte values follows either a read or write command. Each 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 byte following a read or write command is the I
2
C slave address of the device (if I
2
C is used) or
the first data byte to write (if SPI is used—note that SPI interfaces are not standardized on protocols, so
the meaning of this byte will vary with the device being addressed on the SPI bus). The second byte is the
starting register address that data will be written to (again, with I
2
C; SPI varies—see Section G.1 for
additional information about what variations may be necessary for a particular SPI mode). Following these
two bytes are data, if writing; if reading, the third byte value is the number of bytes to read, (expressed in
hexadecimal).
For example, to write the values 0xAA 0x55 to an I
2
C device with a slave address of 0x90, starting at a
register address of 0x03, one would write:
#example script
I i2cfast
w 90 03 AA 55
r 90 03 2
This script begins with a comment, specifies that a fast I
2
C bus will be used, then writes 0xAA 0x55 to the
I
2
C slave device at address 0x90, 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 not necessary to set the R/ W bit for I
2
C devices in the script; the read or write
commands will do that.
SLAU218 August 2007 USB-MODEVM Protocol 53
Submit Documentation Feedback
PREVIOUS121314151617181920NEXT