Flex Fuel Control

A1C calibration can be modified and configured to operate all EFI-SD4x ECUs in 4 cylinder, 6 cylinder and 8 cylinder configurations.
wwhite
Posts: 400
Joined: 2021 Feb 16, 15:53
Location: Victoria, BC, Canada
Vehicle Information: 1994 Flarside, XLT, 351w E4OD
SD48b, Quarter Horse, Burn2

Re: Flex Fuel Control

Unread post by wwhite »

Should you set R42 back to what was in [700], after you change it to aaaa?

This way your guaranteed to not mess with R42 setting it to a different value.
efloth
Posts: 399
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Flex Fuel Control

Unread post by efloth »

It’s is earlier written as byte AA for KAMQA so I didn’t bother
sailorbob
Posts: 28
Joined: 2021 Feb 15, 15:09
Location: UK
Vehicle Information: MR2 turbo / Lotus

Re: Flex Fuel Control

Unread post by sailorbob »

A 0x42 already holds 0xAA just load 0xAA into 0x43 instead of the 0xAAAA into 0x42 and save a state time :D
efloth
Posts: 399
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Flex Fuel Control

Unread post by efloth »

sailorbob wrote: 2024 Dec 20, 13:11 A 0x42 already holds 0xAA just load 0xAA into 0x43 instead of the 0xAAAA into 0x42 and save a state time :D
lol love it!
efloth
Posts: 399
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Flex Fuel Control

Unread post by efloth »

Making some progress on updating KAMAFR using the built in (U)ROLAV function. I borrowed the time constant tcegr which is 2 seconds. Not sure if I should increase that or not.

Code: Select all

Sub_a30d:
a30d: ef,2e,b1            call  543e             Sub_543e ();		'previously called from background fuel sub
a310: 32,9f,01            jnb   B2,R9f,a314      if (B2_R9f = 1)  {	'Return if in open loop
a313: f0                  ret                    return; }

a314: a3,ee,96,32         ldw   R32,[Ree+96]     R32 = [716];		'KAMAFR
a318: a0,96,34            ldw   R34,R96          R34 = R96;		'LAMBSE1
a31b: a3,f8,18,36         ldw   R36,[Rf8+18]     R36 = [adf0];		'TCEGR 0800h = 2 seconds according to docs
a31f: ef,50,a4            call  4772             Sub_4772 ();		'UROLAV function, not sure how that differs from ROLAV
a322: c3,ee,96,3e         stw   R3e,[Ree+96]     [716] = R3e;		'New value for KAMAFR. More code is needed here to make sure valid
a326: f0                  ret                    return;
decipha
Posts: 6297
Joined: 2021 Feb 15, 12:23
Location: Metairie, LA
Vehicle Information: Work Truck
'25 F-150 5L

Re: Flex Fuel Control

Unread post by decipha »

prob best to use the adaptive delay timer and conditions before trying to assimilate the lambse
efloth
Posts: 399
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Flex Fuel Control

Unread post by efloth »

Thinking r34 needs to be kamafr * lambse1 yeah? Looks like I need to do some math/conversion here. Lambse is x/32768 and AFR is 524288/x
efloth
Posts: 399
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Flex Fuel Control

Unread post by efloth »

decipha wrote: 2024 Dec 20, 22:43 prob best to use the adaptive delay timer and conditions before trying to assimilate the lambse
Was thinking of just using a minimum temperature. is that sufficient?
decipha
Posts: 6297
Joined: 2021 Feb 15, 12:23
Location: Metairie, LA
Vehicle Information: Work Truck
'25 F-150 5L

Re: Flex Fuel Control

Unread post by decipha »

no

you want to be able to define a range
i.e. part throttle, 1500-2500 rpm, 50-70 mapope, etc...

temp alone wont cut it
sailorbob
Posts: 28
Joined: 2021 Feb 15, 15:09
Location: UK
Vehicle Information: MR2 turbo / Lotus

Re: Flex Fuel Control

Unread post by sailorbob »

Out of curiosity have you datalogged LAMBSE to see how stable the value is when using a fuel with a different stoichiometric A/F ratio to petrol. Or seen how long it takes to stabilise when a different fuel is added to what is already in the tank? I think these behaviours are important for how you need to determine the nominal stoichiometric A/F ratio.

LAMAVE might be a better value to use instead of LAMBSE.

Regarding code thrift, whilst my prior comment was a bit tongue in cheek, it is worth considering keeping any additional code as short and concise as possible. For example, at 0xA310 if you change it to a jump to quit if in open loop you can omit the return instruction at 0xA313 and fall through if in closed loop.
Post Reply