I need a high resolution A/D with the ds30f4013

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
christophereet1
Posts: 15
Joined: 19 May 2007 09:54

I need a high resolution A/D with the ds30f4013

#1 Post by christophereet1 » 15 Aug 2012 18:43

Any help would be great.

I am able to get an A/D input but unable to set the ref voltage input.

I am using the ds30f4013 on the easyDSPIC6 board.


This is in the guide??? Yikes!
ADC1_Init_Advanced(_ADC_10bit, _ADC_INTERNAL_REF) ' sets ADC module in 12-bit resolution mode with internal reference used

For some reason it won't let me set the "ADC1_Init_Advanced(_ADC_12bit, _ADC_INTERNAL_REF)" but it does let me type ADC1_Init_Advanced(_ADC_EXTERNAL_REF) which seem to not activate that input Ref voltage. I noticed it has an on the board referance but no example code. Example code would be nice for this.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: I need a high resolution A/D with the ds30f4013

#2 Post by filip » 16 Aug 2012 09:58

Hi,

I have looked into the datasheets for the dsPIC30F4013 and this is what I read :
dsPIC30F3014/4013 Data Sheet (http://ww1.microchip.com/downloads/en/D ... 70138G.pdf) states under the chapter 19.0 12-BIT ANALOG-TO-DIGITAL CONVERTER (ADC) MODULE that :
The analog reference voltage is software selectable to either the device supply voltage (AVDD/AVSS) or the voltage level on the (VREF+/VREF-) pin.
and there is block diagram of the ADC module with the VREF+ and VREF- shown

But the detailed document, dsPIC30F Family Reference Manual on ADC module (http://ww1.microchip.com/downloads/en/D ... 70266A.pdf), states under the chapter 31.7 ADC Module Reference Voltage this :
The ADC module does not feature external reference voltage pins. Voltage is determined from the AVDD and AVSS pins.
The positive reference voltage is AVDD and the negative reference voltage is AVSS.
This is quite confusing, since the documents tell us the opposite things.
The AVDD and AVSS on the EasydsPIC6 connected to the VCC and GND, respectively, so it appears that you can only use on-board VCC as a voltage reference.

Regards,
Filip.

christophereet1
Posts: 15
Joined: 19 May 2007 09:54

Re: I need a high resolution A/D with the ds30f4013

#3 Post by christophereet1 » 17 Aug 2012 16:49

Thank you for getting back! This will save me a lot of time! I will then amplify my signal and not mess with the ref voltages.

:D
-Chris

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”