完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我搞不清楚ADC在哪里放样品,正在查阅设备系列的参考手册。这里是ADC部分的链接。
以上来自于百度翻译 以下为原文 I'm having trouble sorting out where the ADC is putting samples, and am looking at the reference manual for the device family. Here's the link to the section on ADC. |
|
相关推荐
1个回答
|
|
1。在这个示例“16.10.2模数转换,同时扫描16个模拟输入”中,它们为每个16个采样设置中断,我认为这意味着在第一个中断时从缓冲区中的每个信道获得第一个采样。但是表看起来是这样的:ADC缓冲区@First ADC中断ADC1BUF0:AN0样本1ADC1BUF1:AN1样本2……ADC1BUFE,AN14样本15ADC1BUFF,AN15样本16这让我觉得ADC1BUF1包含第二个样本,在这个例子中恰好是AN1。好……不是我本来想说的那样,它应该是这样的:ADC缓冲器@First ADC中断ADC1BUF0:AN0样本1ADC1BUF1:AN1样本1……ADC1BUFE,AN14样本1ADC1BUFF,AN15样本1BUT等待!如果我看一下下一个例子,其中它们同时对4个通道进行采样(在CH0上扫描一个通道)下面是这个表的样子(完整的表用来说明SIMSAM=1)ADC缓冲区@FirstADCInter.ADC1BUF0:AN4示例1ADC1BUF1:AN0样本1ADC1BUF2:样本1ADC1BUF2:样本1ADC1BUF3:样本1ADC1BUF3:样本1ADC1BUF4:样本1ADC1BUF5:样本1ADC1BUF5:样本1ADC1BUF5:样本2ADC1样本2ADC1BUF6:样本2ADC1BUF7:样本2ADC1样本2ADC1BUF7:样本2ADC1样本2ADC1BUF7:样本2ADC1样本2ADC1BUF7:样本2ADC1样本2ADC1BUF7:样本2样本2ADC1BUF7:样本2ADC1样本2ADC1BUF7:样本2样本2ADC1样本2ADC1BUF7:样本2ADC1样本2ADC1BUF7:样本2样本2ADC1样本2ADC1样本2ADC1BUF7:样本2AFE:AN1样品4ADC1BUFF:AN2样本4:这正是我应该如何做的。可以看到,它用SIMSAM=1将每个样本序列作为单个样本处理,因为它在第4个样本序列之后被中断,因此有4组样本),但是,它根据ANx被采样的次数增加样本计数器,因此在第4次采样之后增加AN7个样本1。同时采样。那么这里的交易是什么呢?这些公约中的一个必须是错误的,即使考虑到SimsAM。如果遵循第一示例中使用的约定,您将得到1,1,1,1,12,2,2,2,2,2,3,3,3,34,4,4,4,4,4,4(使用SIMSAM=1表示“每组样本被取为一个样本”)或1,2,3,4,5,6,7,8,9,10,11,12 13,14,15,16(不管SIMSAM脚注如何将每个样本视为单个计数)和等待。看看例子16.106。有一个随机的“AN2样本28”扔在那里,在蓝色,当所有其他数字是1和2的!!!!我已经看过了勘误表,但似乎还没有看到任何东西。有人能告诉我这是怎么工作的吗?
以上来自于百度翻译 以下为原文 1. In this example "16.10.2 Analog-to-Digital Conversions While Scanning Through 16 Analog Inputs", they set the interrupt for every 16th sample, which I would take mean that you get the 1st sample from each channel in the buffer at the first interrupt. But the table looks like this: ADC Buffer @ First ADC Interrupt ADC1BUF0: AN0 Sample 1 ADC1BUF1: AN1 Sample 2 ... ADC1BUFE, AN14 Sample 15 ADC1BUFF, AN15 Sample 16 Which makes me thing that it's saying ADC1BUF1 Contains the Second Sample, which happens to be be AN1 in this case. Fine...not the way I would have put it, which would have been like this: ADC Buffer @ First ADC Interrupt ADC1BUF0: AN0 Sample 1 ADC1BUF1: AN1 Sample 1 ... ADC1BUFE, AN14 Sample 1 ADC1BUFF, AN15 Sample 1 BUT WAIT! If I look at the next example where they are simultaneously sampling 4 channels (channel scanning the one on CH0) Here's what the table looks like (complete table to illustrate my point, blank lines for sample group with SIMSAM = 1) ADC Buffer @ First ADC Interrupt ADC1BUF0: AN4 Sample 1 ADC1BUF1: AN0 Sample 1 ADC1BUF2: AN1 Sample 1 ADC1BUF3: AN2 Sample 1 ADC1BUF4: AN5 Sample 1 ADC1BUF5: AN0 Sample 2 ADC1BUF6: AN1 Sample 2 ADC1BUF7: AN2 Sample 2 ADC1BUF8: AN6 Sample 1 ADC1BUF9: AN0 Sample 3 ADC1BUFA: AN1 Sample 3 ADC1BUFB: AN2 Sample 3 ADC1BUFC: AN7 Sample 1 ADC1BUFD: AN0 Sample 4 ADC1BUFE: AN1 Sample 4 ADC1BUFF: AN2 Sample 4 This is exactly how I though it should be. You can see that it treats each sample sequence as a single sample with SIMSAM = 1, because it is interrupted after the 4th sample sequence and hence has 4 sets of samples), BUT, it increments the sample counter based on the number of times the ANx was sampled, hence the AN7 Sample 1 after the 4th simultaneous sampling. So what's the deal here? One of these conventions have to be wrong, even when taking SIMSAM into account. If you follow the convention used in the first example you would get 1,1,1,1 2,2,2,2 3,3,3,3 4,4,4,4 (using SIMSAM=1 to say "each set of samples is taken to be one sample") or 1,2,3,4 5,6,7,8 9,10,11,12 13,14,15,16 (treating each as individual counts regardless of the SIMSAM footnote) AND WAIT. Look at example 16.10.6. There's a random "AN2 Sample 28" thrown in there, out of the blue, when all the other numbers are 1's and 2's!!! I've looked through the Errata, but don't seem to see anything about this yet. Can someone explain to me how this is supposed to work. |
|
|
|
只有小组成员才能发言,加入小组>>
5184 浏览 9 评论
2005 浏览 8 评论
1932 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3179 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2230 浏览 5 评论
742浏览 1评论
629浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
512浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
640浏览 0评论
538浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 06:01 , Processed in 1.147520 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号