COPTONIX I2C-RS232-Adapter Manuale - Pagina 15
Sfoglia online o scarica il pdf Manuale per Adattatore COPTONIX I2C-RS232-Adapter. COPTONIX I2C-RS232-Adapter 15. I2c rs232 adapter (slave)
7. ASCII Commands
Command
Hex Char
GetSlaveAddress*
0x61
a
ChangeSlaveAdress * 0x63
c
SaveSlaveAddress
0x73
s
WriteData **
0x77
w
WriteDataInt1
0x78
x
WriteDataInt2
0x79
y
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
<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: 'c40'+<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: 'wA11F225CB0'+<CR>
RS232 – Settings:
Baudrate:
19200
DataBits:
8
StopBits:
1
Parity:
None
(Only RS232-controlled devices / #020101)
Code
Parameter
CMD + Data (->RS232)
'a'+<CR>
d
'c'+'XX'+<CR>
1
's'+<CR>
d
,d
,...d
'w'+'XXYYZZ....'+<CR>
1
2
128
d
,d
,...d
'x'+' XXYYZZ....'+<CR>
1
2
128
d
,d
,...d
'y'+' XXYYZZ....'+<CR>
1
2
128
d
,d
,...d
1
2
128
Description
Response (<- RS232)
'61'+'XX'+<CR>
'63'+<CR>
'73'+<CR>
'77'+<CR>
'78'+<CR>
'79'+<CR>
'69'+'XXYYZZ....'+<CR>
Read Slave address
Change Slave Address
Save Slave address into EEPROM
Write Data into RAM without Interrupt
Write Data into RAM with Interrupt output 1
Write Data into RAM with Interrupt output 2
I2C-Data received from I2C-Master
Rev1.4 April 2014
15