完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
亲爱的,这是我的第一篇文章在这个代码配置器论坛。我对这个论坛非常兴奋,谢谢你为所有代码配置器用户提供这个平台。它确实使编码快速有效。因此,我使用PIC24FJ128GA310控制器,并使用代码配置器为ADC目的编码。目前我已经选择了ADC的PIN。我已选择启用ADC、启用自动采样、12位采样分辨率、转换时钟源FOSC/2、转换时钟1、获取时间10、TAD2.5E-7、正电压REF AVDD、负电压REF AVSS。请查看附图以供参考。我的问题是,当我编程我的合作者时利用串行通信读取ADC值,比特连续变化。例如,模拟电压是750mv&;我正在读取的比特是950或948 0r952或950比特值。我的硬件似乎没问题。我必须做些什么来改变一个稳定的价值。我必须改变ACQ吗?时间,TAD还是转换时钟?善意的引导
以上来自于百度翻译 以下为原文 Dear all, Its my first post in this forum of Code configurator. I am really excited about this forum & thanks for providing this platform for all code configurator user. It has really made coding efficiently & in quick time. So, I am using PIC24FJ128GA310 controller & using code configurator to code for ADC purpose. Currently i have opted my pins for ADC . I have choose ENABLE ADC, ENABLE AUTO SAMPLING, 12 BIT SAMPLING RESOLUTION, CONVERSION CLOCK SOURCE FOSC/2, CONVERSION CLOCK 1, ACQUISITION TIME 10, TAD 2.5E-7s, POSITIVE VOLTAGE REF AVDD ,NEGATIVE VOLTAGE REF AVSS. Kindly see the attached image for reference. My issue is that while i programmed my controller & reading the ADC value using serial communication, the bits are varying continuously. for example- analog voltage is 750mv & bits i am reading is 950 or 948 0r 952 or 950 bit value again. My hardware seems to be alright. what changes i have to do to read a stable value. Shall i have to change Acq. time, TAD or conversion clock? Kindly guide. Regards NiTs Attached Image(s) |
|
相关推荐
3个回答
|
|
也张贴在这里的HTTP//www. McCHIP.COM/FUMMS/M9697 63.ASPX
以上来自于百度翻译 以下为原文 also posted here http://www.microchip.com/forums/m969763.aspx |
|
|
|
你好,你能告诉我你使用的MCC版本吗?此外,如果可以共享您的项目文件,请您这样做好吗?
以上来自于百度翻译 以下为原文 Hello, Could you let me know which version of MCC you are using? Also, if it is possible to share your project files, could you please do that? |
|
|
|
是的,在另一个线程中有一些好的建议。看起来好像没有外部过滤的ADC输入。对于像温度这样缓慢变化的值,1mSec、1k和1uF的TC过滤器应该很有帮助。你真的需要12位分辨率吗?每个步骤仅是4096个步骤的0.025%。而且,我认为您的250nSec的TAD可能太短了。如果它是个问题,MCC应该标记一个咨询,但是你不能总是依赖它。使用AVDD和AVSS作为参考,对于12位来说可能不够好。一对噪声或不稳定的MV会引起一对夫妇计数的波动。平均多个读数将提供更稳定的读数。使用定时器中断以固定间隔启动转换可以有所帮助。可以通过在一个或多个完整周期上读取平均读数来消除电力线噪声。在1000秒/秒的50个读数是50毫秒,它将工作在50和60赫兹。
以上来自于百度翻译 以下为原文 Yes, some good advice in the other thread. It looks like there is no external filtering on the ADC input. For a slowly changing value like temperature, a 1 mSec TC filter with 1k and 1 uF should help a lot. Do you really need 12 bits resolution? Each step is only 0.025% of the possible 4096 steps. Also, I think your TAD of 250 nSec may be too short. MCC should flag an advisory if it is a problem, but you can't always rely on that. Using AVdd and AVss as reference may not be good enough for 12 bits. A couple mV of noise or instability can cause a fluctuation of a couple counts. Averaging multiple readings will provide more stable readings. Using a timer interrupt to initiate conversion at fixed intervals can help. Power line noise can be canceled by taking an average of readings over one or more full cycles. 50 readings at 1000/sec is 50 mSec which will work for both 50 and 60 Hz. |
|
|
|
只有小组成员才能发言,加入小组>>
5250 浏览 9 评论
2037 浏览 8 评论
1958 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2266 浏览 5 评论
791浏览 1评论
682浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
612浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
686浏览 0评论
584浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-29 13:47 , Processed in 1.006468 second(s), Total 47, Slave 41 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号