Adcon register with P18F4550


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Adcon register with P18F4550

    Hi , I added these lines: but it still fluctuates a lot:
    then I output the ChAN_AVG

    Code:
        GOSUB   READ_AD
    	CHAN4_2 = CHAN4_1
    	CHAN4_1 = CHAN4
    	
        CHAN4.HighByte = ADRESH  'PLACES THE HIGH AND LOW BYTE
        CHAN4.LowByte  = ADRESL   'INTO VAR CHAN0
    
    	CHAN_AVG = (CHAN4_2 + CHAN4_1 + CHAN4 ) /3
    	
        RETURN

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


    Did you find this post helpful? Yes | No

    Default Re: Adcon register with P18F4550

    On similar apps I use a 22uF cap from the ADC pin to VSS.

    How stable is VDD?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Adcon register with P18F4550

    I use a 7805 with a 1uF cap and a 47uF cap on the adc pin
    K

  4. #4
    Join Date
    Feb 2011
    Location
    Michigan, USA
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Adcon register with P18F4550

    I believe your problem is this "80Mohm and a 16Mohm divider".

    See section 21.1 in 18F4550 spec sheet.
    It says the maximum recommended impedance for analog
    sources is 2.5 kΩ.

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