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

Help with A/D Problem please

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



Joined: 12 May 2004
Posts: 38

View user's profile Send private message

Help with A/D Problem please
PostPosted: Tue Feb 22, 2005 5:28 am     Reply with quote

Hi

I had a cct developed for a battery charger application that uses the 16F818. I got it to work just perfect on a vero board so did a pcb for it.

Now all the individual functions of the charger work except for the charger terminated charge premature. I connected up my ICEPIC and find that the value being read into the variables from the A/D is not changing from a set value this value is 258(decimal). Even a 1V swing on the A/D pin doesn't change the value any ideas as to what I have done wrong?

TIA

JFK
Ttelmah
Guest







PostPosted: Tue Feb 22, 2005 5:48 am     Reply with quote

From the little detail you have given, no.
The fact it worked on Vero, assuming you have changed nothing in the code, really proves that your problem is hardware. You need to look again at how the grounds especially are connected, where the ADC reference comes from, etc. etc.. When you say that a 1v change gives no alteration of the result, where are you measuring this, and relative to what as the ground?. I'd really suspect that the analog, and digital grounds are perhaps not connected, or that there is a dry joint to the pin itself...

Best Wishes
Guest








PostPosted: Tue Feb 22, 2005 6:31 am     Reply with quote

OK

The Pic is configured so that Vcc is ref so that would give a resolution of 5/1024 = 4.88mV

From AD(O) to ground I can measure 1.78VDC which should equate to 364 from the A/D with the Icepic I can see that it is only 258. If I change the voltage on the A/D pin to 2.9V this should change to 594 but it doesn't it stays at 258.

I'm wondering if it has anything to do with the grounds of the ICEPIC and the ground of my cct causing a problem somewhere.

I'm going to try programming a pic and see if the problem is still there.

Any further thoughts anyone?
JohnKennedy



Joined: 12 May 2004
Posts: 38

View user's profile Send private message

PostPosted: Tue Feb 22, 2005 10:02 am     Reply with quote

Solved it Very Happy

It turned out to be a faulty ribbon cable from my ICEPIC Mad
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