CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

DSPic33FJxx ADC->DMA Questions

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
efrenglezc



Joined: 26 Jan 2011
Posts: 1

View user's profile Send private message

DSPic33FJxx ADC->DMA Questions
PostPosted: Wed Jan 26, 2011 8:44 am     Reply with quote

Hi Guys,

I’m using a DSPic33FJ64706 and would like to use 4 ADC Channels (AN0 and AN1 controlled by ADC1) and (AN2 and AN3) controlled by ADC2 using Simultaneous Sampling on the 4 channels, Peripheral Indirect Mode using DMA0 (ADC1) and DMA1 (ADC2) in order to store the conversion in the order AN0[0]…..AN0[Max], AN1[0]…..AN0[Max], AN2[0]…..AN2[Max], AN3[0]…..AN3[Max], in the DMA Buffer, in that order. Said that there are a couple of questions:

1. - When I declare the pins I will use as Analog Input do I need to set the 4 channels in both registers AD1PCFGL and AD2PCFGL or AN0, AN1 in AD1PCFGL and AN2, AN3 in AD2PCFGL?

2. – When I program the Starting DMA Memory for every buffer, do I need to set the initial address for the 4 buffers in the DMA0 register DMA0STA for AN0, DMA0STB for AN1, DMA1STA for AN2 and finally DMA1STB for AN3, or, it is enough to set only two starting address DMA0STA for AN0 and DMA1STA for AN2 and the DMA know what is the next address for AN1 and AN3 buffer address base on the totals number of Samples on DMA0CNT and DMA1CNT information (2 x Buffer_Size of Max Samples per channel)?

3. – For this configuration I programmed DMA0CON.AMODE and DMA1CON.AMODE with 0x10 (peripheral Indirect) and DMA0CON.MODE and DMA1CON.MODE with 0x10 (Continuous, Pin-Pong mode Enable), is that correct?

3. - The Datasheet mention if I’m using ADC-DMA I must disable the interrupt for the ADC in the uController side but not on the DMA side, when I set the interrupt associated to the DMA0 and DMA1 I point to the interrupt 13 for ADC1 and 21 for ADC2, so how I disable it from my uController side in order not to attend it, just not declaring the handle for that interrupt?

That’s all guys,

Thank you very much for your support

Efren
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group