18f4550 ADC not responding


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2012
    Posts
    4

    Default 18f4550 ADC not responding

    I just wrote a simple program to check the operation of Analog to digital converter on my PIC18F4550, but the output is just meaningless. I have shown the program below, which is a simple program to control a stepper motor.


    Name:  ADC.png
Views: 668
Size:  50.5 KB

    I am not getting readings of (0 to 1023) on my lcd. Instead the value oscillates between ( 16 and 28 ) and most of the time unpredictable values.

    Plz help me out of this, I am stuck with this for 3 days...
    Last edited by celequanta; - 8th March 2012 at 13:13.

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default Re: 18f4550 ADC not responding

    The first thing that pops out at me is the ADCIN line. The ADCIN command accepts the ADC channel, not the pin. Try this instead:

    ADCIN 0,an1
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    Join Date
    Feb 2012
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: 18f4550 ADC not responding

    Oh yes! you are right.. I will check it out tonight.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default Re: 18f4550 ADC not responding

    error ...
    Last edited by Acetronics2; - 10th March 2012 at 13:31.
    ************************************************** ***********************
    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 " !!!
    *****************************************

Members who have read this thread : 1

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