完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
如何通过在控制寄存器中写入单个值和使用逻辑门来切换PSoC中的LED?我不想通过命令切换它。
以上来自于百度翻译 以下为原文 how can we toggle an led in psoc by writing a single value in control registers and using logic gates? i don't want to toggle it through command |
|
相关推荐
3个回答
|
|
不太清楚你到底是什么意思。切换LED软件是直接写GPIO引脚。
硬件方法通常需要一个PWM或定时器组件和连接适当的GPIO输出 混合物是连接到中断的定时器组件。在处理器切换LED。我个人比较喜欢的方法因为这单定时器可以执行额外的工作来维持一个内部时钟,延误和等待。 鲍勃 以上来自于百度翻译 以下为原文 Not quite clear what you exactly mean. Toggling an LED in software is a direct write to the GPIO pin. A hardware approach usually takes a PWM or a Timer component and connect the appropriate output to the GPIO A mixture is a Timer component connected to an interrupt. In the handler toggling the LED. I personally prefer that method because this single timer can perform additional jobs at maintaining an internal clock, delays and waits. Bob |
|
|
|
您可以配置控制寄存器以产生脉冲信号。将此脉冲信号连接到拨号触发器的时钟。这就是这个样子:
以上来自于百度翻译 以下为原文 You can configure the Control Register to generate a pulse signal. Connect this pulse signal to the clock of a toggle flip-flop. Here is how this would look like: |
|
|
|
实际上,控制寄存器输出不能连接到UDB的宏单元的时钟输入。因此,12MHz时钟连接到TFF的时钟输入,并且控制寄存器的输出连接到TFF的时钟使能输入。其结果是,从控制寄存器输出的上升沿和TFF的输出将有一个短的延迟。
这是另一种具有相同概念的解决方案。 控制寄存器的输出和TFF的输出都被显式同步到48 MHz HFCLK。 以上来自于百度翻译 以下为原文 Actually the Control Registers output cannot be connected to the Macrocell's clock input of a UDB. So, the 12MHz clock is connected to the TFF's clock input and the Control Register's output is connected to the TFF's clock enable input. As the result there will be a short latency from the rising edge of the Control Registers' output and the TFF's output. This is an another solution with a same concept. Both the Control Register's output and the TFF's output are explicitly synchronized to the 48MHz HFClk. |
|
|
|
只有小组成员才能发言,加入小组>>
718个成员聚集在这个小组
加入小组1911 浏览 1 评论
1666 浏览 1 评论
3419 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1583 浏览 6 评论
1388 浏览 1 评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
210浏览 2评论
195浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
341浏览 2评论
367浏览 1评论
76浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-5-14 00:00 , Processed in 0.798092 second(s), Total 82, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号