Gpio Level Reading; Gpio Level Output; Pwm Output - Ebyte E104-BT51 User Manual

Cc2640r2f ble5.0 low power consumption, bluetooth to serial port module
Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
before sending data to wake up the external MCU. After 10ms, the data starts to be sent, and the DATA pin is pulled high.
as shown in the picture below:

5.3 GPIO Level reading

The E104-BT51 module has four IO read pins. For some places where switch value need to be collected, the level
value of the pin can be queried through the AT command "AT + READGPIO?", this function extends the acquisition
mode of the module. Users do not need to add an additional MCU when collecting signals. They can directly collect
signals through the module, which saves users more resources and reduces the amount of user code development. It is
convenient and quick to use. To read GPIO level, refer to AT command 6.40 Read IO input.

5.4 GPIO Level output

The E104-BT51 module has four IO output pins. For some places where level signal control is needed, the GPIO
level status can be set by the AT command "AT + OUTGPIO = [para]". Users can use the E104-BT51 module as the
controller to control some devices, and the device can be controlled directly through the module without adding an
additional MCU, which saves users more resources and reduces the amount of user code development. It is convenient
and quick to use. To set the GPIOG output, refer to command 6.41 setting and read IO output.

5.5 PWM Output

The E104-BT51 module considers the comprehensiveness of the user's use, and the level control mode may not
meet the requirements and can not realize precise control in some occasions. Therefore, the E104-BT51 module has 4
PWM output pins. Users can set the PWM cycle and duty cycle to achieve the control purpose according their needs. Set
the PWMx enable via AT command "AT + PWMx = 1", set the period (frequency) of PWMx via AT command "AT +
PERIODx = [para]", and set the duty cycle of PWMx via AT command "AT + DUTYx = [para]".
cycle and period (frequency) is us, so you need to pay attention that the duty cycle should not be greater than the period
when using it. After changing the PWM frequency, the duty cycle needs to be set again according to the specific value.
When users use the E104-BT51 module for PWM control, they can directly control the PWM waveform through the
module output without adding an additional MCU, which saves users more resources and reduces the amount of user
code development. It is convenient and quick to use. For details on setting the PWM enable, refer to 6.42 Setting and
reading the PWM Enable. For details on setting the PWM output period, refer to 6.43 Setting and querying the PWM
output period. For details on setting the PWM output duty cycle, refer to 6.44 Setting and querying the PWM duty.
Send AT command: AT + PWM0 = 1, open PWM0 baud rate, output PWM square wave with default period of
100us and duty cycle of 50us.
Copyright ©2012–2019,Chengdu Ebyte Electronic Technology Co.,Ltd.
3-11
E104-BT51 User Manual
The unit of duty

Advertisement

Table of Contents
loading

Table of Contents