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

0 Members and 1 Guest are viewing this topic.

Offline satyamfifa

  • Contributor
  • Posts: 28
  • 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

  • Regular Contributor
  • *
  • Posts: 214
  • Country: gb
    • Murton-Pike Systems
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.
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 2289
  • 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