Bringing TBI and Multi Port Fuel Injection to a New Level.     EFI Conversions and Tuning! Seattle to Portland! E-mail Tuning Consultant!
Results 1 to 11 of 11

Thread: $EE Code for electric water pump on AIR output

  1. #1
    Fuel Injected!
    Join Date
    Jan 2012
    Location
    Poland
    Posts
    86

    $EE Code for electric water pump on AIR output

    Hi!

    I'm trying to patch $EE code to use AIR pump output to control electric water pump on an LT1.
    Here are parts of E-side disassembly that control the AIR pump:
    Code:
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;
    ; 0x531F some AIR Pump code (probably enable at startup ???) (part of hc11_irq_00) (executed when L0023 b0 is clear)
    ;
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    531F    B6 20 28            ldaA    b_2028_sw_b3vats_b2spddens_b0tcs
    5322    85 04               bitA    #%00000100    ; test AIR Pump switch bit (E-side 0x2028 b2)
    5324    27 1B               beq @8                ; Bra to continue if bit clear
    5326    B6 01 92            ldaA    l_0192_CoolTmp_fltrd_$f0    ; Load Coolant Temp
    5329    B1 23 B2            cmpA    L23B2                       ; Compare to AIR pump disable temp threshold (E-side 0x23B2)
    532C    23 10               bls @7              ; Bra if Temp <= threshold
    532E    B6 01 28            ldaA    L0128       ; Load ???
    5331    81 AB               cmpA    #$AB        ; Compare to 171
    5333    24 06               bcc @6              ; Bra if L0128 >= 171
    5335    CE 18 00            ldX    #$1800             ; Load Hardware output address
    5338    1C 00 02            bset    0, X, #%00000010  ; Set AIR Pump output bit
    533B    14 28 10        @6  bset    L0028, #%00010000 ; Set AIR Pump ON flag
    533E    7F 02 44        @7  clr     L0244             ; Clear AIR Pump Timer
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Code:
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;
    ; 0x4962 Update AIR Pump State (part of loop_c_00)
    ;
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4962    B6 01 28        @12 ldaA    L0128    ; Load ???
    4965    81 AB               cmpA    #$AB     ; Compare to 171
    4967    24 29               bcc @14          ; Bra if L0128 >= 171
    4969    12 2F 01 2D         brset   l_002f_fts_2_stat_byte, #%00000001, @15    ;Bra if  T-side AIR request
    496D    12 28 20 1E         brset   L0028, #%00100000, @13    ; Branch if AIR ON flag is set
    4971    13 28 10 1D         brclr   L0028, #%00010000, @14    ; Branch if AIR Startup Request flag is clear
    ; Increase AIR Pump timer
    4975    B6 02 44            ldaA    L0244    ; Load AIR Pump Timer to A
    4978    8B 01               addA    #$01     ; Add 1 to A
    497A    82 00               sbcA    #$00     ; Subtract 0 from A with carry
    497C    B7 02 44            staA    L0244    ; Store AIR Pump Timer
    497F    B1 23 B3            cmpA    L23B3    ; Compare increased AIR Pump Timer to AIR pump timer threshold (E-side 0x23B3)
    4982    25 1F               bcs @16          ; Bra if A lower than threshold
    
    4984    14 28 20            bset    L0028, #%00100000    ; Set AIR ON flag
    4987    15 28 10            bclr    L0028, #%00010000    ; Clear AIR Startup Request flag
    498A    7F 02 44            clr     L0244                ; Clear AIR Pump Timer
    498D    20 03               jr @14
    ; Here if AIR Pump should be turned OFF (T-side AIR request clear and AIR ON set)
    498F    15 28 20        @13 bclr    L0028, #%00100000    ; Clear AIR ON flag
    ; Here if L0128 >= 171, AIR Pump timer threshold met or AIR Startup Request flag clear
    4992    CE 18 00        @14 ldX    #$1800                ; Load Hardware output address
    4995    1D 00 02            bclr    0, X, #%00000010     ; AIR Pump OFF
    4998    20 0F               jr @17                       ; Bra to continue
    ;
    499A    14 28 20        @15 bset    L0028, #%00100000    ; Set AIR ON flag
    499D    15 28 10            bclr    L0028, #%00010000    ; Clear AIR Startup Request flag
    49A0    7F 02 44            clr     L0244                ; Clear AIR Pump Timer
    ; Here if AIR Pump timer threshold not met
    49A3    CE 18 00        @16 ldX    #$1800                ; Load Hardware output address
    49A6    1C 00 02            bset    0, X, #%00000010     ; AIR Pump ON
    49A9    7E 4E 38        @17 jmp     L4E38
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    So far I've managed to get it working most of the time, pump swithes on when engine is running and turns off when engine stalls, but sometimes it turns off while engine is running. It does not report that it's ON in EEHack, but I can still enable it using EEHack control and then the AIR ON flag is set.
    Here is my code patch:
    Code:
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;
    ; 0x4962 Update AIR Pump State (part of loop_c_00)
    ;
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4962    B6 01 5F            ldaA    l_015f_RPM_2.5/bit ; Load engine speed
    4965    CE 18 00            ldX    #$1800              ; Load Hardware output address
    4968    12 2F 01 10         brset   l_002f_fts_2_stat_byte, #%00000001, @14    ;Bra if T-side AIR request set
    496C    81 A0               cmpA    #$A0    ; Compare to 400rpm
    496E    24 0C               bcc @14         ; Bra if higher or same
    4970    81 78               cmpA    #$78    ; Compare to 300rpm
    4972    22 0E               bhi @15         ; Bra if higher
    4974    15 28 20        @13 bclr    L0028, #%00100000    ; Clear AIR ON flag
    4977    1D 00 02            bclr    0, X, #%00000010     ; AIR Pump OFF
    497A    20 06               bra @15                      ; Bra to continue
    497C    14 28 20        @14 bset    L0028, #%00100000    ; Set AIR ON flag
    497F    1C 00 02            bset    0, X, #%00000010     ; AIR Pump ON
    4982    20 25           @15 bra @17
    ....
    49A9    7E 4E 38        @17 jmp     L4E38
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Maybe some of you may get me on the right track here, there must be something I don't see in the code that turns the AIR output OFF. Also, do you know what is in L0128 RAM address? I can't figure it out.
    Last edited by dzidaV8; 1 Week Ago at 06:35 AM.

  2. #2
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    316
    I think the air pump is not good candidate for the patch. It will be over complicated and too long There are some unused pins like pin b9 to run the waterpump.
    It is software address is byte_1800 $01. You can use engine on flag byte_23 $80 for trigger, and add other stuff like ignition on or Coolant temperature corrections.

    Byte_128 is ad Ignition voltage.

    If you still have troubles I will compile a quick patch for you

  3. #3
    Fuel Injected!
    Join Date
    Jan 2012
    Location
    Poland
    Posts
    86
    Thanks!

    So, the most basic solution would be to change this:
    Code:
    4935    CE 18 00            ldX    #$1800
    4938    12 2F 02 05         brset    l_002f_fts_2_stat_byte, #%00000010, @7
    493C    1D 00 01            bclr    0, X, #%00000001
    493F    20 03               jr    @8
    ;
    4941    1C 00 01        @7    bset    0, X, #%00000001
    to this:
    Code:
    4935    CE 18 00            ldX    #$1800
    4938    12 23 80 05         brset    L0023, #%10000000, @7
    493C    1D 00 01            bclr    0, X, #%00000001
    493F    20 03               jr    @8
    ;
    4941    1C 00 01        @7    bset    0, X, #%00000001
    And if I wanted some more functionality, then I'd insert a jump at 0x493C to additional subroutine in some unused space to test conditions to run pump w/o engine running.

    Could you point me to some free space I could safely use?
    Last edited by dzidaV8; 1 Week Ago at 01:32 PM.

  4. #4
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    316
    You found very basic elegant solutions, since b9 is already set in the code.
    Just change at
    4939

    2f 02 to 23 80

    and wire the water pump relay to pin b9. For safety reason you can check polarity and functionality of the pin.
    As I can remember when the bit is set, the pin provide ground path for the relay.

  5. #5
    Fuel Injected!
    Join Date
    Jan 2012
    Location
    Poland
    Posts
    86
    OK, so the subroutine would look like this:
    Code:
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;
    ; Routine to enable Electric Water Pump when engine not running
    ;
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9000    1D 00 01            bclr    0, X, #%00000001       ; Disable WP (X already set to $1800)
    9003    B6 01 28            ldaA    L0128                  ; Load A/D Ignition Voltage
    9006    81 30               cmpA    #$30                   ; Compare to 48
    9008    23 0A               bls    @1                      ; Bra to return if Ign Voltage <= 4.8V (Ignition off)
    900A    B6 01 92            ldaA    l_0192_CoolTmp_fltrd_$f0    ; Load Coolant Temp
    900D    81 B9               cmpA    #$B9                   ; Compare temp to 99 deg C
    900F    23 03               bls    @1                      ; Bra to return if Temp <= threshold
    9011    1C 00 01            bset    0, X, #%00000001       ; Enable WP (X already set to $1800)
    9014    7E 49 44        @1  jmp     L4944
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    And:
    Code:
    4935    CE 18 00            ldX    #$1800
    4938    12 23 80 05         brset   L0023, #%10000000, @7
    493C    7E 90 00            jmp     L9000 ; jump to new subroutine
    493F    20 03               jr    @8
    ;
    4941    1C 00 01        @7  bset    0, X, #%00000001
    Now I just need 23 bytes of program memory to add my subroutine. Kur4o, can you point me at some usable address?

    [EDIT] I've found E-side 0x9000 - 0x93FF marked as free memory in EEXtra.xdf, so I guess the subroutine goes to 0x9000 :)
    Last edited by dzidaV8; 1 Week Ago at 02:35 PM.

  6. #6
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    316
    Half the bin is empty.
    You can start at the lower section to keep all patches nice and tide.
    I suggest to use F000-FF00 memory range.

    also use subroutine bd code.

    at 4935 put
    BD F0 00 20 0A

    at F0 00 write your subroutine and add the return instruction [39] at the end

  7. #7
    Fuel Injected! steveo's Avatar
    Join Date
    Aug 2013
    Posts
    2,247
    just curious, why do you want ECM control of the electric waterpump?

    and if so, why not just use the fuel pump relay to trigger a second relay if you only want it on when the engine is running? (although you'd get a prime cycle, that shouldn't be a big deal...)

    it's a cool project, just curious

  8. #8
    Fuel Injected!
    Join Date
    Jan 2012
    Location
    Poland
    Posts
    86
    Quote Originally Posted by steveo View Post
    just curious, why do you want ECM control of the electric waterpump?

    and if so, why not just use the fuel pump relay to trigger a second relay if you only want it on when the engine is running? (although you'd get a prime cycle, that shouldn't be a big deal...)

    it's a cool project, just curious
    Because... why not? :)

    A feature to have the pump work on hot engine while it is off might get useful sometime.

  9. #9
    Fuel Injected!
    Join Date
    Oct 2013
    Posts
    782
    Did you ever consider PWM control and remove the thermostat? By remove, I mean disable it in the full open position or modify the pump to do the equivalent.

    Then, you'd cool more than just down to the thermostat closing temperature by running the pump with the engine off.

  10. #10
    Fuel Injected!
    Join Date
    Jan 2012
    Location
    Poland
    Posts
    86
    Quote Originally Posted by lionelhutz View Post
    Did you ever consider PWM control and remove the thermostat? By remove, I mean disable it in the full open position or modify the pump to do the equivalent.

    Then, you'd cool more than just down to the thermostat closing temperature by running the pump with the engine off.
    I didn't think about it. Removing the thermostat is not a good idea, as the heat-up using the main circulation (through the radiator) would take much longer. The heater would also be less effective without it.
    The PWM control might be useful to shorten the warm-up time, and maybe to free up a fraction of horsepower lowering PWM at WOT momentarily, but not much more. The pump in the car I'm working on consumes only around 7 amps, so almost nothing for the alternator.

    The modern cars have thermostats with electric heater integrated in the viscous fluid to vary the opening and closing temperatures some. Anyway, why would you want to cool the car to temperatures lower than thermostat temp?

  11. #11
    Fuel Injected!
    Join Date
    Oct 2013
    Posts
    782
    The idea is that the PWM runs the pump slow during warm up. Decently implemented, a PWM pump and PWM fan will maintain a fairly constant engine temperature. Some OEM's are doing PWM instead of letting the thermostat regulate the engine temps. They probably build the system to have flow to the heater core first though using some other method.

    You don't want to keep cooling your engine to thermostat temperature or even below it when it's OFF?

Similar Threads

  1. DTC's and Output assembly code
    By turbo_bu in forum GM EFI Systems
    Replies: 0
    Last Post: 04-17-2017, 06:12 AM
  2. Replies: 19
    Last Post: 12-21-2013, 12:02 PM
  3. Replies: 14
    Last Post: 12-19-2013, 09:10 PM
  4. PWM Electric Water Pump control
    By gregs78cam in forum Gear Heads
    Replies: 12
    Last Post: 05-27-2013, 03:51 PM
  5. Replies: 0
    Last Post: 03-21-2012, 10:41 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
  •