Microchip
直播中

刘耀清

7年用户 213经验值
私信 关注
[问答]

PIC32MZ ADC模块如何区分数据

我正在为我的大学工作,使用PIC32 MZ2048 EFH144(12位ADC),我将使用和声配置器版本2.02建立ADC/DMA:通过ADC接口10个模拟麦克风。PIC32 MZ具有6个ADC模块,(ADC0 ADC4)和ADC7。(ADC0 ADC4)一次多路复用两个信道;而ADC7通过ADC5-ADC42进行扫描/多路复用。对于12位ADC,这些信道的采样率是3.125毫秒。我想知道什么是关注点和差异,如果我用ADC0 ADC4接口所有10个麦克风(因为它们可以同时复用两个信道)。或者,使用模块ADC7和扫描/多路复用所有10个麦克风只使用这个ADC模块,从ADC5-ADC42扫描?另外,在这两种情况下,如果两个麦克风被复用到ADC0、ADC1等中,我如何区分数据。或者它们都被连接到ADC7中?我附上了一张ADC模块的图片,谢谢。

以上来自于百度翻译


      以下为原文

    I am working for a project for my University, using the PIC32MZ2048EFH144 (12 Bit ADC) and I will be setting up the ADC/DMA using hARMony configurator version 2.02.

Objective: Interface 10 analog microphones through the ADC.

This PIC32MZ has 6 ADC modules, (ADC0-ADC4) and ADC7. (ADC0-ADC4) multiplexes two channels at once; whereas, ADC7 scans/multiplexes through ADC5-ADC42. The sampling rate of these channels is 3.125 Msps for a 12-bit ADC.

I want to know what are the concerns and differences are if I am interfacing all 10 microphones with ADC0-ADC4 (Since these can multiplex two channels at once). OR, using module ADC7 and scanning/multiplexing all 10 microphones using just this ADC module, which scans from ADC5-ADC42?

Also, given either of these two circumstances, how do I differentiate between the data if two microphones are being multiplexed into ADC0, ADC1, etc.. or all of them being interfaced into ADC7?

I included a picture that refers to the ADC modules.

Thank You.




   Attached Image(s)

回帖(4)

陈晨

2019-4-25 15:41:39
第一步:你的样品率是多少?假设44千赫和10个频道,你需要每秒440000个样本,所以它可能是一个单独的AutoSCAN ADC。你如何区分数据?这说明你没有读到数据表和与A/D相关的寄存器,你需要稍微增加一点。这些A/D不容易安装和使用。您可能还想看看示例应用程序来寻找一个例子。

以上来自于百度翻译


      以下为原文

    Step one What is your sample rate?
assuming 44Khz and 10 channels you would need 440,000 samples per second so it maybe be possible with a singe autoscan ADC.
how do you differentiate data? That says you did not read the data sheet and the registers associated with the A/D.
You will need to step up a little.  These A/D are not easy to setup and use.
You may also want to look at the sample Apps to look for an example.
举报

戴双宝

2019-4-25 15:51:49
现在可以假定采样率为44千赫,我看了数据表。我对此很陌生,我不知道如何在这个数据表上读取ADC寄存器图。你能帮帮我吗?

以上来自于百度翻译


      以下为原文

   


The sample rate can be assumed to be 44Khz for now.
 
I looked at the data sheet. I am new to this and I do not understand how to read the ADC register MAP on this datasheet. Could you help me out?
举报

陈晨

2019-4-25 15:58:56
对不起,我以前没有处理PIC32 A/D,而且没有空闲时间。这就是为什么我提出了示例应用程序。您需要设置它在44千赫的自动读取。可能是用DMA。然后它将读取所有10个通道并保存结果,在完成时给你一个中断。然后在指定的时间开始下一个周期。如果有采样和保持问题,则可能需要在5个通道中使用两个A/D单元。

以上来自于百度翻译


      以下为原文

    Sorry I have not tackled the PIC32 A/D before and do not have the free time.
That is why I suggested the sample apps.
You are going to need to set it up to Auto read at 44Khz.  Possibly with DMA.
It will then read all 10 channels and save the results, an give you an interrupt when it is done. Then start the next cycle at the specified time.
It is Possible you may need to use two A/D units at 5 channels each IF there are sample and hold issues.
举报

李子跃

2019-4-25 16:04:30
在FRM部分22中可以找到更好的解释ADC工作的方式。12位高速SAR ADC DS601344。这给出了各种模式的示例代码。我使用了ADC,过采样64×~3MHz,得到14比特的48 kHz立体声,它工作良好,所以44.1kHz或10通道的48 kHz是可能的。我不认为你已经说明了你使用麦克风的目的。如果需要捕获相位信息,那么最好使用5个ADC模块,每个ADC模块交替采样2个麦克风。它们可以被配置为同时触发。如果相位不是问题,我建议只使用ADC7,设置为顺序扫描10个通道。

以上来自于百度翻译


      以下为原文

   
A better explanation of how the ADC works can be found in the FRM Section 22. 12-bit High-Speed SAR ADC DS60001344. This gives example code for various modes.
 
I have used the ADC, oversampled 64x to ~3MHz to get 14bit 48kHz stereo, which works well, so 44.1kHz or 48kHz with 10 channels is possible.
 
I don't think you've stated for what purpose you are using the microphones. If you need to capture phase information, then you are best using 5 ADC modules, each alternately sampling 2 microphones. They can be configured to trigger simultaneously.
If phase is not an issue, I would recommend just using ADC7, set to sequentially scan 10 channels.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分