Operation
12
SBOU241A – April 2020 – Revised June 2020
Copyright © 2020, Texas Instruments Incorporated
INA228, INA229, INA237, INA238, and INA239 EVM User’s Guide
4.2.3
Direct EVM Serial Communication
If desired, the EVM can be communicated with directly without the use of the GUI through the USB serial
(COM) port. Simply send the desired command string over the serial port and receive the results. This is
useful for interfacing the EVM with custom setups, scripts, or GUIs. To read and write registers, use the
following format:
•
Read register format: rreg ADR
–
Where ADR is the address in hex, and rreg is always lower case
–
Register addresses can be in upper or lower case, and do not need to be led by '0x'. 0 padding
register addresses is also optional. For example, to read register address 0xB, some valid
commands include:
•
rreg b
•
rreg 0B
•
rreg 0x0B
•
When '0x' is used, the 'x' must be lower case.
–
For the previous example, the EVM would return the results in JSON format
{"acknowledge":"rreg 0x0B"}
{"register":{"address":11,:"value":3}}
{"evm_state":"idle"}
•
Write register format: wreg ADR VAL
–
where ADR and VAL are in hex, and wreg is always lower case
–
Register addresses and values can be in upper or lower case, and do not need to be led by '0x'. 0
padding register addresses and values is also optional. For example, to write register address 0x1
with the value 0xfb69, some valid commands include:
•
wreg 1 fb69
•
wreg 01 0xfb69
•
wreg 0x01 0xFB69
•
When '0x' is used, the 'x' must be lower case.
–
For the previous example, the EVM would return the results in JSON format:
{"acknowledge":"wreg 0x01 0xfb69"}
{"console":"Writing 0xfb69 to ADCCONFIG_2 register"}
{"evm_state":"idle"}