• AVR Freaks

dsPIC33FJ128GP202; Is DONE bit set after converting AN0,AN1, AN2 and AN3 ?

Author
kiranym
New Member
  • Total Posts : 19
  • Reward points : 0
  • Joined: 2009/01/21 12:55:43
  • Location: Bangalore
  • Status: offline
2009/04/09 23:24:42 (permalink)
0

dsPIC33FJ128GP202; Is DONE bit set after converting AN0,AN1, AN2 and AN3 ?

Hi,
 


I am Kiran, doing project work using dsPIC33FJ128GP202. For my project work, I have to sample 4 analog inputs simultaneously. So I have configured ADC module to sample AN0, AN1, AN2 and AN3 simultaneously (using 4 channels CH0, CH1, CH2 and CH3). My question is:
 
-> Does the ADC module set 'DONE' (ADC Conversion Status bit) bit after converting each analog input? (Is DONE bit set after converting AN0, after converting AN1, after converting AN2 and after converting AN3).
 
Thanks,
Kiran
#1

4 Replies Related Threads

    Mike017
    Super Member
    • Total Posts : 2698
    • Reward points : 0
    • Joined: 2007/08/25 08:11:31
    • Location: Lincoln, RI, USA
    • Status: offline
    RE: dsPIC33FJ128GP202; Is DONE bit set after converting AN0,AN1, AN2 and AN3 ? 2009/04/10 13:06:31 (permalink)
    0
    Hi,
     
     Does the ADC module set 'DONE' (ADC Conversion Status bit) bit after converting each analog input? (Is DONE bit set after converting AN0, after converting AN1, after converting AN2 and after converting AN3).

     
    Check out Section 16.11.2.2 of the FRM Figure 16-9 shows your case.
     
    Please note it is usually informative to check out the FRM (Family Reference Manual) for your PIC. It has a lot of detail that may not be in the datasheet. Also, it's worth a quick check of the errata sheet just in case.
     
    Good Luck,
    Mike
     
     
     
     
    #2
    kiranym
    New Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2009/01/21 12:55:43
    • Location: Bangalore
    • Status: offline
    RE: dsPIC33FJ128GP202; Is DONE bit set after converting AN0,AN1, AN2 and AN3 ? 2009/04/12 09:57:36 (permalink)
    0
    Hi,

    Thank you, Mike :)

    The dsPIC33 Family Reference Manual says that 'DONE' bit is set only after converting all analog inputs that are sampled simultaneously.
    Can you please suggest a method to get all the converted values (Digital values of AN0, AN1, AN2 and AN3) without using DMA

    Thanks,
    Kiran
    #3
    Tez
    Super Member
    • Total Posts : 479
    • Reward points : 0
    • Joined: 2006/10/04 11:09:05
    • Location: 0
    • Status: offline
    RE: dsPIC33FJ128GP202; Is DONE bit set after converting AN0,AN1, AN2 and AN3 ? 2009/04/15 17:27:47 (permalink)
    0
    Use the ADC interrupt. The first interrupt will be for CH0, the next for CH1 and so on.
    #4
    kiranym
    New Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2009/01/21 12:55:43
    • Location: Bangalore
    • Status: offline
    RE: dsPIC33FJ128GP202; Is DONE bit set after converting AN0,AN1, AN2 and AN3 ? 2009/04/16 01:43:09 (permalink)
    0
    Thank you :)

    Kiran
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5