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

A/D with ref on AIN2 & AIN...
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah
Guest







PostPosted: Tue Jun 12, 2007 6:04 am     Reply with quote

I'd be suspicious that your main problem may be a compiler 'glitch'. 3.182, is pretty old. You need to run the code in a simulator, and see if the value in the ADC configuration register, is what is expected.
However the comments about the accuracy remain. You need _both_ sources to be able to maintain a good supply, with a wide range of loads. One zener, is not going to do the job. You either need two voltage references, or a single reference, with a divider, and buffer amplifiers.
The second question also remains about the analog inputs. If any of them go below the Vref- (by more than a diode drop), current will flow, pulling the reference pin down. Remember that this applies to the other unused analog inputs as well in the mode you have selected.
The only way to get a proper 10bit accuracy from a signal like this, is to amplify it before feeding the ADC...

Best Wishes
abx



Joined: 08 Jun 2007
Posts: 10

View user's profile Send private message

PostPosted: Tue Jun 12, 2007 7:40 am     Reply with quote

I've checked the ADC configuration registers and all seems ok.
I've also ordered the release for my compiler...
Note that all work well on a PIC16F877A. But there is not enough memory for my complete program.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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