timer的各种模式和极性介绍(重要)

有效电平与极性的概念

TIM_OCMode_Active:set output on match   low_true_pulse   
TIM_OCMode_Inactive:clear output on match  high_true_pulse
TIM_OCMode_Toggle:toggle TIM_OCMode_Toggle

规律:
low_true_pulse 表示初始到match是有效电平。(low是前面,high是后面)
high_true_pulse 表示match到mod是有效电平。

好记住:
low_true_pulse表示前面的(初始到match)是有效电平。
high_true_pulse表示后面的(match到mod)是有效电平

理解:
set on channel match 《==等价于==》  low_true_pulse(平时为低,匹配变高--平时true,所以是low_true_pulse)
clear on channel match 《==等价于==》  high_true_pulse(平时为高,匹配变低--平时true,所以是high_true_pulse)

规则1:
low_true_pulse 表示初始到match是有效电平。
polarity=low时,初始到match为低电平,match之后为高电平。
polarity=high时,初始到match为高电平,match之后为低电平。

规则2:
high_true_pulse 表示match到mod是有效电平。
polarity=low时,match到mod为低电平,初始到match为高电平。
polarity=high时,match到mod为高电平,初始到match为低电平。


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值