Chengdu Ebyte Electronic Technology Co., Ltd.
Copyright ©2012–2019
,
Chengdu Ebyte Electronic Technology Co., Ltd.
11
6.1 Mode switching
The user can decide the operating mode by the combination of M1 and M0. The two GPIO of MCU can be used to
switch mode. After modifying M1 or M0, it will start to work in new mode 1 ms later if the module is free. If there
are any serial data that are yet to finish wireless transmitting, it will start to work in new mode after the UART
transmitting finished. After the module receives the wireless data & transmits the data through serial port, it will
start to work in new mode after the transmitting finished. Therefore, the mode-switch is only valid when AUX
outputs 1, otherwise it will delay.
For example, in mode 0, if the user inputs massive data consecutively and switches operating mode at the same time,
the mode-switch operation is invalid. New mode checking can only be started after all the user’s data process
completed. It is recommended to check the output status of AUX pin and wait 2ms after AUX outputs high level
before switching the mode.
When the module is switched from other mode to sleep mode, if the data has not been processed yet, the module
will process the data (including the receive and send) before entering the sleep mode. This feature can be used for
fast dormancy to save power. For example, the transmitting module works in mode 0, the user initiates the serial
port data
“
12345
”
, and then does not have to wait for the AUX pin to be idle (high level), It can be switched to the
sleep mode,and immediately sleeps the users’ main MCU. The module will automatically transmit the user data
through the wireless, and automatically enters sleep mode within 1ms; thus saving the working time of the MCU
and reducing power consumption.
Similarly, any mode switch can use this feature. After the module processes the current mode event, it will
automatically enter the new mode within 1ms. Thereby eliminating the user's work of querying AUX, and achieving
the purpose of fast switching. For example, switching from the transmit mode to the receive mode; the user MCU
can also enter sleep before the mode switch, and use the external interrupt function to acquire the AUX change,
thereby performing mode switching.
This operation is very flexible and efficient, and is designed according to the user's MCU's operation convenience,
and can reduce the workload of the entire system as much as possible, improve system efficiency, and reduce power
consumption.
6.2 Transmission Mode (Mode)