完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我的计划有两热敏电阻以及其他一些需要监测的模拟值。所有相关的引脚是高阻抗模拟输入具有高初始驱动(尝试),进入adc_sar_seq_p4_v2_50.now,我以为这会是一个扣篮。我跟着一些例子大部分都同意了,所以我把我的项目看起来像那些。
但在开始转换,等待完成,我没有看到任何有意义的变化的数据。我可以测量电压在热敏电阻进入董事会,这确实是改变。 我想我或许需要引脚外部终端,但这并不重要,和其他的例子通常不使用它。我不使用硬件触发文档adc_start()表示它的替代品(adc_fw_trigger),和adc_isendconversion()看起来很快乐。 我上传的档案里有没有引脚的外部端子,虽然似乎没有关系。 我左右为难,谁能告诉我,我有点搞砸了什么? 谢谢,约翰 Cyrkk.CaseV02.Zip 953.4 K 以上来自于百度翻译 以下为原文 My project has a couple of thermistors along with a few other analog values that need monitoring. All associated pins are high-Z Analog inputs with high initial drive (tried both), fed into a ADC_SAR_SEQ_P4_v2_50. Now, I thought this would be a slam-dunk. I followed a number of examples - most of them agreed, so I made my project look like those. But after starting a conversion and waiting for completion, I don't see any meaningful change in the data. I can measure voltage where the thermister comes into the board, and it is indeed changing. I thought perhaps I needed external terminal for the pins, but it didn't seem to matter, and other examples don't typically use it. I'm not using a hardware trigger - documentation for ADC_Start() indicates it's a substitute ( ADC_FW_TRIGGER), and ADC_IsEndConversion() seems entirely happy. I've uploaded an archive of the case where there are no external terminals for the pins, though that doesn't seem to matter. I am in a quandary - can anyone tell me what bit I have messed up? Thanks, John |
|
相关推荐
7个回答
|
|
我已经认识到,“外部终端”是一个化妆功能,允许示意图来说明外部组件,如分压器等。这一点已经困扰了我一个月左右,我一直在处理这个平台。
以上来自于百度翻译 以下为原文 I have since realized that the "external terminal" is a cosmetic feature that allows the schematic to illustrate external components such as voltage dividers and such. That point has eluded me for the month or so that I've been dealing with this platform. |
|
|
|
厕所,
1。Opamp似乎没有被启用。请使用API opAMPSTART()。 2。ADC用硬件触发器配置。因此,StistCurror()API执行一个转换。但是,在功能read_adc()多次转换的期望是一个startconvert()函数调用。是代码陷入64线的ADC。C文件(调试模式中观察到的)? -拉吉夫 以上来自于百度翻译 以下为原文 John, 1. Opamp doesn't seem to be enabled. Please use the API Opamp_Start(). 2. ADC is configured with hardware trigger. So, StartConvert() API executes one conversion. But, in the function read_adc() multiple conversion is being expected with a single StartConvert() function call. Is the code getting stuck in line 64 of adc.c file (observed in debugging mode)? - Rajiv |
|
|
|
bbs注册 发表于 2018-9-3 12:47 抱歉我会使运放,但或许说明了五个渠道。如果我正确地理解文档和代码,我期待一个转换,在所有五个渠道,一个电话startconvert()。对isendconversion()回报随后的电话,也许有点太快,但这是猜测。谢谢您。 以上来自于百度翻译 以下为原文 Ooops - I'll enable the opamp, but that explains perhaps one of five channels. If I understand the documentation and code properly, I anticipate one conversion, on all five channels, with one call to StartConvert(). The subsequent call to IsEndConversion() returns as expected, perhaps a bit too quickly, but that's speculation. Thank you. |
|
|
|
fan266 发表于 2018-9-3 13:00 您可以将所有调用单个函数的函数转换为函数StistCurror()。但是,一旦结果可用,IsEndoStutices()函数将清除ITO寄存器中的EOSY ITO位。因此,在下一次调用这个函数时,它会循环检查EOSY-TIN,因为转换不会再次启动。 -拉吉夫 以上来自于百度翻译 以下为原文 You are right on conversion of all channels with single call to the function StartConvert(). However, IsEndConversion() function will clear EOS_INTR bit in INTR register, once the result is available. So, in the next call to this function, it loops forever checking for EOS_INTR, as the conversion is not initiated again. -Rajiv |
|
|
|
bbs注册 发表于 2018-9-3 13:11 “循环永远”意味着控件永远不会返回调用函数,情况并非如此。iSunExchange()不挂。谢谢,约翰 以上来自于百度翻译 以下为原文 "loops forever" implies that control never returns to the calling function, which is not the case. IsEndConversion() does not hang. Thanks, John |
|
|
|
我的错。在ADC线71 while循环。C文件,条件检查!状态。do-while循环将只运行一次的说法是tec_adc_wait_for_result的功能isendconversion()。在这种情况下,“尝试”变量不会有任何影响。 -拉吉夫 以上来自于百度翻译 以下为原文 My bad. In the while loop in line 71 of adc.c file, the condition check is !status. Do while loop will run only once as the argument is TEC_ADC_WAIT_FOR_RESULT to the function IsEndConversion(). In that case, "attempts" variable will not have any impact. -Rajiv |
|
|
|
bbs注册 发表于 2018-9-3 13:44 在一个完全未预料到的事件转折中,我不应该受到责备。我测试了其中一个热敏电阻,并测量了不同温度下的不同电压。原来是OPAMP后面的热敏电阻,所以输入无效。硬件工程师确定另一个热敏电阻没有正确接线。当我改变热敏电阻的温度时,我得到了变化的值。问题解决了。约翰赦免了。 感谢阅读,感谢拉吉夫回复。我真的很感激。约翰 以上来自于百度翻译 以下为原文 In a completely unanticipated turn of events, I _wasn't_ to blame. I tested one of the thermisters, and measured different voltages at different temperatures. It turned out that was the thermister behind the opamp, so that input was not valid. And the hardware engineer determined that the other thermister was not wired correctly. Now I get changing values when I vary the temperature at the thermisters. Problem solved. John absolved. Thanks to all for reading, and thanks to Rajiv for replying. I do appreciate it. John |
|
|
|
只有小组成员才能发言,加入小组>>
753个成员聚集在这个小组
加入小组2094 浏览 1 评论
1839 浏览 1 评论
3659 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1779 浏览 6 评论
1528 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
539浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
398浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
426浏览 2评论
372浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
894浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-13 01:03 , Processed in 1.349561 second(s), Total 88, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号