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

16LF1828 fixed voltage reference

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



Joined: 05 Mar 2012
Posts: 99
Location: Central Illinois

View user's profile Send private message

16LF1828 fixed voltage reference
PostPosted: Tue Jul 24, 2012 8:49 am     Reply with quote

I'm researching for a new design and I like a lot of what I see about the 16LF1828.

One thing that is providing confusion is the FIXED VOLTAGE REFERENCE that it can supply for the A/D and D/A.

Section 16.1.3 of the datasheet I have says that ADC voltage reference can be
"...FVR 2.028V
FVR 4.096V(not available on LF devices)"

But! The device header file I have with PCM V 4.132 gives me the constant "VREF_ADC_1v024" as an option to call with setup_vref()

Having resolution at approximately 1 volt is a design requirement so my question is:

Is my datasheet incorrect? Perhaps it's not taking in to account LF devices?


Would appreciate anyone who has experience with this chip.
Thank you
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Tue Jul 24, 2012 9:17 am     Reply with quote

Reading the datasheet shows that 16.1.3 ADC VOLTAGE REFERENCE appears to be incorrect: 1.024V Vref is available to the ADC on both LF and F versions.

In fact, the datasheet shos that the ADC simply takes the voltage from the internal reference, the actual voltage is set in the FVR section. not the ADC.

Obviously 4.096V Vref is not available on LF parts as the supply voltage is less than 4.096V! It may not work properly on F parts with lower supply voltages. Even 2.048V won't work correctly on parts supplied with less than about 2.5ishV.

Note on terminology. The resolution of the ADC is Vref/TOTAL ADC COUNTS. This ADC is 10 bit, and has 2^10 counts, or 1024. Therefore is resolution at Vref of 1.024V will be 1.024V/1024 = 1mV per bit. The ADC range is what I suspect you were referring to, which in this unipolar ADC is 0 to (2^10-1) * V per bit, i.e. one bit shy of Vref, or 1.023V

RF Developer
Ttelmah



Joined: 11 Mar 2010
Posts: 19359

View user's profile Send private message

PostPosted: Tue Jul 24, 2012 9:29 am     Reply with quote

This has changed with different versions.

They had useable options, with:

#define VREF_COMP_DAC_2v048 0x08
#define VREF_COMP_DAC_4v096 0x0C

in the late 4.11x versions, and

#define VSS_FVR 0x03000000 //| Range 0-Fixed Voltage Reference

for the setup_adc_ports.

The last half dozen compilers seem to be rapidly introducing a whole suite of new bugs. Sad

Best Wishes
stinky



Joined: 05 Mar 2012
Posts: 99
Location: Central Illinois

View user's profile Send private message

PostPosted: Tue Jul 24, 2012 9:56 am     Reply with quote

RF_Developer:

Thank you for your input. I did not want to assume anything that wasn't in black & white. And you are absolutely correct. I meant the ADC range.

Ttelmah:
Thank you for your well wishing. Fortunate or not I leapt from 3.107 to 4.132 so I have probably experienced far fewer bugs with version changes.
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