用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%的占空比。
我做的就是这样的了。。不知道能不能帮到你。
回复
打赏帖 | |
---|---|
汽车+汽车地线之间连接处理被打赏20分 | |
【Zephyr】使用Zephyr外设初始化过程解析被打赏30分 | |
【S32K146】S32DS watchdog 配置使用被打赏20分 | |
【Zephyr】使用 IAR 调试 Zephyr 镜像被打赏20分 | |
赚取电动螺丝刀+电源电路理论知识分享1被打赏5分 | |
我想要一部加热台+分享常见运算放大器电路的应用被打赏5分 | |
【Zephyr】MCXN947 Zephyr 开发入门适配shell被打赏20分 | |
我想要一部加热台+常见的MOS管驱动电路被打赏5分 | |
【我要开发板】6.联合MATLAB记录数据被打赏50分 | |
【换取手持数字示波器】MicrochipMPLABHarmony框架下串口调试printf输出记录被打赏29分 |