Rbob? Someone?
Thread Starter
Supreme Member
iTrader: (2)
Joined: May 2007
Posts: 2,574
Likes: 0
From: right behind you
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Rbob? Someone?
Attached is a snippet of code and bin/definition files for something I've been working on for awhile that I can't get to run right. The older version of this would occasionally kick out of power enrich at WOT and this is my latest attempt at a fix but it's not better. It dies on startup after it loads up with fuel, if I play with the throttle it will struggle to run for a bit while the check engine light quickly flashes and eventually it will die again. This is for a modified version of $6E that's using a map sensor instead of the LV8 calc.
What it's supposed to do- it will enter power enrichment if either the tps or kpa exceeds table values and it will only end power enrich after both the tps and kpa are low enough.
There must be something obvious I'm missing.
Thanks for any help in advance.
What it's supposed to do- it will enter power enrichment if either the tps or kpa exceeds table values and it will only end power enrich after both the tps and kpa are low enough.
There must be something obvious I'm missing.
Thanks for any help in advance. Last edited by bl85c; Jan 25, 2013 at 10:55 PM.
Moderator
iTrader: (1)
Joined: Mar 2002
Posts: 18,432
Likes: 233
From: Chasing Electrons
Car: check
Engine: check
Transmission: check
Re: Rbob? Someone?
Biggest item is checking for underflow after the subtracts:
This needs to be done after nearly every subtract or add instruction. This may be why is would drop out of PE mode from time to time.
I rewrote the code segment with that change along with simplifying it some:
RBob.
Code:
D919: SUBA LC4FF ; %TPS HYST FOR PWR ENR
BCC LD922 ; bra if no underflow
CLRA ; clr underflow
;
D922: LD922 CMPA L0083 ; TPS Val I rewrote the code segment with that change along with simplifying it some:
Code:
;---------------------------------------------
;
; PWR ENR MAP THRESHOLD vs RPM
;
;---------------------------------------------
D8F2: LD8F2 LDX #$C501 ; PWR ENR MAP THRESHOLD vs RPM
D8F5: LDAA L0058 ; RPM/25
D8F7: LSRA
D8F8: LSRA ; RPM/4
D8F9: PSHA
D8FA: JSR LF3FF ; Call 2d Lk Up, (No Offset)
D8FD: BRCLR L0044,#$20,LD904 ; Branch if Not Pwr Enrichment
; ... else
D901: SUBA LC4FE ; LD VAL HYST FOR PWR ENR
BCC LD904 ; bra if no underflow
CLRA ; clr underflow
D904: LD904 CMPA L0064 ; Load Val
D90C: BLO PeOn ; bra if theshold < MAP
;---------------------------------------------
;
; PWR ENR TPS THRESHOLD vs RPM
; TBL = 2.56 * %TPS
;---------------------------------------------
D90E: LD90E LDX #$C506 ; PWR ENR TPS THRESHOLD vs RPM
D911: PULA ; RPM/4
D912: JSR LF3FF ; Call 2d Lk Up, (No offset)
D915: BRCLR L0044,#$20,LD922 ; Branch if Not Pwr Enrichment
; ... else
D919: SUBA LC4FF ; %TPS HYST FOR PWR ENR
BCC LD922 ; bra if no underflow
CLRA ; clr underflow
;
D922: LD922 CMPA L0083 ; TPS Val
D924: BHS PeOff ; bra if thres >= TPS%
;
D926: PeOn BSET L0044,#$20 ; set bit
BRA PeDone ;
;
PeOff BCLR L0044,#$20 ; clear bit
;
PeDone: $ ; done
D92C: BCLR L003A,#$80 ;; ??? Moderator
iTrader: (1)
Joined: Mar 2002
Posts: 18,432
Likes: 233
From: Chasing Electrons
Car: check
Engine: check
Transmission: check
Re: Rbob? Someone?
Note that it no longer branches to LD95D, so be sure to take that into account when grafting in the new code.
RBob.
RBob.
Thread
Thread Starter
Forum
Replies
Last Post




