Pages: 1 [2] 3 4 ... 7
Author Topic: True ME7.5 Speed Density  (Read 74644 times)
woj
Hero Member
*****

Karma: +43/-3
Offline Offline

Posts: 500


« Reply #15 on: April 17, 2020, 12:10:02 PM »

The free ADC - I missed the obvious MAF input, I admit. Still, quite useful to be able to keep it running for testing the MAP based development.

O2 input, not sure about ME that has a 10bit ADC, but IIRC there were older ECUs that had a voltage amplifier on O2 input to improve the signal resolution.

I can't say for sure how is the ADC channel sampling done, the code is a bit contrived, I am tired, and nobody is paying me for this, but... the actual ADC sampling is done somewhere in the "depths" of the ECU along with all other channels. The value copying to udss variable (pure MAP voltage signal) seems to be done crank synced (not 100% sure), what I noticed it happens together with the bunch of procedures, where one of them is the one that uses "TRD - Tooth period time for reverse rotation during stop" parameter on my ECU if that helps you locating the right procedure vector on your ECU. But, I did not really commit to verifying this, and have no idea what TRD is for, could as well be I found something totally unrelated.

For filtering - I see n-last values averaging when converting udss into pdss (or whatever it is properly called), but I have to look at it again to be sure and get the exact figures.

EDIT: OK, the averaging seems to be on the number of reads of udss snapshots that happened since the last crank sync, which makes me suspicious of when is the udss read from ADC that I just described above, could it be tooth sync instead?...
« Last Edit: April 17, 2020, 12:20:26 PM by woj » Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #16 on: April 17, 2020, 12:47:47 PM »

Why dumb if the original loom reach the sensor and have the same pin as the new connector? Just need to repin a single wire in the ECU connector for supplying 5V and its all good to go.
Because you're replacing the MAF, so the only thing that it makes sense to use is the MAF wires.
Simply extending them and changing the connector, which costs peanuts is nothing.

Another thing - NA cars have IAT in the MAF (which when converted to turbo and SD is still needed).

Anyway you do how you want it, but MAF ADC is the only reasonable option, because it's how it's done from the factory - everything else IS really dumb.
That said, changing the ADC channel is super is easy. So if you want to make a huge hack then go on, use the rear o2.

O2 input, not sure about ME that has a 10bit ADC, but IIRC there were older ECUs that had a voltage amplifier on O2 input to improve the signal resolution.
It's a normal 0-5V input like any other on ME7.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #17 on: April 17, 2020, 01:22:33 PM »

The free ADC - I missed the obvious MAF input, I admit. Still, quite useful to be able to keep it running for testing the MAP based development.

O2 input, not sure about ME that has a 10bit ADC, but IIRC there were older ECUs that had a voltage amplifier on O2 input to improve the signal resolution.

Rear O2 is direct connected to the ADC.

This works, it is already wired up and tested.

I can't say for sure how is the ADC channel sampling done, the code is a bit contrived, I am tired, and nobody is paying me for this, but... the actual ADC sampling is done somewhere in the "depths" of the ECU along with all other channels. The value copying to udss variable (pure MAP voltage signal) seems to be done crank synced (not 100% sure), what I noticed it happens together with the bunch of procedures, where one of them is the one that uses "TRD - Tooth period time for reverse rotation during stop" parameter on my ECU if that helps you locating the right procedure vector on your ECU. But, I did not really commit to verifying this, and have no idea what TRD is for, could as well be I found something totally unrelated.

For filtering - I see n-last values averaging when converting udss into pdss (or whatever it is properly called), but I have to look at it again to be sure and get the exact figures.

EDIT: OK, the averaging seems to be on the number of reads of udss snapshots that happened since the last crank sync, which makes me suspicious of when is the udss read from ADC that I just described above, could it be tooth sync instead?...

If this is correct, the sampling is not running crank-synchronous.

Can you post your original bin?

Because you're replacing the MAF, so the only thing that it makes sense to use is the MAF wires.

You are missing one point: My code doesn't work yet. So why remove my MAF for something that not even works yet?

Changing the ADC channel later on is as simples as changing 2 bytes.

Another thing - NA cars have IAT in the MAF (which when converted to turbo and SD is still needed).

Anyway you do how you want it, but MAF ADC is the only reasonable option, because it's how it's done from the factory - everything else IS really dumb.
That said, changing the ADC channel is super is easy. So if you want to make a huge hack then go on, use the rear o2.

This is not a professional solution, my dude.

I am not a "pro tunner". I am only a bored engineer with some knowledge in ASM.
Logged
woj
Hero Member
*****

Karma: +43/-3
Offline Offline

Posts: 500


« Reply #18 on: April 17, 2020, 01:34:56 PM »

If this is correct, the sampling is not running crank-synchronous.

Can you post your original bin?

Not sure it is correct, but prj has not yet implied I am idiot Wink, so it could be. From what I saw, raw ADC channels are sampled collectively, "quite often" (an engineering term for you Wink. The most recent data collection seems to happen at every crank wheel tooth, and at every crank rotation it is averaged to get a reading for the inlet pressure variable. This makes sense to me at least, regardless of engine speed, you get consistent results for the whole engine rotation cycle.

Bin attached.
Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #19 on: April 21, 2020, 10:56:03 AM »

This is not a professional solution, my dude.

I am not a "pro tunner". I am only a bored engineer with some knowledge in ASM.

You already know more than most so called "pro tuners" who can only shift boxes left to right in winols. Trust me.

Sampling isn't crank-sync, evaluation of samples and filtering is.
It's not important to get it that super right - sampling is done every 1ms, as long as you get the sample more or less roughly at the same time each time for each cylinder/cycle then it'll be more or less the same signal.
« Last Edit: April 21, 2020, 10:57:57 AM by prj » Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
Blazius
Hero Member
*****

Karma: +89/-40
Offline Offline

Posts: 1282



« Reply #20 on: April 21, 2020, 12:59:22 PM »

Also a thing. NA 1.8 (of this platform) specifically does NOT have the standalone IAT in the MAF sensor, but separate just like 1.8T.
Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #21 on: April 21, 2020, 01:31:01 PM »

Also a thing. NA 1.8 (of this platform) specifically does NOT have the standalone IAT in the MAF sensor, but separate just like 1.8T.
Which is irrelevant, because no one with a 1.8 NA will ever need this.

Everything that is worth turbocharging has IAT in MAF.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
woj
Hero Member
*****

Karma: +43/-3
Offline Offline

Posts: 500


« Reply #22 on: April 22, 2020, 04:41:34 AM »

sampling is done every 1ms

So that is what I was seeing... Wink Indeed, every crank wheel tooth, though technically possible, seemed a bit too optimistic.
Logged
DT
Full Member
***

Karma: +20/-1
Offline Offline

Posts: 184


« Reply #23 on: April 22, 2020, 10:19:08 AM »

------
C16x specs,  minimum conversion time is like ~8us @25MHz which is enough time to handle ADC  every tooth. But as prj said above the correct interval is 1ms.
Apology to woj further down the thread.
« Last Edit: April 22, 2020, 04:31:38 PM by DT » Logged

woj
Hero Member
*****

Karma: +43/-3
Offline Offline

Posts: 500


« Reply #24 on: April 22, 2020, 11:35:49 AM »

So where is the flaw in my calculations then? Assumption 60 tooth crank wheel. One engine rotation at 7500rpm:

60sec * 1000 ms = 60000 ms

60000 / 7500 = 8 ms duration of one engine rotation

8 ms = 8000 us

Divide that by 60 you get ~133 us.

How did you come up with 2us???

 
Logged
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #25 on: April 22, 2020, 04:16:37 PM »

You already know more than most so called "pro tuners" who can only shift boxes left to right in winols. Trust me.

Sampling isn't crank-sync, evaluation of samples and filtering is.
It's not important to get it that super right - sampling is done every 1ms, as long as you get the sample more or less roughly at the same time each time for each cylinder/cycle then it'll be more or less the same signal.

Nice, the code in the first post will work then. Just need to move the accumulator to the 1ms raster and move the V to P conversion to the sync raster.

Also need to figure out how to filter the signal.

So that is what I was seeing... Wink Indeed, every crank wheel tooth, though technically possible, seemed a bit too optimistic.

There is only one entry in your bin that is relevant to track the ADC sampling timming, if your assumption was right, all ADC channels would be sampled at every tooth. That is insane.
Logged
DT
Full Member
***

Karma: +20/-1
Offline Offline

Posts: 184


« Reply #26 on: April 22, 2020, 04:18:10 PM »

So where is the flaw in my calculations then? Assumption 60 tooth crank wheel. One engine rotation at 7500rpm:

60sec * 1000 ms = 60000 ms

60000 / 7500 = 8 ms duration of one engine rotation

8 ms = 8000 us

Divide that by 60 you get ~133 us.

How did you come up with 2us???

 
Smiley Sorry woj, I was a bit quick there. 2,2us was my result but didn't take the 60sec/min into consideration.
Logged

noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #27 on: May 08, 2020, 01:10:13 PM »

Had some drawbacks last weeks and couldn't spend much time on this.

Attached to this post is a revised file.

There is basically two functions:

This first one is a simple accumulator for the sensor voltage. It runs on the 1ms raster. Bosch original code was used to read the ADC, only changing the target RAM address.

Code:
seg003:000A1D00 umap_acu:                          ; CODE XREF: Raster_1ms+1C
seg003:000A1D34                 mov     r4, word_FA48
seg003:000A1D38                 mov     r5, word_FA4A
seg003:000A1D3C                 add     r4, umap
seg003:000A1D40                 addc    r5, ZEROS
seg003:000A1D44                 jmpr    cc_NC, loc_8A1D4C
seg003:000A1D46                 mov     r4, #0FFFFh
seg003:000A1D4A                 mov     r5, r4
seg003:000A1D4C
seg003:000A1D4C loc_8A1D4C:                             ; CODE XREF: uhfm_umap_acu+44
seg003:000A1D4C                 mov     word_FA48, r4
seg003:000A1D50                 mov     word_FA4A, r5
seg003:000A1D54                 sub     word_FA4C, ONES
seg003:000A1D58                 rets


The main function is above.

It will take the mean of all readings and convert it to pressure. Than it will filter the signal using a lowpass filter with a variable factor for compensating the variable sample rate. Don't know if this will work, but I implemented this in 5 minutes, so I think its worth trying.

After that dspfg_w is calculated and the map value is limited by psmx_w before being write to ps_w.

Function is called using the CALLS from bgsrm_bps in the sync raster. In the end, the function jumps to next instruction after ps_w calculation in bgsrm_bps.

Code:
seg003:000A1E00 SpeedDensity:                           ; CODE XREF: Raster_sync+50
seg003:000A1E00
seg003:000A1E00 ; FUNCTION CHUNK AT seg003:00060716 SIZE 00000088 BYTES
seg003:000A1E00
seg003:000A1E00                 push    PSW
seg003:000A1E02                 atomic  #4
seg003:000A1E04                 or      PSW, #0F000h
seg003:000A1E08                 and     PSW, word_E008
seg003:000A1E0C                 nop
seg003:000A1E0E                 sub     r3, r8
seg003:000A1E10                 mov     r4, word_FA48
seg003:000A1E14                 mov     r5, word_FA4A
seg003:000A1E18                 mov     word_FA54, r4
seg003:000A1E1C                 mov     word_FA56, r5
seg003:000A1E20                 mov     r2, word_FA4C
seg003:000A1E24                 mov     anzumap_w, r2
seg003:000A1E28                 mov     r4, ZEROS
seg003:000A1E2C                 mov     r5, #0
seg003:000A1E2E                 mov     word_FA48, r4
seg003:000A1E32                 mov     word_FA4A, r5
seg003:000A1E36                 mov     word_FA4C, ZEROS
seg003:000A1E3A                 pop     PSW
seg003:000A1E3C                 mov     r4, anzumap_w
seg003:000A1E40                 cmp     r4, ZEROS
seg003:000A1E44                 jmpr    cc_NZ, loc_8A1E4C
seg003:000A1E46                 mov     r5, #1
seg003:000A1E48                 mov     anzumap_w, r5
seg003:000A1E4C
seg003:000A1E4C loc_8A1E4C:                             ; CODE XREF: SpeedDensity+44
seg003:000A1E4C                 mov     r4, anzumap_w
seg003:000A1E50                 mov     r5, word_FA54
seg003:000A1E54                 mov     r2, word_FA56
seg003:000A1E58                 mov     MDH, r2
seg003:000A1E5C                 mov     MDL, r5
seg003:000A1E60                 divlu   r4
seg003:000A1E62                 jmpr    cc_V, loc_8A1E6A
seg003:000A1E64                 mov     r3, MDL
seg003:000A1E68                 jmpr    cc_UC, loc_8A1E6E
seg003:000A1E6A ; ---------------------------------------------------------------------------
seg003:000A1E6A
seg003:000A1E6A loc_8A1E6A:                             ; CODE XREF: SpeedDensity+62
seg003:000A1E6A                 mov     r3, #0FFFFh
seg003:000A1E6E
seg003:000A1E6E loc_8A1E6E:                             ; CODE XREF: SpeedDensity+68
seg003:000A1E6E                 mov     map_v, r3
seg003:000A1E72                 exts    #81h, #1 ; 'ü'
seg003:000A1E76                 mov     r4, MAPGRAD
seg003:000A1E7A                 shl     r3, #5
seg003:000A1E7C                 mulu    r3, r4
seg003:000A1E7E                 mov     r5, MDL
seg003:000A1E82                 mov     r9, MDH
seg003:000A1E86                 jmpr    cc_N, loc_8A1E92
seg003:000A1E88                 shl     r9, #2
seg003:000A1E8A                 jmpr    cc_C, loc_8A1E92
seg003:000A1E8C                 shr     r5, #14
seg003:000A1E8E                 or      r9, r5
seg003:000A1E90                 jmpr    cc_UC, loc_8A1E96
seg003:000A1E92 ; ---------------------------------------------------------------------------
seg003:000A1E92
seg003:000A1E92 loc_8A1E92:                             ; CODE XREF: SpeedDensity+86
seg003:000A1E92                                         ; SpeedDensity+8A
seg003:000A1E92                 mov     r9, #0FFFFh
seg003:000A1E96
seg003:000A1E96 loc_8A1E96:                             ; CODE XREF: SpeedDensity+90
seg003:000A1E96                 exts    #81h, #1 ; 'ü'
seg003:000A1E9A                 mov     r3, MAPOFS
seg003:000A1E9E                 jmpr    cc_N, loc_8A1EAA
seg003:000A1EA0                 add     r3, r9
seg003:000A1EA2                 jmpr    cc_NC, loc_8A1EB0
seg003:000A1EA4                 mov     r3, #0FFFFh
seg003:000A1EA8                 jmpr    cc_UC, loc_8A1EB0
seg003:000A1EAA ; ---------------------------------------------------------------------------
seg003:000A1EAA
seg003:000A1EAA loc_8A1EAA:                             ; CODE XREF: SpeedDensity+9E
seg003:000A1EAA                 add     r3, r9
seg003:000A1EAC                 jmpr    cc_C, loc_8A1EB0
seg003:000A1EAE                 mov     r3, #0
seg003:000A1EB0
seg003:000A1EB0 loc_8A1EB0:                             ; CODE XREF: SpeedDensity+A2
seg003:000A1EB0                                         ; SpeedDensity+A8 ...
seg003:000A1EB0                 mov     map_uf, r3
seg003:000A1EB4                 mov     r12, #3E14h
seg003:000A1EB8                 mov     r13, #205h
seg003:000A1EBC                 mov     r14, nmot_w
seg003:000A1EC0                 calls   82h, Lookup1D
seg003:000A1EC4                 mov     r12, r4
seg003:000A1EC6                 mov     r13, r3
seg003:000A1EC8                 mov     r14, word_FA52
seg003:000A1ECC                 mov     r15, word_FA50
seg003:000A1ED0                 calls   0, f_lowpass
seg003:000A1ED4                 mov     word_FA50, r4
seg003:000A1ED8                 mov     word_FA52, r5
seg003:000A1EDC                 mov     map, r5
seg003:000A1EE0                 sub     r5, ps_w
seg003:000A1EE4                 jmpr    cc_C, loc_8A1EEE
seg003:000A1EE6                 jmpr    cc_NN, loc_8A1EF4
seg003:000A1EE8                 mov     r5, #7FFFh
seg003:000A1EEC                 jmpr    cc_UC, loc_8A1EF4
seg003:000A1EEE ; ---------------------------------------------------------------------------
seg003:000A1EEE
seg003:000A1EEE loc_8A1EEE:                             ; CODE XREF: SpeedDensity+E4
seg003:000A1EEE                 jmpr    cc_N, loc_8A1EF4
seg003:000A1EF0                 mov     r5, #8000h
seg003:000A1EF4
seg003:000A1EF4 loc_8A1EF4:                             ; CODE XREF: SpeedDensity+E6
seg003:000A1EF4                                         ; SpeedDensity+EC ...
seg003:000A1EF4                 mov     dpsfg_w, r5
seg003:000A1EF8                 mov     r5, map
seg003:000A1EFC                 cmp     r5, psmx_w
seg003:000A1F00                 jmpr    cc_ULE, loc_8A1F06
seg003:000A1F02                 mov     r5, psmx_w
seg003:000A1F06
seg003:000A1F06 loc_8A1F06:                             ; CODE XREF: SpeedDensity+100
seg003:000A1F06                 mov     ps_w, r5
seg003:000A1F0A                 jmps    86h, loc_860716
seg003:000A1F0E ; ---------------------------------------------------------------------------

I'm still waiting for parts for my car, so I couldn't test this file in a running engine, but everything works fine on the bench.

Logged
golfputtputt
Sr. Member
****

Karma: +6/-4
Offline Offline

Posts: 367


« Reply #28 on: July 12, 2021, 04:49:05 AM »

How’d this end up working out?


Had some drawbacks last weeks and couldn't spend much time on this.

Attached to this post is a revised file.

There is basically two functions:

This first one is a simple accumulator for the sensor voltage. It runs on the 1ms raster. Bosch original code was used to read the ADC, only changing the target RAM address.

Code:
seg003:000A1D00 umap_acu:                          ; CODE XREF: Raster_1ms+1C
seg003:000A1D34                 mov     r4, word_FA48
seg003:000A1D38                 mov     r5, word_FA4A
seg003:000A1D3C                 add     r4, umap
seg003:000A1D40                 addc    r5, ZEROS
seg003:000A1D44                 jmpr    cc_NC, loc_8A1D4C
seg003:000A1D46                 mov     r4, #0FFFFh
seg003:000A1D4A                 mov     r5, r4
seg003:000A1D4C
seg003:000A1D4C loc_8A1D4C:                             ; CODE XREF: uhfm_umap_acu+44
seg003:000A1D4C                 mov     word_FA48, r4
seg003:000A1D50                 mov     word_FA4A, r5
seg003:000A1D54                 sub     word_FA4C, ONES
seg003:000A1D58                 rets


The main function is above.

It will take the mean of all readings and convert it to pressure. Than it will filter the signal using a lowpass filter with a variable factor for compensating the variable sample rate. Don't know if this will work, but I implemented this in 5 minutes, so I think its worth trying.

After that dspfg_w is calculated and the map value is limited by psmx_w before being write to ps_w.

Function is called using the CALLS from bgsrm_bps in the sync raster. In the end, the function jumps to next instruction after ps_w calculation in bgsrm_bps.

Code:
seg003:000A1E00 SpeedDensity:                           ; CODE XREF: Raster_sync+50
seg003:000A1E00
seg003:000A1E00 ; FUNCTION CHUNK AT seg003:00060716 SIZE 00000088 BYTES
seg003:000A1E00
seg003:000A1E00                 push    PSW
seg003:000A1E02                 atomic  #4
seg003:000A1E04                 or      PSW, #0F000h
seg003:000A1E08                 and     PSW, word_E008
seg003:000A1E0C                 nop
seg003:000A1E0E                 sub     r3, r8
seg003:000A1E10                 mov     r4, word_FA48
seg003:000A1E14                 mov     r5, word_FA4A
seg003:000A1E18                 mov     word_FA54, r4
seg003:000A1E1C                 mov     word_FA56, r5
seg003:000A1E20                 mov     r2, word_FA4C
seg003:000A1E24                 mov     anzumap_w, r2
seg003:000A1E28                 mov     r4, ZEROS
seg003:000A1E2C                 mov     r5, #0
seg003:000A1E2E                 mov     word_FA48, r4
seg003:000A1E32                 mov     word_FA4A, r5
seg003:000A1E36                 mov     word_FA4C, ZEROS
seg003:000A1E3A                 pop     PSW
seg003:000A1E3C                 mov     r4, anzumap_w
seg003:000A1E40                 cmp     r4, ZEROS
seg003:000A1E44                 jmpr    cc_NZ, loc_8A1E4C
seg003:000A1E46                 mov     r5, #1
seg003:000A1E48                 mov     anzumap_w, r5
seg003:000A1E4C
seg003:000A1E4C loc_8A1E4C:                             ; CODE XREF: SpeedDensity+44
seg003:000A1E4C                 mov     r4, anzumap_w
seg003:000A1E50                 mov     r5, word_FA54
seg003:000A1E54                 mov     r2, word_FA56
seg003:000A1E58                 mov     MDH, r2
seg003:000A1E5C                 mov     MDL, r5
seg003:000A1E60                 divlu   r4
seg003:000A1E62                 jmpr    cc_V, loc_8A1E6A
seg003:000A1E64                 mov     r3, MDL
seg003:000A1E68                 jmpr    cc_UC, loc_8A1E6E
seg003:000A1E6A ; ---------------------------------------------------------------------------
seg003:000A1E6A
seg003:000A1E6A loc_8A1E6A:                             ; CODE XREF: SpeedDensity+62
seg003:000A1E6A                 mov     r3, #0FFFFh
seg003:000A1E6E
seg003:000A1E6E loc_8A1E6E:                             ; CODE XREF: SpeedDensity+68
seg003:000A1E6E                 mov     map_v, r3
seg003:000A1E72                 exts    #81h, #1 ; 'ü'
seg003:000A1E76                 mov     r4, MAPGRAD
seg003:000A1E7A                 shl     r3, #5
seg003:000A1E7C                 mulu    r3, r4
seg003:000A1E7E                 mov     r5, MDL
seg003:000A1E82                 mov     r9, MDH
seg003:000A1E86                 jmpr    cc_N, loc_8A1E92
seg003:000A1E88                 shl     r9, #2
seg003:000A1E8A                 jmpr    cc_C, loc_8A1E92
seg003:000A1E8C                 shr     r5, #14
seg003:000A1E8E                 or      r9, r5
seg003:000A1E90                 jmpr    cc_UC, loc_8A1E96
seg003:000A1E92 ; ---------------------------------------------------------------------------
seg003:000A1E92
seg003:000A1E92 loc_8A1E92:                             ; CODE XREF: SpeedDensity+86
seg003:000A1E92                                         ; SpeedDensity+8A
seg003:000A1E92                 mov     r9, #0FFFFh
seg003:000A1E96
seg003:000A1E96 loc_8A1E96:                             ; CODE XREF: SpeedDensity+90
seg003:000A1E96                 exts    #81h, #1 ; 'ü'
seg003:000A1E9A                 mov     r3, MAPOFS
seg003:000A1E9E                 jmpr    cc_N, loc_8A1EAA
seg003:000A1EA0                 add     r3, r9
seg003:000A1EA2                 jmpr    cc_NC, loc_8A1EB0
seg003:000A1EA4                 mov     r3, #0FFFFh
seg003:000A1EA8                 jmpr    cc_UC, loc_8A1EB0
seg003:000A1EAA ; ---------------------------------------------------------------------------
seg003:000A1EAA
seg003:000A1EAA loc_8A1EAA:                             ; CODE XREF: SpeedDensity+9E
seg003:000A1EAA                 add     r3, r9
seg003:000A1EAC                 jmpr    cc_C, loc_8A1EB0
seg003:000A1EAE                 mov     r3, #0
seg003:000A1EB0
seg003:000A1EB0 loc_8A1EB0:                             ; CODE XREF: SpeedDensity+A2
seg003:000A1EB0                                         ; SpeedDensity+A8 ...
seg003:000A1EB0                 mov     map_uf, r3
seg003:000A1EB4                 mov     r12, #3E14h
seg003:000A1EB8                 mov     r13, #205h
seg003:000A1EBC                 mov     r14, nmot_w
seg003:000A1EC0                 calls   82h, Lookup1D
seg003:000A1EC4                 mov     r12, r4
seg003:000A1EC6                 mov     r13, r3
seg003:000A1EC8                 mov     r14, word_FA52
seg003:000A1ECC                 mov     r15, word_FA50
seg003:000A1ED0                 calls   0, f_lowpass
seg003:000A1ED4                 mov     word_FA50, r4
seg003:000A1ED8                 mov     word_FA52, r5
seg003:000A1EDC                 mov     map, r5
seg003:000A1EE0                 sub     r5, ps_w
seg003:000A1EE4                 jmpr    cc_C, loc_8A1EEE
seg003:000A1EE6                 jmpr    cc_NN, loc_8A1EF4
seg003:000A1EE8                 mov     r5, #7FFFh
seg003:000A1EEC                 jmpr    cc_UC, loc_8A1EF4
seg003:000A1EEE ; ---------------------------------------------------------------------------
seg003:000A1EEE
seg003:000A1EEE loc_8A1EEE:                             ; CODE XREF: SpeedDensity+E4
seg003:000A1EEE                 jmpr    cc_N, loc_8A1EF4
seg003:000A1EF0                 mov     r5, #8000h
seg003:000A1EF4
seg003:000A1EF4 loc_8A1EF4:                             ; CODE XREF: SpeedDensity+E6
seg003:000A1EF4                                         ; SpeedDensity+EC ...
seg003:000A1EF4                 mov     dpsfg_w, r5
seg003:000A1EF8                 mov     r5, map
seg003:000A1EFC                 cmp     r5, psmx_w
seg003:000A1F00                 jmpr    cc_ULE, loc_8A1F06
seg003:000A1F02                 mov     r5, psmx_w
seg003:000A1F06
seg003:000A1F06 loc_8A1F06:                             ; CODE XREF: SpeedDensity+100
seg003:000A1F06                 mov     ps_w, r5
seg003:000A1F0A                 jmps    86h, loc_860716
seg003:000A1F0E ; ---------------------------------------------------------------------------

I'm still waiting for parts for my car, so I couldn't test this file in a running engine, but everything works fine on the bench.


Logged
Blazius
Hero Member
*****

Karma: +89/-40
Offline Offline

Posts: 1282



« Reply #29 on: July 27, 2021, 02:19:56 PM »

So I have been looking at this recently and noticed a few things with the latest bin posted. If you crossflash this file it wont work out from the box. Some update or whatever would be nice but OP does not seem to check / reply on nefmoto for a while so anyway...

The ADC setup/ variable enable has been changed ofcourse, replaced uushk_w - rear O2 ADC voltage with a custom name for the MAP ADC voltage, set in IRAM ofcourse.

A1D00 is again an accumulator for the voltage, works exactly like maf/ etc voltage ones, except with new free target ram.

Now the main function... This references some maps that are simply not there in the bin, I am not sure if this was intentional or not but yeah.

There is both a gradient and an offset, just like the boost sensor, I assume these should be setup exactly the boost sensor ones, from the looks of it. 17E10 and 17E12.

After, there is 1D lookup with nmot. Map referenced at 17E14 also missing. Now how should this map look ? Bosch function ofcourse uses a 2d map nmot and psspvdkd_w its also maxed out on every value so yeah.

So how should the filtering map look like?
« Last Edit: July 27, 2021, 04:00:49 PM by Blazius » Logged
Pages: 1 [2] 3 4 ... 7
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.031 seconds with 17 queries. (Pretty URLs adds 0s, 0q)