完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,有人知道ADCIMVR(28的PG4)的数据表中的Calctime(等式9)的计算是如何工作的吗?数据表说明,CalcTimes相当于180个CPU周期,必须用DATACROK表示。我假设如果我的CPUL时钟是SysCLK/8=24MHZ/8=3MHz,则我的DATACROCK=VC1=SysCLK/n=24MHZ/12=2MHz,这是否意味着CalcTime=[180×/(3MHz)] *2MHz=120数据锁周期。数据表中提到的DATACOCK是否意味着您选择了时钟ADCIMVR?方程8中的术语是什么单位?采样率=Hz?数据锁=赫兹还是秒?CalcTime=秒或数据锁周期?请帮助
以上来自于百度翻译 以下为原文 Hi, Does anyone knows how does the calculation of the ClacTime(equation 9) in the datasheet of the ADCINCVR (Pg4 of 28) works? The datasheet states that the CalcTime is equivalent to 180 CPU cycles and must be express in terms of dataclock. I assume if my CPU_Clock is SysClk/8=24Mhz/8=3Mhz, my DataClock=VC1=SysCLK/N=24Mhz/12=2Mhz, does that mean that the CalcTime =[180*/(3Mhz)]*2Mhz = 120 DataClock cycles. Does the DataClock mention in the datasheet mean VC1,VC2 and VC3 which you chose to clock the ADCINCVR? What units are the terms in equation 8 using? Sampling Rate=hz? DataClock=hz or seconds? CalcTime=seconds or Dataclock cycles? Please help |
|
相关推荐
11个回答
|
|
对。你对钙钛矿方程的理解是正确的。对于3MHz的CPU时钟和2MHz的数据锁,CALCTET为120。这些单元是:采样速率=采样每秒数据时钟=Hz CalcTime=数据时钟的NO.
以上来自于百度翻译 以下为原文 Yes. Your understanding of the CalcTime equation is correct. For a CPU clock of 3MHz and DataClock of 2MHz, the CalcTime is 120. The units are: Sampling Rate = Samples Per Second Data Clock = Hz CalcTime = No. of Data Clocks |
|
|
|
你好,甘尼,谢谢你的确认。另一件关于阿德克文夫的事…ADC可以不使用ADCKNVRGETGETSAMP API吗?当使用ADCKNVRXGETStaseAPI时,全局中断是UITiRISE。如果微处理器中的DAC也使用GULL中断来执行ISR,ADC也会通过ADCnCvrRGETStaseAPI触发ISR吗?
以上来自于百度翻译 以下为原文 Hi Ganesh, Thanks for the confirmation. Another thing about ADCINCVR.... Can the ADC work without using the ADCINCVR_GetSample API? When the ADCINCVR_GetSample API is in use, the global interrupt is uitilise. If a DAC incorprated in the microprocessor also uses the globel interrupt to execute a ISR, will the ADC trigger the ISR also via the ADCINCVR_GetSample API? |
|
|
|
嗨,GANSIH,还有另一种方法来把包输入连接到ADCcNVR输入吗?如果我使用REFUMX获取端口(0)7来输入到ADCIMVR输入,那么我要为REFUMX的RF输入配置什么?如果我同时使用一个DAC和ADCcNvr,我是否将UM的EntPrimChod都配置为“OffStIdCalalC”?
以上来自于百度翻译 以下为原文 Hi Ganesh, Is there another way to connect the package input to the ADCINCVR input? If I'm using a REFMUX to get port[0]7 to input to the ADCINCVR input, what do i configure for the REF input of the REFMUX? If i'm using a DAC and the ADCINCVR at the same time, do i configure both UM's IntDispatchMode to "OffsetPreCalc"? |
|
|
|
对。只能使用ADCJETGETSAMPLE函数获取ADC进行采样。此外,ADC转换涉及读取ADC结果时的一些中断处理。DAC不使用任何中断。您可以将一些PUT2引脚直接连接到ADC,而不必经过CT块。取决于SC块在哪里放置ADC,直接的PART2连接变化。您可以通过点击ADC的输入参数来检查Purt2引脚的可用性。InDebug模式参数仅适用于动态重新配置。如果不使用动态重新配置,则此参数与ADC没有相关性。
以上来自于百度翻译 以下为原文 Yes. You can only get the ADC to sample using the ADC_GetSamples function. Also, the ADC conversion involves some interrupt processing when reading the ADC results. The DAC does not use any interrupts. You can connect some of the Port2 pins directly to the ADC without having to go through the CT blocks. Depending on the SC block where you place your ADC, the direct Port2 connection varies. You can check the availability of the Port2 pin by clicking on the Input parameter of the ADC. The InitDispatchMode parameter only applies to dynamic reconfiguration. If you are not using dynamic reconfiguration, then this parameter has no relevance to the ADC. |
|
|
|
你好,甘尼什!谢谢你的回复。也许我应该提供更多关于DAC的信息。我已经在DAC上工作,从先前项目的“正弦波发生器”中得到的示例项目产生正弦波。该示例项目似乎使用16位计数器来生成全局中断来触发ISR,其中DAC的指令从查找表中提取相关值并输出该值驻留。如果我要将ADCKNVR添加到项目中,UM是否会通过ADCIMVR和16位计数器对DAC通过全局中断来影响彼此的操作?如果在ADCGETGETSAMP函数中使用零值,ADC将连续获得样本。在函数提示函数中使用其他值做什么?最后一个问题……在ADCIMVR的CALCTIME参数中放入什么值?ADCIMVR的CalcTimes参数不是大约180个CPU周期吗?我必须将180个CPU周期转换为DATAcLACK循环,并将参数作为DATACLK周期输入吗?
以上来自于百度翻译 以下为原文 Hi Ganesh! Thank you for the reply. Maybe i should give more information about the DAC. I've been working on the DAC to produce the sinewave from the example project recommanded from the previous tread "Sinewave generator". The example project seems to use the 16BIT Counter to generate a global interrupt to trigger the ISR where instructions for the DAC to pick the relevant value from the lookup table and output the value resides. If I'm to add in the ADCINCVR into the project, will the UM blocks from the ADCINCVR and the 16BIT Counter for the DAC effect each other's operation via the Global interrupt? If a zero value is used in the ADC_GetSample function the ADC will get samples continueously. What will other value useds in the function prompt the function to do? Last question...What value is to put in the CalcTime parameter for the ADCINCVR? Isn't the CalcTime parameter for the ADCINCVR approximately 180 CPU cycles? Must I convert the the 180 CPU cycles to Dataclock Cycles and input the parameter as DataClk cycles? |
|
|
|
如果设置了CalcTimes参数,计时器中断不会影响ADC。CalcTimes参数是ADC将保持处理器的结果的数据时钟的数目,即使处理器忙于某些ISR。在等式中使用的数字180是ADC的ISR读取ADC结果所采取的CPU周期的数目。如果添加计时器ISR使用的时钟周期数,则即使在ADC中断之前计时器的中断触发,ADC结果也不会损坏,直到计时器ISR和ADC ISR被执行。例如,如果你的定时器ISR需要170个CPU周期来执行,那么在CalcTimes方程中使用值350(180+170)。另一方面,当计时器中断发生时,如果处理器忙于ADC的中断,则定时器的中断仅在ADC中断完成后才被服务。因此,这将导致一些中断延迟,这可能反映在输出正弦波上。最坏情况下的中断等待时间将是180个CPU周期。将计时器放置在比ADC的数字块更高的行中。这将使计时器处于更高的中断优先级,并确保当ADC和定时器中断都处于待定状态时,定时器ISR首先执行。
以上来自于百度翻译 以下为原文 If you set the CalcTime parameter right, the interrupt of the Timer will not affect the ADC. The CalcTime parameter is the number of data clocks that the ADC will hold the result for the processor even if the processor is busy with some ISR. The number 180 used in the equation is the number of CPU cycles taken by the ADC's ISR to read the ADC result. If you add the number of clock cycles used by the Timer's ISR, then even if the Timer's Interrupt triggers just before ADC's interrupt, the ADC result will not corrupt till the Timer ISR and the ADC ISR are executed. So, for example, if your timer ISR takes 170 CPU cycles to execute, then use the value 350 (180 + 170) in the CalcTime equation. On the other hand, when the Timer Interrupt occurs, if the processor is busy with the ADC's interrupt, then the Timer's interrupt will be serviced only after the ADC's interrupt is completed. So, this will result in some interrupt latency which may reflect on the output sine wave. The worst case interrupt latency would be 180 CPU cycles. Place the Timer in a higher row than the ADC's digital blocks. This will place the Timer in a higher interrupt priority and will ensure that the Timer ISR executes first when both ADC and Timer interrupts are pending. |
|
|
|
嗨,GANSH,我如何确定定时器ISR的CPU周期数,以便增加ADC 180CPU周期的值?不管怎样,我把程序的ADC部分写成:int IDATA;…当(1){if(ADCcNvrr11fsDATAAccess)时!= 0){IDATA= ADCKNVRR1IGIGATDATA();AdcCnvr1LyClul旗ar();如果(IDATA和LT;140){…}…{{…}}},ADCcNVR数据格式被设置为未签名。我还设置了ADCcNVR Calc时间为248。我写的程序或我做的设置有问题吗?
以上来自于百度翻译 以下为原文 Hi Ganesh, How do I determine the numbers of CPU cycles the Timer ISR take so as to add the value with the ADC 180CPU cycles? Anyway I've written the ADC part of the program as: int iData; void main(void) { . . . while(1) { if (ADCINCVR_1_fIsDataAvailable() != 0) { iData = ADCINCVR_1_iGetData(); ADCINCVR_1_ClearFlag(); if(iData < 140) {........} else {........} } } } The ADCINCVR Dataformat is set to unsigned. I've also set the ADCINCVR Calc Time to 248. Is there a problem with the program i've written or the settings I've done? |
|
|
|
嗨,黄色,如果你已经编写了C中的定时器ISR,你就必须打开.LST文件,并手动为函数中的所有指令添加CPU周期。检查汇编语言用户指南(从帮助和gt;和文档菜单)了解不同指令的CPU周期的细节。
以上来自于百度翻译 以下为原文 Hi Yellow, If you have written the Timer ISR in C, you will have to open the .lst file and manually add the CPU cycles for all the instructions in the function. Check the Assembly Language User Guide (from Help >> Documentation menu) for details of CPU cycles of different instructions. |
|
|
|
你好,甘尼什!谢谢你提供的信息。我仍然面临着一些问题。似乎没有处理任何数据。我希望我已经提供了足够的信息进行讨论。全局资源功率设置[Vcc/ysCLK]~5V/24MHz VC1= SysvLK/N~12 REF MUX~P2(4)+/-P2〔6〕,其余为默认设置:AdCcNVR的属性设置:输入:Pur2202时钟时基~(12)AdCdCase~(8)CalcTime~ 520数据格式~VestStudio的数字块布局,我已经把DAC计数器放在DBB00和01,ADCcNVR CNT在DCB12和ADCcNVR PWM在DBB20和21。所有的数字块时钟来自VC1(2MHz)。DAC计数器将产生266Hz的全局中断,以触发DACS输出。对于模拟块放置,ADC被放置在ASD13,并从PoT2L2输入。我有一组DAC8放置在ASC10和ASD20,模拟总线到BUF 0,然后到PotoS003。然后我将另一组DAC8放置在ASC11和ASD21,模拟总线到BUF 1,然后到PotoS003。我编写的C编程如下:字节指针;int IDATA;空main(空隙){M8C*EnabaseTime:Audi16Sy1EnabeLeTo();DAC8Y1EnLead(DAC8Y1)高启动;DAC8AR2LYSTART(DAC8L22HIGPOWER);ADCINVRR1LYSTART(ADCINVRR1LIGHPOWER);ADCINVRR1L GETSAMPLE(0);而(1){if(AccCnvr11sFiffAdAdabable)()!= 0){ 1 = adcincvr_1_igetdata();adcincvr_1_clearflag();dac8_1_start(dac8_1_lowpower);dac8_2_start(dac8_2_lowpower);} } } #语用interrupt_handler counter_isr;虚空(void){ counter_isr dac8_1_writeblind(sinetable1 [指针]);dac8_2_writeblind(sinetable2 [指针]);指针++;如果(指针>;= 64){ 0 } }指针= sinetable1和sinetable2 64分查找表存储在ROM中。当我开机的cy8c29466,输出给功率信号而不是一个低信号。如果ADC读取和处理信号的低功率信号应观察。有人评论吗?
以上来自于百度翻译 以下为原文 Hi Ganesh! Thank you for the info. I'm still facing some problems with the ADCINCVR. It seems not to be processing any data. I hope that I've provided enough information for a discussion. Global Resources PowerSetting[Vcc/SysCLK]~5V/24MHz VC1 = SysVlk/N~12 Ref Mux~P2[4]+/-P2[6] The rest are as default Here are the properties settings of the ADCINCVR I've set: Input~Port2_2 ClockPhase~Swap Clock~VC1(Which is 2Mhz) ADCResolution~8 CalcTime~520 DataFormat~Unsigned IntDispatchMode~ActiveStatus For the Digital Block placements, I've placed the DAC Counter at DBB00 & 01, the ADCINCVR CNT at DCB12 and the ADCINCVR PWM at DBB20 & 21. All Digital blocks clock are from VC1(2Mhz). The DAC counter will generate a global interrupt in 266hz to trigger the DACs to output. For the Analog blocks placements the ADC is placed at ASD13 and input from PORT2_2. I've one set of DAC8 placed at ASC10 and ASD20, Analogbus to Buf 0 then to Port_0_3. Then I've another set of DAC8 placed at ASC11 and ASD21, Analogbus to Buf 1 then to Port_0_3. The C programming I've written is as follows: BYTE Pointer; int iData; void main(void) { M8C_EnableGInt; Counter16_1_Start(); Counter16_1_EnableInt(); DAC8_1_Start(DAC8_1_HIGHPOWER); DAC8_2_Start(DAC8_2_HIGHPOWER); ADCINCVR_1_Start(ADCINCVR_1_HIGHPOWER); ADCINCVR_1_GetSamples(0); While(1) { if (ADCINCVR_1_fIsDataAvailable() != 0) { iData = ADCINCVR_1_iGetData(); ADCINCVR_1_ClearFlag(); DAC8_1_Start(DAC8_1_LOWPOWER); DAC8_2_Start(DAC8_2_LOWPOWER); } } } #pragma interrupt_handler Counter_ISR; void Counter_ISR(void) { DAC8_1_WriteBlind (SineTable1[Pointer]); DAC8_2_WriteBlind (SineTable2[Pointer]); Pointer++; if(Pointer >= 64) {Pointer = 0} } Sinetable1 and SineTable2 are 64 Points lookup tables stored in ROM. When i powered up the CY8C29466, the output gives a highpower signal instead of a lowpower signal. If the ADC is reading and processing signal a lowpower signal should be observed. Any comments from anyone? |
|
|
|
抱歉…我漏掉了一个数据时钟~ysCLK/8
以上来自于百度翻译 以下为原文 Sorry...I left out one data CPU_Clock~SysCLK/8 |
|
|
|
关于使用ADCcNVR及其API“ADCN”
是否有一个已知列表的原因,为什么AdcCnVR用户模块永远不会提供数据可用的指示? 我问的原因是当我评论下面的代码行… //If(AdcCvrr11IF)(AdcCnvr11fsDATAAccess()!= 0)()!= 0) ……因此,我允许无条件进入代码块,包括获取A/D示例和清除标志,所有的东西看起来都很有效。我可以看出有效的A/D读数能够从ADCcNVR用户模块中获取。 但是,当我取消对检查数据可用性的上述代码行的注释时,L永远无法获得A/D读数。 有什么已知的原因,API*FixDaaAdvabl()总是返回“没有数据可用”? 非常感谢, ——DJR 以上来自于百度翻译 以下为原文 Regarding use of ADCINCVR and its API 'ADCINCVR_1_fIsDataAvailable' ... Is there a known list of reasons why the ADCINCVR user module would never provide an indication for data being available? Reason I ask is when I comment out the following line of code... //if (ADCINCVR_1_ if (ADCINCVR_1_fIsDataAvailable() != 0) () != 0) ...and I therefore allow unconditional entry into the block of code that includes getting the A/D sample and clearing the flag, everything appears to work great. I can tell valid a/d readings are able to be acquired from the ADCINCVR user module. However, when I uncomment the above line of code that checks for data availability, l can never acquire an A/D reading. What are the known reasons that API *fIsDataAvailable() will always return 'no data available'? Thanks much in advance, --DJR |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2106 浏览 1 评论
1853 浏览 1 评论
3671 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1786 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
570浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
423浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
437浏览 2评论
384浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
915浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 07:01 , Processed in 0.988905 second(s), Total 67, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号