用applilet3实现定时器——超简单:16楼
以前的问题:
被 applilet3 搞晕了,到底怎么用?请求大虾指点!手册上有关IAR调试的一段英文:[YRPBRL78G13 Kit User Manual(P50-51)]
As can be seen from the debugger window, the user can now set Software breakpoints in the code or assembler windows. This can be done simply by double clicking on the C-Source code line or the in the assembler window (Other methods of setting software breakpoints by “right clicking” the mouse button or using the pull down menus are available).
One hardware (Event) breakpoint is available so that a break can be made on a data event (for example a write of a specific value from the ADC (Potentiometer)). The event can be set up as shown below, by clicking on the “Edit Events…” feature on the “Emulator” pull down menu.
定时器 超简单
关键词: 定时器 简单
这个我刚刚做完,,呼吸灯是PWM方式做的,但D2不是默认的PWM输出端口。只能通过配置好的PWM中,产生中断来进行,但这不是PWM正常的操作方式,中断会占用程序运行资源的,所以我试了试,还是没用这方法。
我看电路上的D1做电源指示太浪费了,所以把灯的一个引脚不接地,接到了P31口上,,配置了通信2和3为PWM输出,,在软件中定时改变PWM输出的占空比就行了。注意在配置的时候,如果不是必须的话,不要产生中断。
做呼吸灯时,灯的亮度在30%时就很亮了,,所以我的呼吸灯只加到20%的占空比。
我做的就是这样的了。。不知道能不能帮到你。
回复
我要赚赏金打赏帖 |
|
|---|---|
| OK1126B-S开发板下以导航按键控制云台/机械臂姿态调整被打赏¥29元 | |
| 【树莓派5】便携热成像仪被打赏¥36元 | |
| 【树莓派5】环境监测仪被打赏¥35元 | |
| OK1126B-S开发板下多时段语音提示型电子时钟被打赏¥27元 | |
| OK1126B-S开发板下函数构建及步进电机驱动控制被打赏¥25元 | |
| 【S32K3XX】LPI2C 参数配置说明被打赏¥20元 | |
| OK1126B-S开发板的脚本编程及应用设计被打赏¥27元 | |
| 5v升压8.4v两节锂电池充电芯片,针对同步和异步的IC测试被打赏¥35元 | |
| 【S32K3XX】S32DS LPI2C 配置失败问题解决被打赏¥22元 | |
| 【S32K3XX】FLASH 的 DID 保护机制被打赏¥19元 | |
我要赚赏金
