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


    Did you find this post helpful? Yes | No

    Default Heck yeah, more good info

    It's been a long day, my eyes hurt from all the reading...
    Making all the outputs the same on a pass makes capitol sense. Then update with the gathered timer info next time around. I'm all for simple as soon as I get some speed on this learning curve.
    The adjustments will be almost a one time setting until the bike gets upgraded again or has to be readjusted on track day at the track due to temp., elevation, and things like that. But one thing for sure, can't have the rider racing one handed except for cruel entertainment pleasure on the spectators part.
    Thanks for the added info b1arrk5. I will study it and try it out.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LinkMTech View Post
    Now the +/-20% range is adjustable and will probably never see 20% and may be reduced to some narrower range in the end, but until then, I'm starting at +/-20%.
    If I was you, I'd kill that 20% idea and stick with something less, like maybe 5%. Like I said earlier, 20% is the difference between stoich and melted pistons, especially at high rev's, heck 20% is the difference between slobbering rich (say 12.5:1) and the lean side of detonation (12.5:1 - 20% = 15:1).

    will I need to have a PIC device with 4 timers to be able to trigger off 4 inputs to "sample one, build the next"?
    One timer, keep track for 4 start/end value pairs, do the subtraction math on the pairs to find time differences.

    Quote Originally Posted by b1arrk5 View Post
    In keeping with my philosophy of keeping it simple...
    Jerry.
    I agree 100%+ with every one of those comments...and with that agreement and $1.25, you might be able to buy a bottle of Dew!
    But seriously, dead on, let the hardware do the work for you.

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


    Did you find this post helpful? Yes | No

    Default Just about there!

    Okay, I took most of your advices and got to this point where I am sampling one signal to construct another and is working very nice and smooth without any jitter (which I also realized why it was happening in the first place).
    Here is the working portion of the code I would like to use TMR1 in so that I can measure time between occurrances if possible:
    Code:
    Third:
    
         
         PULSIN Sig3,0,S1                ' Monitor for and measure Sig3
         ADCIN 1, Low_pot                ' Read Low Pot setting
            Low_adj = ABS(Low_pot-128)   ' Make pot adjustable from center
         
         IF Low_pot <128 then            ' If pot on left side then make
         Low_set= S1-(S1/(AR/Low_adj))   ' negative adjustment
         ENDIF
         
         IF Low_pot >=128 then           ' If pot on right side then make
         Low_set= S1+(S1/(AR/Low_adj))   ' positive adjustment
         ENDIF
         
         WHILE sig2=1: WEND              ' Wait for trigger signal
         PULSOUT Inj2, Low_set           ' Send output pulse =% of Sig3
                                         ' input signal
    GOTO Third
    This is my understanding of a way to use the TMR1; Wait for something to occur then set the CAPTURE flag (PIR1.2 in this case) and read the high and low timer bits, clear the flag. Wait for something else to occur and read the high and low timer bits again, clear the flag and get the difference of the two timer values for time elapsed! Seemed simple enough but if it worked I would not be asking for direction. So the question here, can the TMR be software controlled like I'm trying to do or am I restricted to rely on the CCP1 input pin for triggering?
    Code:
    Third:
           
             TMR1H = 0            ' Clear TMR1 high byte counter
             TMR1L = 0            ' Clear TMR1 low byte counter
             T1CON.0 = 1          ' Turn on TMR1
         
         PULSIN Sig3,0,S1                ' Monitor for and measure Sig3
            Capture1 = 1                 ' Set capture flag bit
            T1.HighByte = CCPR1H : T1.LowByte = CCPR1L
            Capture1 = 0                 ' Clear capture flag bit
         ADCIN 1, Low_pot                ' Read Low Pot setting
            Low_adj = ABS(Low_pot-128)   ' Make pot adjustable from center
         
         IF Low_pot <128 THEN            ' If pot on left side then make
         Low_set= S1-(S1/(AR/Low_adj))   ' negative adjustment
         ENDIF
         
         IF Low_pot >=128 THEN           ' If pot on right side then make
         Low_set= S1+(S1/(AR/Low_adj))   ' positive adjustment
         ENDIF
         
         WHILE Sig2=1: WEND              ' Wait for trigger signal
         PULSOUT Inj2, Low_set           ' Send output pulse =% of Sig3
                                         ' input signal
            Capture1 = 1                 ' Set capture flag bit
            T2.HighByte = CCPR1H : T2.LowByte = CCPR1L
            Capture1 = 0                 ' Clear capture flag bit
         
         RPM = T2-T1
                     
        HIGH Inj4
        PAUSEUS RPM
        Low Inj4                                 
    GOTO Third                           
    
    
    END

Similar Threads

  1. 16F1827 setup
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 10th March 2011, 00:04
  2. Replies: 24
    Last Post: - 1st December 2009, 09: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, 15:19
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 21:36
  5. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 04: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