完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一个CY8C3666206的设计,在其中设计了WaveDAC8组件。它在运行时使用两个频率。我希望能够基于PCBAdvor来设置或指向新的频率。例如,如果在1处寻址PCBIS,则使用(或生成)大约1kHz的两个频率。如果在2处使用(或产生)两个频率在2kHz左右。
有没有一种方法来给WaveDAC8一个常数FRQ(比如说5kHz),然后根据PCBAdt划分(或减去)FRQ? 我没有坚持使用WaveDAC8。如果还有另一种可行的方法(PWM)?我愿意提出建议。 以上来自于百度翻译 以下为原文 I have a CY8C3866-206 design where I utilaize the waveDAC8 component. With it I create two frequencies that are used at run time. I'd like the ability to set, or point to new, frequencies, based on a PCB address. For example; if a PCB is addressed at 1 then use (or generate) the two frequencies around 1khz. If addressed at 2 use (or generate) the two frequencies around 2khz. Is there a way to feed the waveDAC8 a constant freq (say 5khz) then divide (or subtract from) that freq based on PCB address? I am not stuck on using waveDAC8. If there is another viable method (PWM??) I'm open for suggestion. |
|
相关推荐
6个回答
|
|
是的,您可以在运行时更改WaveDAC8采样频率。您可以访问内部时钟并更改它,但我建议使用外部时钟选项来代替。如果启用外部时钟选项,只要您不超过内部VIDAC的更新速率,就可以更改时钟。
作记号 以上来自于百度翻译 以下为原文 Yes you can change the WaveDAC8 sample frequency during runtime. You can either access the internal clock and change it but, I recommend to use the external clock option instead. If you enable the external clock option, you can alter the clock however you wish, as long as you don't exceed the update rate of the internal viDAC. Mark |
|
|
|
您可以使用WaveDAC8和一个可以由定时器组件生成的外部时钟。定时器的周期可以通过程序来改变,以使频率适应您的需要。
鲍勃 以上来自于百度翻译 以下为原文 You can use the WaveDac8 with an external clock that could be generated by a Timer component. The period of the timer can be changed by the program to adapt the frequency to your needs. Bob |
|
|
|
@ MEH
交叉邮局,幸运的是我们有相同的意见 鲍勃 以上来自于百度翻译 以下为原文 @meh Crossover post, luckily we have the same opinion Bob |
|
|
|
谢谢你们的回复!
所以,我添加了一个时钟组件(5kHz==‘基地’FRQ),并启用了WaveDAC8上的外部时钟。但我正在寻找如何改变这个“基础”FRQ来驱动DAC的空白。我会给“基地”FRQ添加一个中断,然后用软件来操纵它(或者可能使用MUX?)然后,DACck pin钟?在任何情况下,我都不知道如何从函数调用时钟。最后,一旦DACIS计时,如何控制推杆?1)通过外部时钟调用WaveDAc8Enable()和/或2(没有时钟,DACWONT产生输出。哪种方法比较好? 以上来自于百度翻译 以下为原文 Thanks for both replies! So, I've added a clock component (5khz == 'base' freq) and enabled the external clock on the waveDAC8.. But I'm drawing a blank on how to change that 'base' freq to drive the DAC. Would I add an interrupt to the 'base' freq then manipulate it in software (or perhaps use a MUX?), then clock the DAC ck pin? In any event, I don't see how to clock the DAC from a function call. Finally, once the DAC is clocked how is the putput controlled? 1) by calling waveDAC8_Enable() , and/or 2) by the external clock (where is there is no clock the DAC wont produce output. Which of those is the prefered method? |
|
|
|
我建议“……外部时钟,它可以由一个定时器组件生成”。
因此,使用一个定时器并以24MHz的频率给它(得到一些净空)。WaveDac时钟必须是你想要的频率*样本数量(来自WaveDAC属性窗口)。相应地设置计时器的周期。当启动所有组件时,所有的东西都会自由运行,没有CPU的介入。决定你自己(按钮按下,滑块移动)你想改变计时器的周期。 快乐编码 鲍勃 以上来自于百度翻译 以下为原文 I suggested "...external clock that could be generated by a Timer component". So use a timer and feed it with 24MHz (to get some headroom).The WaveDac clock must be your desired frequency * Number of Samples (from WaveDac property window). Set the timer's period accordingly. When you start all components everything will run freely without CPU intervention. Decide yourself when (Button press, slider move) you want to change timer's period. Happy coding Bob |
|
|
|
WaveDAC在其最基本的水平上是一个波形值表。
一个DMA引擎,连续抽取一个样本 每次采样,并将其发送到DAC。DMA的速率和大小 在表中确定频率。 最简单的方法是计时器方法,它具有设置除数的API, 因此,输出时钟速率到WaveDAC。 一种更复杂的方法是停止WWaveDAC,并使用它的设置API。 确定波形和频率。 所以,我添加了一个时钟组件(5kHz==‘基地’FRQ),并启用了WaveDAC8上的外部时钟。但我正在寻找如何改变这个“基础”FRQ来驱动DAC的空白。 右键单击“组件”,选择“数据表”,在API上有一个扇区 控制定时器,其除数等。如果你只是使用一个时钟它有一个 API来控制其频率。 我会给“基地”FRQ添加一个中断,然后用软件来操纵它(或者可能使用MUX?)然后,DACck pin钟? 不需要,除非您希望FRQ更改与其他事件同步。 只需使用计时器的时间API来设置它的输出频率。 在任何情况下,我都不知道如何从函数调用时钟。 定时器输出被馈送到WaveDAC时钟,并且触发DMA过程。 最后,一旦DACIS计时,如何控制推杆? 可以通过检查它的属性来缓冲WaveDAC。那是一个运放。 跟随者,你喂养到一个别针。WaveDac幅度范围是表的折衷 值和8位DAC固有范围和VREF压缩。 1)通过外部时钟调用WaveDAc8Enable()和/或2(没有时钟,DACWONT产生输出。哪种方法比较好? 也可以,不过如果使用计时器也可以启动那个或那个门的时钟。 到WaveDAC。 问候,Dana。 以上来自于百度翻译 以下为原文 The Wavedac, at its most basic level, is a table of waveform values for one period, and a DMA engine that takes those samples, consecutively, one sample at a time, and send that to a DAC. The rate of the DMA and the size of the table determine the frequency. So easiest method is the timer approach, and it has APIs that set its divisor, hence output clock rate to the Wavedac. A more complicated approach is stop the wWavedac, and use its setup APIs to determine waveshape and frequency. So, I've added a clock component (5khz == 'base' freq) and enabled the external clock on the waveDAC8.. But I'm drawing a blank on how to change that 'base' freq to drive the DAC. Right click component, pick datasheet, there is a secion on APIs to control timer, its divisor, etc.. If you are just using a clock it has an API to control its frequency. Would I add an interrupt to the 'base' freq then manipulate it in software (or perhaps use a MUX?), then clock the DAC ck pin? Not necessary unless you want the freq change to be synch to some other event. Just use period API for timer to set its output freq. In any event, I don't see how to clock the DAC from a function call. The Timer output is feed to Wavedac clock, and that triggers the DMA process. Finally, once the DAC is clocked how is the putput controlled? The Wavedac can be buffered by checking a property of it. That is an OpAmp follower which you feed to a pin. Wavedac amplitude range is a tradeoff of table values and 8 Bit DAC intrinsic range and Vref choosen. 1) by calling waveDAC8_Enable() , and/or 2) by the external clock (where is there is no clock the DAC wont produce output. Which of those is the prefered method? Realy either, although if using timer might as well start that or gate its clock to the Wavedac. Regards, Dana. |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2075 浏览 1 评论
1829 浏览 1 评论
3643 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1766 浏览 6 评论
1517 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
516浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
370浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
413浏览 2评论
360浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
867浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-28 23:32 , Processed in 1.000476 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号