Chengdu Ebyte Electronic Technology Co.,Ltd.
Copyright ©2012–2019
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
10
Ⅵ Operating mode
The module has four working modes, which are set by pins M0 and M1; the details are shown in the following
table:
Mode(0-3)
M1
M0
Mode Introduction
Remark
0 transfer
mode
0
0
The serial port is opened, the wireless is opened, and the
module sends and receives data according to the set
transmission mode.
The transmission
method of the sender
and receiver must be
the same
1 RSSI mode
0
1
When the wireless is turned off and the serial port is turned
on, the module will output the RSSI signal strength value
every 100ms.
Relative intensity
values only
2 set mode
1
0
Wireless off, can receive serial commands, see command list,
baud rate fixed 9600, 8N1
parameter
configuration
3 sleep mode
1
1
The module goes to sleep standby, and the serial port and
wireless are closed.
Ultra-low power
sleep
6.1 Mode switch
Users can combine M0 and M1 with high and low levels to determine the working mode of the module. The 2 GPIOs
of the MCU can be used to control the mode switching; when M0 and M1 are changed: the module is idle, and
after 1ms, it can start to work according to the new mode; if the module has serial port data that has not
been transmitted wirelessly, after the transmission is completed, can enter the new working mode; if the
module receives the wireless data and sends out the data through the serial port, it needs to send the data
to enter the new working mode; so the mode switching can only be valid when the AUX output is 1, otherwise
it will be delayed switch.
For example: in mode 0, the user continuously inputs a large amount of data and performs mode switching at
the same time, and the switching mode operation is invalid at this time; the module will only perform new
mode detection after processing all user data; therefore, it is generally recommended to be : Detect the
output state of the AUX pin, wait 2ms after the AUX output is high, and then switch.
When the module is switched from other modes to sleep mode, if there is data that has not been processed
yet; the module can only enter sleep mode after processing these data (including receiving and sending).
This feature can be used for fast sleep to save power consumption; for example: the transmitter module works
in mode 0, the user initiates serial port data "12345", and then does not need to wait for the AUX pin to
be idle (high level), and can directly switch to sleep mode, The main MCU of the user is put to sleep immediately,
and the module will automatically go to sleep within 1ms after sending all the user data wirelessly, thereby
saving the working time of the MCU and reducing power consumption.
Similarly, any mode switching can use this feature. After the module processes the current mode event, it
will automatically enter the new mode within 1ms; thus saving the user's work of querying AUX, and achieving
the purpose of fast switching , such as switching from transmit mode to setting mode; the user MCU can also
go to sleep in advance before mode switching, and use the external interrupt function to obtain AUX changes
to perform mode switching.
This operation mode is very flexible and efficient. It is completely designed according to the user's MCU
operation convenience, and can reduce the workload of the entire system as much as possible, improve system
efficiency, and reduce power consumption.