No one has had this issue? Or is this a dumb question?
Is this on the F84?
If so, What's your Pot and capacitor value?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Yes, its with a F84A, with 10k resistor and a 0.1uF cap.Originally Posted by mister_e
On wich pin? Hope it's not RA.4
Did you tried a higher capacitor valu.. let's say 1K
Is the MCLR pin tied to VCC with pull-up? if so wich value?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I had a similar issue a while ago maybe I can be of some assistance.
I was also using the F84A, on PORTB with the POT command. I noticed that larger pots, over 15mm dia, read very clean, yet the small PCB mount types can be noisy, with values moving around, especially if they are the cheap and nasty 0.20c types.
When using small PCB types or small cheap pots,I compensate with software. I sometimes read 5 values, add together and get and average read, or other times I will read only even numbers and ignore the odd. It all depends what you need it for...
Also check your common GND and make sure your regulator can provide enough juice for the circuit. Are you using 78L05?
"Never under estimate the powers of an idiot"
Originally Posted by champion
There is another way.
Use 1K POT with 100nF.
This way, you will get a large movement of the POT giving you softer reading max. "30" instead of 255.
You can then multiply this "30" by say 4 and have "120" as your POT reading value, still with soft reading movement. (multiply by 8 and get 240 could be another).
How is that now?
-----------------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi,
Oh, crap... didn't realised you where using the POT command.....Sorry.
Disregard:
Have you tried buffering the signal from the POT with an OPAMP? It may be that the source impedance of the POT is too high for the ADC to work properly. Try two 1k (no higher then 1k for now) resistors in series from +5V to GND, connect the middle point to your analog in pin. Does it still jump around? If not you should now have a reading of ~128 for 8bit and ~512 for 10bits. If not my guess is that you either have the left/right justify bit set up wrong or using the wrong Vref. But it's really hard to tell without even knowing what chip you are using and/or your register setup....
/Henrik Olsson.
Last edited by HenrikOlsson; - 15th November 2006 at 21:18. Reason: For not reading the original post correct.
Bookmarks