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 CCS Technical Support

PIC24FJ 16-bit ADC Diff. Channel

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



Joined: 06 Dec 2005
Posts: 59

View user's profile Send private message

PIC24FJ 16-bit ADC Diff. Channel
PostPosted: Wed Aug 02, 2017 8:15 am     Reply with quote

PIC24FJ64GC006

Dear,

I want to use the Diff.-Channels CH0+ and CH0- from the 16-Bit ADC of the PIC24FJ64GC006 in a new project. The question is, what is the range of the result of the AD-Conversion (Vref+ = Vdd, Vref- = Vss)?

I think it can be one of this possibilities:

1. range is 0x0000 to 0xFFFF for CH0+ >= CH0- and 0x0000 for CH0+ < CH0- (unipolar operation)
or
2. range is 0x4000 to 0xFFFF for CH0+ >= CH0- and 0x4000 to 0x0000 for CH0+ < CH0- (bipolar operation)
or
3. range is 0x0000 to 0x7FFF for CH0+ >= CH0- and 0x8000 (two'2 complement) to 0x0000 with MSB = sign for CH0+ < CH0- (bipolar operation)

Finally the question is, if the ADC can operate bipolar with CH0+ > CH0- and CH0+ < CH0- or not.

What do you think? Thanks for any help!

Nils
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Wed Aug 02, 2017 8:55 am     Reply with quote

First get a copy of DS30687a. This is vital.....

It's not as simple as a 16bit ADC giving a 16bit result. You can program the result of the oversampling to be rounded to 8, 16 or 24bits (or 32bits, unrounded). This ADC is _noisy_ (this is inherent in SD converters), so you take a minimum of 16* oversampling (up to 1024*).
The result is always a 2's complement (signed) 32bit value. So actually 0x80000000 to 0x7FFFFFFF.
The value is quite inaccurate as well, so you need to apply gain correction.
Yes all of the differential ADC's generate -ve results when IP+ is below IP-. However none is 'bipolar' in terms of allowing an input to operate below the supply rails. The minimum voltage for the Vref-, is the lower supply rail, and the maximum voltage for Vref+, is the positive supply rail. The minimum and maximum values for the inputs are Vref- to Vref+ (however they are rated to handle up to the supply rails).
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