SOLVED: How can I reduce ADC jitter


+ Reply to Thread
Results 1 to 40 of 96

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: SOLVED: How can I reduce ADC drift

    i simply hate this , all these pins made into outputs , shorted to gnd , no attempt to set them low
    at power up are they low? before you short it all out
    worst idea ever for breadboarding , i leave all pins as inputs unless they need to be an output
    all this care re floating inputs is complete bull shit. for a battery operated device it will save a few microwatts that's it.
    for the finished manufactured product sure do it , for bread boarding its dangerous nonsense where every mistake will be a bad one



    Code:
    TRISA = %00000010                       ' Pin A1 = ADC input 1
    TRISB = %00000000                       ' Pin B7 = ...not available, ICSPDAT
                                            ' Pin B6 = ...not available, ICSPCLK
    TRISC = %11000000


    I took everything non-essential off the breadboard (just kept my 2 power LEDs):
    and all the dangerous grounds
    Warning I'm not a teacher

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: SOLVED: How can I reduce ADC drift

    I realized something was seriously wrong when that nothing circuit was taking 670mA. I added:

    Code:
    PORTA = %00000000
    PORTB = %00000000
    PORTC = %00000000
    Before the ANSELx and TRISx and it's taking 20mA now, 33c with no ADC, just ADCinput set at 1023 and the HSEROUT loop.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: SOLVED: How can I reduce ADC drift

    Quote Originally Posted by richard View Post
    ... i leave all pins as inputs unless they need to be an output
    all this care re floating inputs is complete bull shit....
    I try to keep my development code as close to final as possible, cause I know I'll forget to change stuff back. At least this way I can fire and forget the pin initialization.

    But yeah, major bonehead move on my part. I put the old PIC back in and it runs at 20mA too. Gonna leave that 1st PIC in, just in case I do some other numbnut thing.

    Thanks mucho Richard.


    EDIT: Now this warning will follow my code for the rest of the development.

    Code:
    PORTA = %00000000                       '-------------------------------------------' 
    PORTB = %00000000                       '       ALWAYS SET PINS LOW FIRST           '
    PORTC = %00000000                       '-------------------------------------------' 
    Last edited by Demon; - 4th March 2025 at 04:26.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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 : 17

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