Chengdu Ebyte Electronic Technology Co.,Ltd.
E150-400T30S user manual
Copyright ©2012–2022
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
26
Chapter 8 module control
8.1 digital input (DI)
E150-400T30S has 4 pin digital input pin (DI)
DI will be used as an interrupt pull-up input in normal mode, and the interrupt will be turned off in sleep
mode to avoid waking up the module by mistake.
Use the function code of reading coil status (01) to read the discrete input coil status
For example: read the status of DI1 ~ DI4
01
02
00 00
00 04
79 C9
Device Modbus
address
function code
Register
first
address
Number of output
coils read
CRC check code
Note:
The CRC check code of the last two bytes of the sending instruction needs to be calculated by the user.
Serial port sending: 01 02 00 00 04 79 C9
Remote wireless transmission: 01 02 00 00 00 04 79 C9
After sending the above command to the device via serial port or wireless, the device will return the following
values to the serial port or wireless:
01
02
01
0F
E1 8C
Device Modbus
address
function code
number of
bytes of data
Status data
returned
CRC check
code
The above "returned status data" 0F means that the output DI1~DI4 are high level.
Serial port receive return value: 01 02 01 0F E1 8C
Remote wireless reception return value: 01 02 01 0F E1 8C
8.2 digital output (DO)
E150-400T30S has 4-pin digital output pin (DO)
DO
1 and DO2 are set as open drain output. Users must add external pull-up when using. The maximum voltage
of external pull-up is 6V
DO
3 and DO4 are set as push-pull output, and the output level is 0 / 3.3V
U
se the 0f function code to write commands for multiple coils
For example: DO1 ~ DO4 output high level