Unwanted output signal jitter


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219

    Question Unwanted output signal jitter

    Hello everyone,
    First of all, thank you all for sharing your time and wisdom so others can excel.

    I'm making a fuel injection circuit using the PIC16F737 that would allow me to control the outputs ON/OFF +/-. After gleaning the data specs on my part for understanding and researching this forum to get me this far plus experimentally trying different ideas, I hoped that an expert would be able to spot why I'm experiencing this unwanted signal jitter.
    Attached are:
    1. Copy of sample code working just one input. You'll notice that the ADC settings are not the usual settings but were left this way because I got a nicer response from the pot control. This might also be the band aid to the problem.

    2. Scope screen shot of ouput signal with ON time delayed and with unwanted jitter at opposite end. If I turn the pot CCW from center, the output turn ON delay is increased from 0 to 500us.

    3. Scope screen shot of ouput signal with OFF time delayed and with unwanted jitter at opposite end. If I turn the pot CW from center, the output turn OFF delay is increased from 0 to 500us.
    The top trace (Yellow) is the input, bottom trace (Blue) is the output.

    Input signal is 5V with 2.5ms LOW pulse and 20K pull up, pot is a 5K from 5V to GND. Output driving a current limited LED at the moment.
    Attached Images Attached Images   
    Attached Files Attached Files

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LinkMTech View Post
    Hello everyone,
    2. Scope screen shot of ouput signal with ON time delayed and with unwanted jitter at opposite end. If I turn the pot CCW from center, the output turn ON delay is increased from 0 to 500us.
    3. Scope screen shot of ouput signal with OFF time delayed and with unwanted jitter at opposite end. If I turn the pot CW from center, the output turn OFF delay is increased from 0 to 500us.
    The top trace (Yellow) is the input, bottom trace (Blue) is the output.
    Input signal is 5V with 2.5ms LOW pulse and 20K pull up, pot is a 5K from 5V to GND. Output driving a current limited LED at the moment.
    At first glance, your loops take different paths at different times, therefore, different numbers of instruction cycles. Look at your .lst file, count them up for the different if/then possibilities. You might need to throw a @nop in here or there to keep the timing correct.
    Your 'jitter' is 500ns, which happens to be one instruction cycle at 8Mhz (2Mhz instruction rate). Which also happens to be the difference between a NOP (one cycle) and a GOTO (2 cycles).

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    euhh 500 uSec Skimask, which is way over a NOP or GOTO
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    euhh 500 uSec Skimask, which is way over a NOP or GOTO
    Yep, sure is...but that u looked so much like an n.
    ...unless the PIC is running at 8Khz

  5. #5
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Smile If only!

    Quote Originally Posted by skimask View Post
    Yep, sure is...but that u looked so much like an n.
    ...unless the PIC is running at 8Khz
    I'm glad I'm not the only one that sees things!

  6. #6
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Lightbulb More info to consider

    Just remembered something about the jitter...
    If I commented the ADCIN command from the internal loop and just relied on the initial ADCIN read at the start of the program, the variable adjustment wouldn't work of course but be fixed at the pot setting instead and would get a clean output signal.
    I read through the ADC section of the data specs that specified Rs be less than 10K, my pot is 5K and left me thinking the sampling time has to be set correctly.
    Am I getting close or still wandering in the dark with a LED on a 2V battery?

Similar Threads

  1. 16F1827 setup
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 9th March 2011, 23:04
  2. Replies: 24
    Last Post: - 1st December 2009, 08:01
  3. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46

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