
Jupiter Instruments
_____________________________________________________________________________________
JI-300
19
9/9/07
5. MESSAGE SCRIPTING
Scripting provides an alternate method of creating and editing I2C messages for use in the JI-300
application environment. Messages are constructed using a simple text editor such as Windows
Notepad. The JI-300 scripting language includes both I2C commands (Read & Write), and JI-300
instructions (Stop, Comment, etc.) Script files are loaded into the JI-300 application and executed as
conventional I2C messages.
5.1 Language Statements
I2C Commands
1. I2C Write
Description: This command is used to write data to a slave device. A maximum of 32 and
a minimum 0 bytes can be transmitted. The first two characters following the
write character (w) specifies the slave address. The remaining characters
c
onstitu
te the data payload. A carriage-return and line-feed terminates the
statement.
Syntax:
waaaa..P.aa<CR><LF>
Address
& Direction:
aa Upper 7-bits = slave address. LSB = direction (0 = write)
Range =
even bytes
from 00h to FEh.
Data:
aa..P.aa Write Data 32 bytes maximum.
Example:
Command
Description
wa031abc34892<CR><LF> Write 31h, abh, c3h, 48h, and 92h to
slave address 50h.
w2c1235ab<CR><LF>
Write 12h, 35h, and abh to slave address
16h.
2. I2C Write without a Stop
Description: This command is identical to the “I2C Write“ command, except that it does
not issue an I2C stop event .
Syntax:
yaaaa..P.aa<CR><LF>
Address
& Direction:
aa Upper 7-bits = slave address. LSB = direction (0 = write)
Range =
even bytes
from 00h to FEh.
Data:
aa..P.aa Write Data 32 bytes maximum.
Example:
Command
Description
ya031abc34892<CR><LF> Write 31h, abh, c3h, 48h, and 92h to
slave address 50h.