Cinterion
®
Java Terminals Hardware Interface Description
8.4 Configuration via I
2
C Interface
69
EHSxT_BGS5T_HID_v02
2014-05-23
Confidential / Preliminary
Page 69 of 70
The
second
example listed below reads out the firmware version, it therefore uses a read reg-
ister marked as “R“ in
.
However, except for the status address register (SR) no information can be directly retrived
from an address register itself, but only indirectly by means of a so-called read-address-register
(RAR). An initial WRITE command has to link the register to be read to the RAR first. Now the
RAR is linked to the register to be read, and the content of this register can be read from the SR.
Figure 19:
Read data from address register
AT^SSPI=
CONNECT
<aD4FFFD>
{a+}
<bD50001>
{b+10}
#
OK
Open the Java Terminals I
2
C data connection.
Indicates that the connection is open.
WRITE command enclosed by <>: “a“ is a command ID to better identify and match
acknowledgments, “D4“ indicates the slave address (write mode), “FF“ specifies
the read address register RAR, and “FD“ sets the data byte to the watchdogs firm-
ware version register VER (i.e., RAR and VER are linked by this command).
Note
:
The data byte value is only written if valid, i.e., if in the specified range. After a
WRITE command, the status code of the operation, in this case, i.e., where the
register address is the RAR, the content of the register given as data byte is saved
to the status register (SR) and a subsequent READ command from the status reg-
ister will then return the register value, i.e., the firmware version.
Acknowledgement enclosed in curly brackets of a successful data transmission.
READ command enclosed by <>: “b“ is a command ID to better identify and match
acknowledgements, “D5“ indicates the slave address (read mode), “00“ specifies
the address register SR, and “01“ sets the data length to be read.
Note:
The READ
command can only be called in conjunction with the SR address “00“ and the data
length of one byte “01“.
Acknowledgement enclosed in curly brackets of a successful data transmission,
together with the response code “10“ indicating that the command was successful-
ly executed. The resposne code gives the watchdog‘s firmware version as v1.0.
Close data connection.
Connection closed.
PC
Watchdog
Write: Set RAR to VER
RAR:
VER
SR:
01
Read from status register (SR)
Copy
firmware
version to
SR
VER:
01