Results 1 to 10 of 10

Thread: Reference Pulses, Time Between Reference Pulses, etc.

  1. #1
    Fuel Injected! 84Elky's Avatar
    Join Date
    Jul 2012
    Location
    Montgomery, AL
    Posts
    204

    Reference Pulses, Time Between Reference Pulses, etc.

    Would appreciate the brain trust weighing in on this. In going thorough the $8D code reviewing the start-up logic, have been trying to understand the difference between Distributor Reference Pulses (DRP) and Time Between DRPs (TBDRP). Have searched forums and posts and have read until my head hurts. The result is a lot of conflicting information.

    So would like to start with this (‘7730, $8D, V8, TPI, External coil HEI):
    • How many DRPs per crankshaft revolution?
    • How are DRPs calculated?
    • How is TBDRP calculated?
    • TBDRP seems to be referred to as the “Reference Period”. Is that correct? What does that really mean?
    • How do both DRP and TBDRP relate to Injector Base Pulse Width (BPW), if at all?


    Part of my confusion comes from how a $8D ADX file converts some raw data. It uses the same Conversion Factor of 15.26 (assume this is uSec per DRP???) for reporting both TBDRP and Injector BPW.

    Just some of many questions. Would really like to understand this so let’s start a discussion.

  2. #2
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,847
    DRP is a cycle of low to high to low voltage generated by the ignition module. There are four per revolution on the V8 engine. They are counted, not calculated.

    Time between pulses is elapsed time between pulses. It is measured by reading a counter each time a reference pulse occurs.

    "Reference period" is the time between distributor reference pulses. It really means the time between the falling edge of two consecutive pulses.

    Time between pulses and number of cylinders can be used together to determine RPM. That variable is used frequently.

    Injector pulses, in synchronous fire mode, occur in synchronization with DRP's.,
    Last edited by 1project2many; 11-02-2013 at 01:09 AM.

  3. #3
    Fuel Injected! 84Elky's Avatar
    Join Date
    Jul 2012
    Location
    Montgomery, AL
    Posts
    204
    Quote Originally Posted by 1project2many View Post
    DRP is a cycle of low to high to low voltage generated by the ignition module. There are four per revolution on the V8 engine. They are counted, not calculated.

    Time between pulses is elapsed time between pulses. It is measured by reading a counter each time a reference pulse occurs.

    "Reference period" is the time between distributor reference pulses. It really means the time between the falling edge of two consecutive pulses.

    Time between pulses and number of cylinders can be used together to determine RPM. That variable is used frequently.

    Injector pulses, in synchronous fire mode, occur in synchronization with DRP's.,
    1Proj – Thanks for the prompt reply. With that and some math, think I’ve solved the nagging problem I was having with understanding the uses and meanings of Pulses, Periods, etc. Maybe others are having the same issue.

    Here’s why the confusion. The $8D ANHT and AUJP code hacks both describe the pre-start, spin-up RPM threshold to be 300 RPM before the engine can be considered running. No problem there. And that RPM is associated with a variable (L801A) having a value of 0x0CCD = 3277d. Further, this value is compared against L00B3=CURRENT MNR LOOP DRP PERIOD to see if the engine is turning over enough to allow starting.

    So in order to compare something apples-to-apples, if the comment on L00B3 is correct, that means L801A has to be 3277 DRP PERIODS as well. But it does not appear to be that. Rather, it seems that Distributor Reference Pulses and/or Reference Periods are used at times as a descriptor when ECM Pulses and/or ECM Reference Periods should be used. This is borne out by the fact that at 300 RPM, there would be only 1200d DRPs; yet the variable used for 300 RPM in the code is 3277d and not 1200d. What appears to happen is the ECM reads the Distributor Pulses, converts them to ECM Pulses with a base frequency of 65536Hz and then outputs the equivalent ECM Reference Periods into variable L00B3.

    To further support this, the comparison in the code is such that the compared values cannot be Pulses of any kind, because the smaller the number, the larger the equivalent RPM. That relationship can only occur with Reference Periods/Time Between Pulses which have an inverse relationship with RPM (the smaller the value, the larger the RPM). Code snippet below:
    Code:
    ldx     *L00B3                  ; CURRENT MNR LOOP DRP PERIOD
    cpx     L801A                   ; 300 RPM [= $0CCD, 3277d], START UP RPM [See formulas where L801A is defined]
    bcs     LB757                   ; [BR if L00B3 < ($0CCD = 3277d) = RPM HIGHER THAN 300]
    
    ;                                … else [L00B3 >= ($0CCD = 3277d) = RPM LESS THAN OR EQUAL TO 300]
    bclr    *L0038,#0x04            ; [Indicate [NO] DRP in 6.25ms [ISR] = NOT Enough RPM] for Start-up
    clra                            ; A = 0
    bra     LB78B                   ; BRANCH ALWAYS [Engine Turning Over to Start]
    And here’s the math that hopefully supports that L801A (and thus L00B3) are “# of ECM Generated Reference Periods”:

    Code:
    ; L801A:        .byte   0x0C,0xCD        ; Argument = $0CCD = 3277d = 300 START UP RPM
     
    ;
    ;       1 sec              1000000 Us               15.258789 Us Between (or per)
    ;   -----------------   x ----------------      = -------------------------------- = 1 ECM Reference Period
    ;   65536 ECM Pulses       1 sec                            1 ECM Pulse
    ;
    ;                             65536 ECM Pulses        60 sec               1 rev              1 min
    ;  ARG (# ECM Ref Periods) = ------------------ x  ------------      x   ------------  x  ----------------
    ;                                 sec                   min             4 DRP Pulses         X revs
    ;  Because the units of measure above all cancel prove the Argument is just a number = # of ECM Ref Periods
    ;
    ;           983040             983040
    ;   ARG = -----------      = ----------- = 3277 ECM Reference Periods
    ;            revs               300
    ;
    ;
    ;            revs         65536 ECM Pulses       60 sec         1 rev                1
    ;   RPM  = ----------- = ------------------- x ---------- x  --------------- x ---------------------------
    ;          1 minute         1 sec               1 minute       4 DRP Pulses      Arg (# ECM Ref Periods)
    ; 
    ;                  983040                     983040
    ;   RPM =  -------------------------     = ------------ = 300 RPM
    ;           Arg (# ECM Ref Periods)            3277


    Seems confusing, but it clears things up for me. If anyone sees this differently, would appreciate your views.

  4. #4
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,847
    What appears to happen is the ECM reads the Distributor Pulses, converts them to ECM Pulses with a base frequency of 65536Hz and then outputs the equivalent ECM Reference Periods into variable L00B3.
    The commenter of the ANHT hac (and others) often used his own shorthand and would mix references, likely due to familiarity with the material and systems. DRP Period is a correct term as it refers to the elapsed time, or period, between distributor reference pulses.

    The ecm queries for the time between reference pulses as measured by the 65 kHz timer value then compares the result with the time value stored at $801A. The commenter did the conversion between time and RPM and listed the RPM in the comments. But that value onlyt represents 300 rpm for engines with eight cylinders.

    Elsewhere in the code that same time variable is queried and the result is multiplied against the number of cylinders, or knumcyl. The result, now corrected for cylinder count, is saved as RPM. Engines with less than eight cylinders are corrected to eight cylinder values. The attached chart might serve as a handy lookup.
    Attached Files Attached Files
    Last edited by 1project2many; 11-03-2013 at 11:36 AM.

  5. #5
    Fuel Injected! 84Elky's Avatar
    Join Date
    Jul 2012
    Location
    Montgomery, AL
    Posts
    204
    Quote Originally Posted by 1project2many View Post
    The attached chart might serve as a handy lookup.
    Exactly & Thanks! Where has this chart been all my life? The column labeled “cntr” (3rd from right after adjusting the headings) is precisely the decimal value of what the code is getting from the ECM after the ECM receives DRPs at a given RPM. It’s the “# of ECM-generated Reference Periods at X RPM.

    But believe the last column labeled “cntr * knumcyl” should be labeled (cntr * knumcyls) / 8, with no adjustment to “cntr” being required for 8 cyls.

    Thanks again, and just curious about the origin of the chart and if there is other similar ECM related info available because have not seen this before?

  6. #6
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,847
    Exactly & Thanks! Where has this chart been all my life?
    I made it back in 2000 when I was working through $58. I wrote a program to do the math in hex, with appropriate rounding, so I could see it happen step by step. I've posted it to a few sites over the years but the people that appreciate it are few and far between.

    Why are you inserting "ECM generated reference periods" into the process? That phrase indicates the ecm is responsible for creating the value, which it is not. The ecm simply measures time between two events. No event, no measurement. Are you referring to the source of the value?
    Code:
    LDX L3FC0 ; LAST DRP PERIOD
    STX L00B3 ; CURRENT MNR LOOP DRP PERIOD
    I suppose this might be thought of as "Ecm generated" since the value is obtained from onboard hardware but it's the only "reference period" other than when "current" is moved to "old."

    Code:
    LDD L00B3 ; CURRENT MNR LOOP DRP PERIOD
    STD L00B5 ; OLD REF PER

    But believe the last column labeled “cntr * knumcyl” should be labeled (cntr * knumcyls) / 8, with no adjustment to “cntr” being required for 8 cyls.
    The last column is the result of multiplication done by the ecm with the number of cylinders variable. There is no division. It's done with rounding. The time between DRP's is queried, knumcyl is loaded, and the two variables are sent to the standard 8X16 multiply subroutine.

    Code:
    CFAD            ldd     REFINT	
    CFB0            std     rpmref	; L0037.  This will become 90deg ref * # of cylinders. 
    CFB2            ldx     #0x0037	; places addy of rpmref in X
    CFB5            ldaa    NUMCYL	; sets up for 8X16mult
    CFB8            beq     LCFBF	; for 8cyl, goto LCFBF
    CFBA            jsr     8X16mult	; generic multiply for 8X16 bit #'s: returns 16 bit 
    					; value in D = 90 deg counter * NUMCYL
    					;
    CFBD            std     rpmref	; now we have a number = ref corrected for knumcyl
    The logical tests are reversed in $8D (BNE vs BEQ) but the steps are the same. What's in the column is exactly what's generated by the 8X16 multiply subroutine for the listed counter and knumcyl values. If you're looking at this section:
    Code:
    LDD L00B3 ; CURRENT MNR LOOP DRP PERIOD
    LSRD ; DIV BY 8
    LSRD
    LSRD
    Its for dwell calculation.

    What other info are you looking for?

    Edit: The file I attached to the previous post was the raw data I obtained from the program. That's not what I intended to attach. This is formatted a little better.
    Attached Files Attached Files
    Last edited by 1project2many; 11-04-2013 at 06:44 AM.

  7. #7
    Fuel Injected! 84Elky's Avatar
    Join Date
    Jul 2012
    Location
    Montgomery, AL
    Posts
    204
    Thanks for the reformatted file.

    Why are you inserting "ECM generated reference periods" into the process?
    I’ve been tracing through the AUJP $8D code trying to understand why some things work they way they do, rather than just blindly accepting them. In the process, the comments in the hack have been very helpful. In fact it would be impossible for me to trace without the comments. Many, many kudos to those who had the ability to interpret the raw code and add them. But in some cases, I’ve found things to be a bit confusing.

    This might be viewed to be somewhat anal, but it’s important for my understanding. For example, take the labelling of the variables below. To me, it’s confusing if not incorrect. If these were truly Distributor Reference Periods, then at 300 RPM, the value would be 1200d. But it’s not; we know it to be 3277d.
    Code:
    LDX L3FC0 ; LAST DRP PERIOD
    STX L00B3 ; CURRENT MNR LOOP DRP PERIOD
    So that says that somehow, Distribitor Reference Periods are being changed to something else for use by the code. Otherwise 1200d would be used. And since the ECM is reporting the value of 3277d at 300 RPM, I just chose to call the value “# of ECM-generated Reference Periods" (could be “# of 65536Hz Reference Periods from the ECM, computed from Distributor Reference Periods”), and will change my work-in-process commented code file accordingly (updated periodically and found here in Post #8 as JP_AUJP-ASM.zip:http://www.gearhead-efi.com/Fuel-Inj...Information-8D ). That way when I go back to the code at a later time, I won’t be confused as to what the variables really are. That’s all, nothing more.

    Regarding the last column of data. Understand that it’s done (in hex) with rounding and an 8x16 multiply subroutine; but using decimal values the last column value is:
    (cntr * # cylinders) / 8

    Take the 6 cylinder, 2500 RPM values as an example:

    Code:
                   pulses    pulses      secs/    cntr  hxcntr       cntr*
    # Cyl    RPM   /min      /sec        pulse                       knumcyl
    6        2500  7500      125         0.008    524   020C         0189
    Doing the decimal math:
    (524 * 6) / 8 = 393d = 0x189 (the table value)

    Ditto for any value.

  8. #8
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,847
    This might be viewed to be somewhat anal, but it’s important for my understanding. For example, take the labelling of the variables below. To me, it’s confusing if not incorrect. If these were truly Distributor Reference Periods, then at 300 RPM, the value would be 1200d. But it’s not; we know it to be 3277d.
    Ahhh. Understood. DRP could mean Distributor Reference Period.

    But at 300 rpm how would you obtain a value of 1200d for a distributor reference period? One revolution of the distributor takes 1/150 second.

    Regarding the last column of data. Understand that it’s done (in hex) with rounding and an 8x16 multiply subroutine; but using decimal values the last column value is:
    (cntr * # cylinders) / 8
    The title was derived from the source of the data, not the values themselves. The last two columns contain hex values to be used for quick reference for people not used to hex <> decimal conversions.
    Last edited by 1project2many; 11-04-2013 at 11:18 PM.

  9. #9
    Fuel Injected! 84Elky's Avatar
    Join Date
    Jul 2012
    Location
    Montgomery, AL
    Posts
    204
    Was thinking about this again when you replied and was about to make a correction, so will do it here. I made an error in both the value 1200 and what the variables represent. What’s really happening is a conversion of Distributor Reference Pulses (DRPs) at a given RPM to equivalent ECM clock ticks. Consider this:

    Code:
    4 DRPs        300 rev       1200 DRPs           1 min       20 DRPs
    --------  x  ---------- = -------------- x -------------- = ----------
    1 rev           min            min              60 sec        sec
    Now, with 20 DRPs per second at 300 RPM, what’s the equivalent ECM pulse rate (in ECM clock ticks) at 300 RPM? It’s simply:

    Code:
       65536 ECM Clock Ticks         1 sec                3277 ECM Clock Ticks
    --------------------------  x  -------------    =  --------------------------
               sec                   20 DRPs              per DRP at 300 RPM
    Perhaps that’s why it’s referred to in some of the comments as a “counter”.

    I should have approached it this way to begin with using the above simple formula and it would have been much less complicated. And proving the formula:

    Code:
    1 sec         0.05 sec        1000000 uS
    -------  =  ----------- x ------------------ = 50000uS per DRP at 300 RPM
    20 DRPs        DRP               sec
    
     
    3277 ECM Clock Ticks           15.26 uS
    ---------------------- x ------------------- = 50000uS per DRP at 300 RPM
    per DRP at 300 RPM         ECM Clock Tick
    Wish it weren’t so that it takes me so long to get somewhere. At times it takes a while for the synapses to fire..

  10. #10
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,847
    ANHT is essentially someone's personal notebook. Not all of the notes are meaningful and some are not 100% correct. I haven't looked at AUJP lately but I think that contains some of the same comments and possibly some of the same errors.

    Feel free to challenge what's presented. Several months ago there was a long thread that started as a question about EGR operation, moved through the discovery that the temperature conversion we'd been taking for granted was not correct for all ecm's, and ended with development of a polynomial representation of a thermistor lookup table for use in some ADX files. Wouldn't have happened without someone asking questions.

Similar Threads

  1. Replies: 3
    Last Post: 09-21-2013, 04:42 PM
  2. Old parts reference
    By 1project2many in forum Gear Heads
    Replies: 0
    Last Post: 05-02-2012, 07:45 PM
  3. Great resource for GM P4 PCM list and cross reference
    By EagleMark in forum GM EFI Systems
    Replies: 4
    Last Post: 03-23-2012, 01:46 AM
  4. For Historical Reference
    By 1project2many in forum GM EFI Systems
    Replies: 6
    Last Post: 11-04-2011, 08:25 AM
  5. First time here
    By rsgt in forum Introductions
    Replies: 3
    Last Post: 05-05-2011, 02:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •