I tried using a 5V power supply, but I still get the erratic voltage readings.
I tried using a 5V power supply, but I still get the erratic voltage readings.
WHAT are you measuring and how have you got it connected?
Have you tried using a plain old meter?
What is this 5v power supply you speak of? A wall-plug type supply? Benchtop supply?
How much other stuff do you have connected to your '4620?
How about posting a bit of a schematic...
I have made a separate project just to clean it. I am reading voltage from the project or voltage from a ac/dc wall power supply sending 3V. Also I have tried reading a angular rate sensor and last tried reading nothing and still get erratic readings.
I use a digital multimeter to read the voltages and the readings are 100% stable on the meter.
For supply I have been using the 5 volts from my PC's USB port. I also tried using a wall-plug type supply suppliying 5V.
I cleaned my project so now I only have an LCD, a 4.7K resistor at pin 1 MCLR/VPP, on/off switch, reset button, 8 Mhz crystal with two 15pF from the crystal to ground.
Even with the new clean project, I still get erratic readings.
This is crazy. Will continue trying tomorrow. Thanks for your help.
Last edited by JavPar; - 17th December 2008 at 04:29.
Try adding an LED and make it blink at a steady rate. Give the PIC a heart beat.
Does the LED blink as expected?
Also try the ADC at 8 bit resolution.
Let us know what happens.
When you tried a capacitor on the ADC, did you have it from the ADC pin to ground? Was the value at leat 1uf ? l use 22uf myself.
Like skimask said, post a schematic. A picture of you setup might help too.
Dave
Always wear safety glasses while programming.
Hi guys, arriving late from work. I loaded a little schematic I hope is clear. On my project I have 4 LEDs. On this clean one I will use one. Will try 8 bits. I have used caps .1uF and 10uF connected to GND.
Let you know tomorrow about the 8 bits.
Javier.
I would suggest bypass caps on the Vcc / Vss and a choke in series with the adcin line to kill off any RF which might affect your circuit. I would ask if you are working near RF sources like Fluorescent lights, microwave ovens, televisions etc . . .
Last edited by Archangel; - 18th December 2008 at 05:35.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Ok guys,
1.) Changed to 8 bits.
2.) Put caps 1uF on each side of the pic on the Vdd and Vss.
3.) No microwaves, no TVs, no fluorescent lights close to my project. I scanned my desk for any possible interferences but there is nothing.
4.) Put a .1 uF parallel with a 100K resistor at the ADCIN pin. Tried with different caps.
5.) Added a LED and it blinks ok. Do not see any skips or changes on the blinking rate.
6.) The only thing is that I could not find RF chokes locally (I'm in Panama Central America). I put a ferrite on the cable to the ADCIN pin just in case.
All of the above and problem still persists. I have not seen a single change on the way the erratic readins of voltage behave. I tried to see if there is a pattern to the erratic readings but can not see one.
Is this problem with erratic voltage readings something usual or rare? I have continued searching the web and I don'yt see anything that really talks about this.
Could this be a problem with the PIC18F4620? Or maybe I should not be using a breadboard?
Javier.
Last edited by JavPar; - 21st December 2008 at 05:42.
With what you describe, I feel certain the issue is not of hardware. I have used the ADC on a breadboard, with a far cruder supply (no RF chokes/filters) without a problem.
I have never used a PIC18F4620, though. Which is why I suspect perhaps its to do with some settings specific to that chip.
Could you temporarily replicate that with another PIC, say a 16F877?
Hi, Javier
Nothing about config.
BUT Your supply filtering looks to me a bit weak ... ( USB voltage stability ... ahem !!! )
I have a board with '452 and another with '2520 ... 220µF at the card pow. input + 10 µF Tantalum + 0.1µF ( closest as possible from PIC pins ).
see scheme attached.
Some capacitor tank ( > 10µF Tant.) close to your LCD could be useful too ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks