ADCIN Problem


Closed Thread
Results 1 to 34 of 34

Thread: ADCIN Problem

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.

  2. #2
    Join Date
    Dec 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    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.
    Attached Images Attached Images   

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    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.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JavPar View Post
    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.
    From the picture...
    There's a Vdd and Vss on each side of the PIC, 11-12 and 31-32. I only see one of each hooked up. I don't see any cap's across Vdd and Vss on each side.

  5. #5
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post

    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.
    I'd second that; except, I use 0.1uf, with a 100K resistor in parallel with the capacitor.

    Regards,

    Anand

  6. #6
    Join Date
    Dec 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    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.

  7. #7
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    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?

  8. #8
    Join Date
    Dec 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Unfortunatelly, I only have the 4620. I can not find pics locally. I am already looking to order more different pics from the states.

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    How erratic are the readings? Could you post a 'stream' of the readings?

  10. #10
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Just to rule out the basics, if you ground the input, do you get a consistent '0'? and connect it to +5, do you get a consistent '255'?

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by JavPar View Post
    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.
    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
    Attached Images Attached Images
    ************************************************** ***********************
    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 " !!!
    *****************************************

  12. #12
    Join Date
    Dec 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Hey guys I really appreciate your help. Alain, that schematic that you posted has made me think. I used my multimeter to test input voltage right at AN0 pin and the voltage is steady at 2.432 with the last gidit sometimes changing to 1.

    I also noticed that measuring voltage in the output pin to my LCD I get oscillating 123mV to 127mV. That makes me think that possibly my PIC is doing something during the A/D convertion that it is outputting oscillating readings? The oscillating readings go out not only to my LCD pin but also to my PC pin.
    Last edited by JavPar; - 29th December 2008 at 04:25.

  13. #13
    Join Date
    Jan 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Had a similar problem my self - turned out to be the inverter for my LCDs backlight. My voltmeter gave no indication of any fluctuations.

  14. #14
    Join Date
    Dec 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Alektric, I removed the LCD from the project and still the problem persists.

Similar Threads

  1. ADC or ADCIN "bias" problem?
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th February 2010, 19:39
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. electrical problem adcin
    By jcleaver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 28th March 2007, 22:52
  4. adcin problem
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th February 2005, 17:47
  5. weird 12F629/675 problem
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th October 2004, 01:08

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts