The GPIO_GET_ADC_MODULE_CFG command retrieves the ADC module configuration.
| Byte 0 | GPIO_GET_ADC_MODULE_CFG | Response ID (0x25). |
| Byte 1 | ECHO | Echo to associate a command with the response. |
| Bytes 2..7 | Reserved | Reserved |
Command is an 8-byte array of the following format:
This byte contains command ID (command type). It should be set to 0x25.
This byte is used to associate a response received from GPIO-24 adapter with a specific command. Response will contain exactly the same value in its echo byte.
These bytes are reserved for future usage.
For convenience GPIO_GET_ADC_MODULE_CFG_CMD structure is declared in reports.h file.
GPIO-24 adapter sends GPIO_GET_ADC_MODULE_CFG response after command execution. ADC module configuration settings are specified inside the response.
| Byte 0 | GPIO_GET_ADC_MODULE_CFG | Response ID (0x25) | |
| Byte 1 | ECHO | Echo to associate a command with the response | |
| Byte 2 | ST | Status of the command execution | |
| Byte 3 | ON | ADC module state (on/off) | |
| Byte 4 | Bits 7..2 | Reserved | Reserved |
| Bit 1 | VREF_LOW | Low reference voltage configuration | |
| Bit 0 | VREF_HI | High reference voltage configuration. | |
| Bytes 5..7 | Reserved | Reserved | |
Response is an 8-byte array of the following format:
This byte contains response ID (response type). This byte will contain 0x25.
This byte is used to associate a response received from GPIO-24 adapter with a specific command. Response will contain exactly the same value in its echo byte.
Status of the command execution:
GPIO_ST_SUCCESS (0x00) – ADC module configuration has been succesfully retrieved.
The ADC module state (on/off):
1 – the ADC module is turned on. The C.1, C.2, C.5, C.6 and B.3 pins are analog inputs (ADC channels);
0 – the ADC module is turned off. The ADC mode is switched off on the C.1, C.2, C.5, C.6 and B.3 pins.
This byte contains the value of reference voltage. You can use either
USB-I/O adapter supply voltage
(VDD and VSS) or the
external reference voltage connected to C.6
(VRefHi) and C.5
(VRefLow) pins.
These bits are reserved for future usage
The low reference voltage:
1 – the external voltage reference on C.5 pin is used as low reference voltage;
0 – the USB-I/O adapter
negative supply voltage
(VSS) is used as low
reference voltage.
The high reference voltage:
1 – the external voltage reference on C.6 pin is used as high reference voltage;
0 – the USB-I/O adapter
positive supply voltage
(VDD) is used as high
reference voltage.
These bytes are reserved for future usage.
For convenience GPIO_GET_ADC_MODULE_CFG_RSP structure is declared in reports.h file.