
Rev1.4 April 2014
15
7. ASCII Commands
(Only RS232-controlled devices / #020101)
The data of an I2C master are temporarily stored and then transmitted through the serial interface. A data packet may be maximal
128 bytes.
I2CdataAvail
0x69
i
d
1
,d
2
,…d
128
’69’+’
XXYYZZ….
’
+<CR>
I2C-Data received from I2C-Master
<CR> : CarriageReturn (0x0D). Commands and data are always terminated with a Carriage Return.
*) ChangeSlaveAdress / GetSlaveAdress:
XX
the Slave address.
e.g. in order to change the address to 0x40, we would send the following string terminated with a carriage return:
’c
40
’+<CR>
**) WriteData:
XXYYZZ...
data to send to the adapter. Packet size is at least one byte and maximum 128 bytes.
Example: in order to write 5 Bytes 0xA1, 0x1F, 0x22, 0x5C, 0xB0 into RAM of the adapter, then the following string
(terminated with a carriage return) should be sent over the serial interface: ’
w
A11F225CB0
’+
<CR>
RS232 – Settings:
Baudrate: 19200
DataBits: 8
StopBits:
1
Parity: None
Code
Description
Command
Hex Char Parameter
CMD + Data (->RS232)
Response (<- RS232)
GetSlaveAddress*
0x61
a
’a’
+<CR>
’61’
+
’
XX
’+
<CR>
Read Slave address
ChangeSlaveAdress * 0x63
c
d
1
’c’
+
’
XX
’+
<CR>
’63’
+<CR>
Change Slave Address
SaveSlaveAddress
0x73
s
’s’+
<CR>
’73’+
<CR>
Save Slave address into EEPROM
WriteData **
0x77
w
d
1
,d
2
,…d
128
’w’+’
XXYYZZ….
’
+<CR>
’77’+
<CR>
Write Data into RAM without Interrupt
WriteDataInt1
0x78
x
d
1
,d
2
,…d
128
’x’+’
XXYYZZ….
’
+<CR>
’78’+
<CR>
Write Data into RAM with Interrupt output 1
WriteDataInt2
0x79
y
d
1
,d
2
,…d
128
’y’+’
XXYYZZ….
’
+<CR>
’79’+
<CR>
Write Data into RAM with Interrupt output 2
Содержание I2C-RS232-Adapter
Страница 6: ...Rev1 4 April 2014 6 4 Dimension mm...