可变工作周期脉冲信号VHDL代码
我需要为这种情况创建一个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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎想要生成介于 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.