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

ADC reading problem on PIC18F452
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
Sunny
Guest







PostPosted: Thu May 08, 2008 2:29 pm     Reply with quote

Thanks again. I'll follow your advice and do some test with another AD pin to try out the code first. Will let you know how it goes.

Best Regards!
jfarkas



Joined: 07 Dec 2006
Posts: 4
Location: Croatia

View user's profile Send private message

PostPosted: Thu May 08, 2008 3:04 pm     Reply with quote

The maximum recommended impedance for analog sources is 2.5 kΩ.
From datasheet
Guest








PostPosted: Fri May 09, 2008 11:42 am     Reply with quote

Thanks for the comment, jfarkas.

PCM Programmer, I removed all the connections to the AN0 pin, just used a 100ohm pot to adjust the voltage. However it's still the same thing (except that now it's 1.3 times instead of 1.25 times) ! I really don't know what's wrong there.

Then I used another bare board to build up a circuit just contains the PIC and the pot, it works.

I'm not going to spend more time on this one for now. Luckily I don't need the whole 5V range, so I'll just scale it in the code to have a "proper" pressure value.

Thanks again for your help!
Ttelmah
Guest







PostPosted: Fri May 09, 2008 2:52 pm     Reply with quote

I'd be looking very carefully at how stable, and well decoupled the supply rail is. All the calculations you have done, are based on the chip having _exactly_ 5v at the supply pin....

Best Wishes
Sunny
Guest







PostPosted: Mon May 12, 2008 12:45 pm     Reply with quote

Ttelmah wrote:
I'd be looking very carefully at how stable, and well decoupled the supply rail is. All the calculations you have done, are based on the chip having _exactly_ 5v at the supply pin....

Best Wishes


Yes that's a good hint. I checked the VCC and now the problem is solved!
Thank you very much!
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