Chengdu Ebyte Electronic Technology Co.,Ltd.
E180-Z8910SP User Manual
Copyright ©2012–2021
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
32
01
PIO10 port
02
PIO11port
In/Out: Channel output/input mode
0 output
1 input
level: the level status of the channel
0 low level
1 high level
2 flip
Note: When configured as input, level represents the input level value of 0 (low level) or 1 (high level), and when
configured as output, level represents 0 (low level), 1 (high level), 2 (electrical Flip) output.
6.5.20 User pwm parameters
Read command format:
Command format
Command example
Send: FE 06 21 PWMId FF
Return: FB 21 PWMId start/stop
Period Period duty duty
Send: FE 06 21 00 FF
Return: FB 21 00 01
0A 3E 63 50
Configuration instruction format:
Command format
Command example
Send: FD 06 21 PwmId start/stop
Period1 Period2 duty1 duty2 FF
Return: FA 20
Send: FD 06 21 00 FF 03 65 02 48 FF
Return:FA 21
Pwm peripheral configuration data format (6 Byte): PwmId start/stop Period1 Period2 duty1 duty2
PwmId: Channel ID
Channel ID
PWM GPIO port
0x00
PIO20 port
0x01
PIO19 port
0x02
PIO18 port
0x03
PIO17 port
start/stop: start and stop channel PWM output
0xFF means to start PWM in the unit of 1mS, the parameter range is 0-1700, and the maximum period that can be set is
1700mS.
0xFE means to start PWM with 1uS as the unit, and the parameter range is 0-1700, then the maximum period that can be
set is 1700uS.
0x00 means stop PWM
period: pwm cycle time (determine the unit of the cycle and the maximum cycle according to the start/stop byte)
Period1 represents the upper 8 bits of the period
Period2 means that the lower 8 of the period is
duty: pwm duty cycle time (according to the start/stop byte to determine the cycle unit and the maximum cycle)