![]() |
Quote:
As you say, it's also how the tables actually are in the ROMs so it's easier when looking through the likes of ScoobyROM or WInOLS to pick out the tables. In case you didn't have it this is my up-to-date A01G with ratios and metric values. |
TRAC switch doubleclick
2 Attachment(s)
Off topic, but related.
With the Arduino Nano going in as a FlexFuel Sensor controller, there is space for much more to be added on. I decided to make a doubleclick TRAC control switch so I don't have to hold down the TRAC switch down for 3+ seconds to turn if off. Simple code and adds 2 resistors and an NPN transistor to the circuitry. If you want it on by default, set initial button state to 4, which acts as a doubleclick a certain time (TRAC_initializeDelay) after power on. Why not the full pedal dance? Mine is a street car and we in Australia can't use the speeds on road which people have issues with VSC activating brakes at, requiring the pedal dance to be used or sent over CANBUS like with OFT. Out of interest, can anyone share the CAN sequence needed for pedal dance active? Code, schematic, and picture of controller box with FlexFuel sensor leads, TRAC switch leads, PLX serial interface. Updated Arduino code: Code:
//Flex Fuel sensor code |
Applying scalings to injector routines
Having calculated a fuelling multiplier based on E% and scaling the stock PI (Injector scaling BRZ) and DI (DI pressure multiplier C) multiplier values in the routine described above in post #15, we need to get these values read in the fueling routines.
In the previous code, the following values are shown in the data segment following the code: Code:
000B98B0 FF F8 D4 18 off_B98B0: .data.l RAM_Flex_PI_Scaling ; DATA XREF: sub_B97C0What we need to do is find where in the ROM these values exist to be referenced and change them to point to our Flex Fuel scalars in RAM (FFF8D418 for PI and FFF8D41C for DI). This is as simple as searching for 0010C680 and replacing with FFF8D418 (6 instances) and 0010C614 and replacing with FFF8D41C (1 instance). All these instances are referenced by code appropriately: Code:
Address Function Instruction |
Cranking Compensations
Edit ***This v.1 code has not worked the way I thought - I get an appropriate multiplier and this does not get applied to the cranking fuel. Error due to delay in Arduino reading ethanol. v.2 code in Post #46, v.3 code in Post #49. ***
For this, we'll hijack the IAT cranking compensation lookup table which normally returns 1.0 for all IAT temperatures. There are two references to the IAT cranking compensation lookup table and we'll hook both to insert an ECT based cranking multiplier which is scaled by the Flex Fuelling multiplier. Stock code location A: Code:
ROM:00057880 loc_57880: ; CODE XREF: Cranking_Fuelling_CompCode:
00057880 loc_57880: ; CODE XREF: Cranking_CompensationsCode:
ROM:00057F4C D4 18 mov.l #Table_Cranking_Fuel_IPW_Compensation_Accelerator, r4Code:
00057F4C D4 18 mov.l #Table_Cranking_Fuel_IPW_Compensation_Accelerator, r4 |
@ztan I wish I could help out but this is way over my league.. Keep up the great work!!!
|
Beta testing
2 Attachment(s)
It Works!!!
Early beta testing, still need to post up fuelling and timing interpolation code, verify reasonable use of multipliers. Have filled up to E20 (up to E35 with E85 sitting in the tank before mixing in with residual fuel) and using a E85 multiplier of 1.35, trims look quite stable at present. |
Great job man, this is also way out of my league but great to have contributors like yourself and steve99 on this forum.
|
Flex Fuel Primary OL fuelling
1 Attachment(s)
This one is tricky.
I've used the routine for Primary OL enrichment lookup and assigned that to E85. The OL additive is a table that gets used normally when IAM < 1.0 and I've used that for an E0 table. The modified code is also a bit longer than the original and overlaps (by 2 bytes) a routine that is not used in stock A01G. Stock code: Code:
ROM:00061420 D6 67 mov.l #byte_114663, r6 ; Move Immediate Long DataCode:
00061420 D6 01 mov.l #RAM_Flex_Fuelling_Interpolant, r6Stock table defs: Code:
ROM:000B5854 00 0D 00 17 Table_Primary_Open_Loop_Fueling:Table_Type <h'D, 0, h'17>Code:
000B5854 00 0D 00 17 Table_Primary_OL_Fueling_E85:Table_Type <h'D, 0, h'17> |
Awesome progress man. Keep up the good work!
|
Amazing!
|
Gangster!
|
Excited to see this so close. Great Job!!
|
Updated log data
1 Attachment(s)
Fuelling daily drive data from the last couple of weeks, slowly moving across to E85. This data is with the Flex fuelling multiplier applied to 2 values only: PI scaling BRZ and GDI pressure multiplier C.
OL data is similar, though there is a early crossover period that looks rich when a higher E% is in the DI line where my sensor sits and fuel with a lower E% is still getting flushed out of that line. |
Flex Fuel Timing
2 Attachment(s)
For this code, I'm using Base Timing B as a E85 table, Base Timing A as an E0 table and interpolating between them based on E%.
The stock ROM has a value (FFF8ADB8 in A01G) which interpolates between the tables and we'll hijack that. Base Timing A gets used after a flash in the first few minutes AVCS is calibrating then switches to Base Timing B for the rest of the time. Stock code for the base timing table pull: Code:
ROM:00069C76 D2 46 mov.l #RAM_ECT, r2Code:
00069C76 D2 46 mov.l #RAM_ECT, r2 |
| All times are GMT -4. The time now is 07:32 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
User Alert System provided by
Advanced User Tagging v3.3.0 (Lite) -
vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.