Author Topic: PIC32 DMA ADC. Single channel to transfer two ADC buffer  (Read 1598 times)

0 Members and 1 Guest are viewing this topic.

Offline satyamfifaTopic starter

  • Regular Contributor
  • *
  • Posts: 65
  • Country: nl
PIC32 DMA ADC. Single channel to transfer two ADC buffer
« on: September 19, 2019, 12:14:50 am »
Hey All,

I am using PIC32MX460F512L, I am using ADC in ALT mode to sample two ADC pins and 1 interrupts for 2 conversions. I am thinking of copying the results of 2 conversion into RAM using DMA. Therefore I was wondering if it possible to use a single DMA channel to copy the result of ADC1BUF0 and AD1BUF1 without CPU intervention. I want to know if it is possible and how.

Thanks in advance.
Regards,
Sparsh
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 689
  • Country: gb
    • Electronic controls
Re: PIC32 DMA ADC. Single channel to transfer two ADC buffer
« Reply #1 on: September 19, 2019, 02:53:04 am »
I found the time taken between the samples gave me ample time to put the data into buffers.
I found using the DMA took longer.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: PIC32 DMA ADC. Single channel to transfer two ADC buffer
« Reply #2 on: September 19, 2019, 09:29:47 am »
DMA is useful to move large amounts of data around whilst the CPU works on something else.  You still have a service an interrupt when the DMA has completed, and re-set the DMA for the next transfer so like Nigel says it's likely you will increase CPU overhead compared to simply servicing the ADC interrupt.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf