
WT901SD | manual v0707 | http://wiki.wit-motion.com/english
- 34 -
2.4.13
Set Extended Port
The WT901SD module has 4 multiple function extended ports, which can be set
to different functions according to the need. Set extended port only when the
module connects to the PC software successfully.
The extended port supports analog input mode, digital input mode, digital
output mode, PWM output mode. D1 port also supports GPSRX mode, port state
by default is analog input mode.
The port status packet in which the module exports contains the status
information of the extended port. In different modes, the port state data
DxStatus has the following meanings:
Mode
Implication
Analog input mode
Analog voltage
Digital input mode
Port high and low level state
Digital high level output mode
Port output state
Digital low level output mode
Port output state
PWM output mode
PWM high level width
CLR
(
D1
)
The XY relative attitude 0
Analog input mode is used to measure the analog voltage on the port, such as
a potentiometer or a sensor, etc.
The formula is as follows:
U=DxStatus/4096*U
vcc
Uvcc is the power supply voltage of the module, because the module has LDO if
the module power supply voltage is greater than 3.5V, Uvcc is 3.3V. If the
module supply voltage is less than 3.5V, Uvcc equal to the supply voltage minus
0.2V.
For digital input mode, if the voltage is high, DxStatus=1, else, DxStatus=0.
For digital output mode:
Voltage is high, DxStatus=1.
Voltage is low, DxStatus=0.
PWM output mode is used for the output of the PWM wave, the cycle and the
high level width can be adjusted, the unit is us. In the PWM output mode, the
port state data is used to indicate the high level of the PWM, the unit us.