View previous topic :: View next topic |
Author |
Message |
JohnKennedy
Joined: 12 May 2004 Posts: 38
|
Help with A/D Problem please |
Posted: Tue Feb 22, 2005 5:28 am |
|
|
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
|
|
Posted: Tue Feb 22, 2005 5:48 am |
|
|
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
|
|
Posted: Tue Feb 22, 2005 6:31 am |
|
|
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
|
|
Posted: Tue Feb 22, 2005 10:02 am |
|
|
Solved it
It turned out to be a faulty ribbon cable from my ICEPIC |
|
|
|