可变工作周期脉冲信号VHDL代码

发布于 2024-12-17 22:42:55 字数 326 浏览 1 评论 0原文

我需要为这种情况创建一个VHDL代码:

**画一个控制电路,产生一个脉冲信号:

  • 固定工作频率(100 KHz)
  • 可变工作周期 相位差应通过 8 位旋转控制的旋转方向来增加或减少。**

附加信息: D = t (on) / T

  • D = 工作周期
  • t (on) = 激活信号持续时间(8 位旋转控制)
  • T = 信号周期(常数)

在此处输入图像描述

I need to create a VHDL code for this situation:

**Draw a control circuit that generates a pulse signal with:

  • fixed working frequency (100 KHz)
  • variable working cycle
    The phase difference should be increased or decreased by the direction of the spin of a rotary control of 8 bits.**

Additional info:
D = t (on) / T

  • D = working cycle
  • t (on) = Time the activated signal lasts (rotary control of 8 bits)
  • T = signal period (constant)

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光倒影 2024-12-24 22:42:55

您似乎想要生成介于 1:255 和 255:1 之间的标记:空间比率,因此您需要 256 * 100kHz 的时钟频率。

8 位递增计数器可以以该速率自由运行。

现在有一个触发器,当计数器从 X'FF 溢出到 X'00 时设置,当定时器值从 N-1 转换到 N 时清除。其中 N 是占空比设置控制上的 8 位值,控制标记的宽度。

阈值控制触发器的输出是可变占空比 100kHz。

You seem to be wanting to generate a mark:space ratio of between 1:255 and 255:1, so you will need a clock frequency of 256 * 100kHz.

An 8 bit incrementing counter can be left free-running clocked at that rate.

Now have a flop that is SET when the counter overflows from X'FF to X'00 and that CLEARS when the timer value makes the transition from N-1 to N. Where N is the 8 bit value on your duty cycle setting control and controls the width of the mark.

The threshold controlled flop's output is your variable duty cycle 100kHz.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文