SOLVED: How can I reduce ADC jitter


Results 1 to 40 of 96

Threaded View

  1. #19
    Join Date
    May 2013
    Location
    australia
    Posts
    2,666


    Did you find this post helpful? Yes | No

    Default Re: SOLVED: How can I reduce ADC drift

    the first thing i notice is you have not set a sample time , not sure if or what the defa may be

    try this
    DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS


    secondly the adcin command has often been accused of wonky readings when the channel is changed

    try this known work around of dual reads after a ch change

    Code:
     Mainloop:
    
    rem                             ADC 0
        adcin 0, ADCinput
        adcin 0, ADCinput
        NewADC0 = 1023 - ADCinput           ' inverted so pot goes from 0 to 1024
        
        if NewADC0 <> oldadc0 then
            oldadc0 = NewADC0
            LCDOUT $FE, $94+6, DEC4 oldadc0 : Pauseus 1
        endif
    
    
    
    
    rem                             ADC 3
        adcin 3, ADCinput
        adcin 3, ADCinput
        NewADC3 = ADCinput
    
    
        if NewADC3 <> oldadc3 then
            oldadc3 = NewADC3
            LCDOUT $FE, $D4+6, DEC4 oldadc3 : Pauseus 1
        endif
    
    
      GOTO Mainloop
    end
    Last edited by richard; - 24th February 2025 at 06:28.
    Warning I'm not a teacher

Similar Threads

  1. SOLVED - IOC works on B0 but not B5
    By Demon in forum General
    Replies: 19
    Last Post: - 26th September 2024, 21:11
  2. Replies: 6
    Last Post: - 5th November 2023, 16:26
  3. trying to reduce current consumption on a 12HV615
    By Max Power in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th November 2011, 14:57
  4. Unwanted output signal jitter
    By LinkMTech in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 18th January 2008, 02:31
  5. Dmx Solved !!!!!!!
    By oscar in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 2nd July 2005, 21:57

Members who have read this thread : 16

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