2-byte Injector Pulse Width
#1
2-byte Injector Pulse Width
I have no idea if this has already been found, but today I found how to log the IPW in 2-byte resolution. I always knew there had to be a way to do this for fine tuning and I was happy to find it.
I use EvoScan, and I found it has not been setup correctly to view this. The MUT table already has been set from the factory to log 2-byte IPW, but it has not been implemented. Default it is logged from MUT 29, but MUT 2A already has the other byte. So all that needs to be done is to set up the second RequestID. The calculation is just to divide the result by 1000 to convert to ms.
Or you can simply add this line to your Data.xml
<DataListItem DataLog="N" Color="#00ab39" Display="2-byte Injector Pulse Width" LogReference="InjPulseWidth" RequestID="29" RequestID2="2A" Eval="x/1000" Unit="ms" MetricEval="" MetricUnit="" ResponseBytes="1" GaugeMin="0" GaugeMax="66" ChartMin="0" ChartMax="66" ScalingFactor="10" Notes="" Priority="1" Visible="False" />
See how you all go with this.
I use EvoScan, and I found it has not been setup correctly to view this. The MUT table already has been set from the factory to log 2-byte IPW, but it has not been implemented. Default it is logged from MUT 29, but MUT 2A already has the other byte. So all that needs to be done is to set up the second RequestID. The calculation is just to divide the result by 1000 to convert to ms.
Or you can simply add this line to your Data.xml
<DataListItem DataLog="N" Color="#00ab39" Display="2-byte Injector Pulse Width" LogReference="InjPulseWidth" RequestID="29" RequestID2="2A" Eval="x/1000" Unit="ms" MetricEval="" MetricUnit="" ResponseBytes="1" GaugeMin="0" GaugeMax="66" ChartMin="0" ChartMax="66" ScalingFactor="10" Notes="" Priority="1" Visible="False" />
See how you all go with this.
#6
I was looking for something like this before though and I couldn't work it out, I had the impression the variable we were logging already contained the least significant bits, but the engine didn't behave as though it had such poor resolution. Maybe I was missing the obvious. Mattjin is an ace for finding things like this
Trending Topics
#8
Thanks guys, I might need to create a Mattjin-Mod just to keep up with you two. haha!!
When you have a look at the MUT table it is actually quite obvious isnt it. Makes me wonder how we all missed this for so long.
The conversion calculation is something I am not 100% certain about. I took a guess at dividing by 1000 when I saw the first test of it, but maybe one of you guys might find the true calculation. It looks correct though from what I saw the afternoon, as if the raw output is in microseconds (us).
When you have a look at the MUT table it is actually quite obvious isnt it. Makes me wonder how we all missed this for so long.
The conversion calculation is something I am not 100% certain about. I took a guess at dividing by 1000 when I saw the first test of it, but maybe one of you guys might find the true calculation. It looks correct though from what I saw the afternoon, as if the raw output is in microseconds (us).
#9
Presumably we could take the scaling we already use if that ties in with MUT and divide it by 256 to make it 2 byte?
Some timing things can be implied by a 500kHz clock which controls the timers for injector/ignition. Will see what I can tie together.
Some timing things can be implied by a 500kHz clock which controls the timers for injector/ignition. Will see what I can tie together.
#12
That actually makes sense, so the original /1000 seems correct.
Another question I have.... has anyone checked what exactly MUT 2B and 2C log? They are also sequential and could be another 2-byte logging item.
Another question I have.... has anyone checked what exactly MUT 2B and 2C log? They are also sequential and could be another 2-byte logging item.
Last edited by Mattjin; Apr 14, 2009 at 05:34 AM.
#13
They are. There are two IPW calcs, MUT29+A=MUTC5*8, MUT2B+C=MUTC6*8
"MUT"C5 and "MUT"C6 are not MUT loggable as they are above BF, which means a command.
So it looks like the upper 5 bits of MUT2A and MUT2C are useful.
Don't know how we missed this before! Thanks Mattjin.
"MUT"C5 and "MUT"C6 are not MUT loggable as they are above BF, which means a command.
So it looks like the upper 5 bits of MUT2A and MUT2C are useful.
Don't know how we missed this before! Thanks Mattjin.
#14
Here is another one.... what exactly is MUT 21 logging, besides being used as the RPM reference for Injector Duty? It is an RPM signal but I am guessing it is an output RPM to the injectors, and not a crank signal input RPM. The address for MUT 21 shows up quite often in the code and I want to be sure I am looking at this correctly.
#15
RPMSMALL = RPM reference for nearly everything, MUT21 is the least sig byte of this. Calculated from interval between CAS timer events, called from routine that also links to all the ADC stuff.
ROM:00011D72 RPMCALC: ; CODE XREF: RPM_INSIDE:loc_11D02p
ROM:00011D72 sts.l pr, @-r15
ROM:00011D74 mov.l r14, @-r15
ROM:00011D76 mov r15, r14
ROM:00011D78 mov.l r1, @-r15
ROM:00011D7A mov.l r2, @-r15
ROM:00011D7C mov.l @(h'F4,pc), r10 ; [00011E74] = int_disable
ROM:00011D7E jsr @r10 ; int_disable
ROM:00011D80 nop
ROM:00011D82 mov.l @(h'F4,pc), r1 ; [00011E78] = RPM_REV
ROM:00011D84 mov.w @r1, r1
ROM:00011D86 extu.w r1, r1
ROM:00011D88 mov.l @(h'F0,pc), r2 ; [00011E7C] = RPM_REV1
ROM:00011D8A mov.w @r2, r2
ROM:00011D8C extu.w r2, r2
ROM:00011D8E mov.l @(h'F0,pc), r10 ; [00011E80] = int_enable
ROM:00011D90 jsr @r10 ; int_enable
ROM:00011D92 nop
ROM:00011D94 mov r2, r5
ROM:00011D96 mov.l @(h'EC,pc), r4 ; [00011E84] = h'1D4C00
ROM:00011D98 mov.l @(h'EC,pc), r10 ; [00011E88] = sub_9F2
ROM:00011D9A jsr @r10 ; sub_9F2
ROM:00011D9C nop
ROM:00011D9E mov.l @(h'284,pc), r11 ; [00012024] = RPM111
ROM:00011DA0 mov.w r0, @r11
ROM:00011DA2 mov.l @(h'E0,pc), r4 ; [00011E84] = h'1D4C00
ROM:00011DA4 mov r1, r5
ROM:00011DA6 mov.l @(h'E0,pc), r10 ; [00011E88] = sub_9F2
ROM:00011DA8 jsr @r10 ; sub_9F2
ROM:00011DAA nop
ROM:00011DAC mov.l @(h'278,pc), r11 ; [00012028] = RPM_ARG
ROM:00011DAE mov.w r0, @r11
ROM:00011DB0 mov.l @(h'274,pc), r10 ; [00012028] = RPM_ARG
ROM:00011DB2 mov.w @r10, r10
ROM:00011DB4 extu.w r10, r10
ROM:00011DB6 add #1, r10
ROM:00011DB8 shlr r10
ROM:00011DBA mov r10, r4
ROM:00011DBC mov.l @(h'90,pc), r10 ; [00011E50] = r4tor0
ROM:00011DBE jsr @r10 ; r4tor0
ROM:00011DC0 nop
ROM:00011DC2 mov.l @(h'C8,pc), r11 ; [00011E8C] = RPMBIGBIG
ROM:00011DC4 mov.w r0, @r11
ROM:00011DC6 mov.l @(h'260,pc), r10 ; [00012028] = RPM_ARG
ROM:00011DC8 mov.w @r10, r10
ROM:00011DCA extu.w r10, r10
ROM:00011DCC add #4, r10
ROM:00011DCE shlr2 r10
ROM:00011DD0 shlr r10
ROM:00011DD2 mov r10, r4
ROM:00011DD4 mov.l @(h'78,pc), r10 ; [00011E50] = r4tor0
ROM:00011DD6 jsr @r10 ; r4tor0
ROM:00011DD8 nop
ROM:00011DDA mov.l @(h'60,pc), r11 ; [00011E3C] = RPMSMALL
ROM:00011DDC mov.w r0, @r11
ROM:00011DDE mov.l @(h'B0,pc), r4 ; [00011E90] = h'EA6000
ROM:00011DE0 mov r1, r5
ROM:00011DE2 mov.l @(h'A4,pc), r10 ; [00011E88] = sub_9F2
ROM:00011DE4 jsr @r10 ; sub_9F2
ROM:00011DE6 nop
ROM:00011DE8 mov.l @(h'A8,pc), r11 ; [00011E94] = RPM_OTHER
ROM:00011DEA mov.w r0, @r11
ROM:00011DEC mov.l @r15+, r2
ROM:00011DEE mov.l @r15+, r1
ROM:00011DF0 mov.l @r15+, r14
ROM:00011DF2 lds.l @r15+, pr
ROM:00011DF4 rts
ROM:00011DF6 nop
ROM:00011DF6 ; End of function RPMCALC
ROM:00011D72 RPMCALC: ; CODE XREF: RPM_INSIDE:loc_11D02p
ROM:00011D72 sts.l pr, @-r15
ROM:00011D74 mov.l r14, @-r15
ROM:00011D76 mov r15, r14
ROM:00011D78 mov.l r1, @-r15
ROM:00011D7A mov.l r2, @-r15
ROM:00011D7C mov.l @(h'F4,pc), r10 ; [00011E74] = int_disable
ROM:00011D7E jsr @r10 ; int_disable
ROM:00011D80 nop
ROM:00011D82 mov.l @(h'F4,pc), r1 ; [00011E78] = RPM_REV
ROM:00011D84 mov.w @r1, r1
ROM:00011D86 extu.w r1, r1
ROM:00011D88 mov.l @(h'F0,pc), r2 ; [00011E7C] = RPM_REV1
ROM:00011D8A mov.w @r2, r2
ROM:00011D8C extu.w r2, r2
ROM:00011D8E mov.l @(h'F0,pc), r10 ; [00011E80] = int_enable
ROM:00011D90 jsr @r10 ; int_enable
ROM:00011D92 nop
ROM:00011D94 mov r2, r5
ROM:00011D96 mov.l @(h'EC,pc), r4 ; [00011E84] = h'1D4C00
ROM:00011D98 mov.l @(h'EC,pc), r10 ; [00011E88] = sub_9F2
ROM:00011D9A jsr @r10 ; sub_9F2
ROM:00011D9C nop
ROM:00011D9E mov.l @(h'284,pc), r11 ; [00012024] = RPM111
ROM:00011DA0 mov.w r0, @r11
ROM:00011DA2 mov.l @(h'E0,pc), r4 ; [00011E84] = h'1D4C00
ROM:00011DA4 mov r1, r5
ROM:00011DA6 mov.l @(h'E0,pc), r10 ; [00011E88] = sub_9F2
ROM:00011DA8 jsr @r10 ; sub_9F2
ROM:00011DAA nop
ROM:00011DAC mov.l @(h'278,pc), r11 ; [00012028] = RPM_ARG
ROM:00011DAE mov.w r0, @r11
ROM:00011DB0 mov.l @(h'274,pc), r10 ; [00012028] = RPM_ARG
ROM:00011DB2 mov.w @r10, r10
ROM:00011DB4 extu.w r10, r10
ROM:00011DB6 add #1, r10
ROM:00011DB8 shlr r10
ROM:00011DBA mov r10, r4
ROM:00011DBC mov.l @(h'90,pc), r10 ; [00011E50] = r4tor0
ROM:00011DBE jsr @r10 ; r4tor0
ROM:00011DC0 nop
ROM:00011DC2 mov.l @(h'C8,pc), r11 ; [00011E8C] = RPMBIGBIG
ROM:00011DC4 mov.w r0, @r11
ROM:00011DC6 mov.l @(h'260,pc), r10 ; [00012028] = RPM_ARG
ROM:00011DC8 mov.w @r10, r10
ROM:00011DCA extu.w r10, r10
ROM:00011DCC add #4, r10
ROM:00011DCE shlr2 r10
ROM:00011DD0 shlr r10
ROM:00011DD2 mov r10, r4
ROM:00011DD4 mov.l @(h'78,pc), r10 ; [00011E50] = r4tor0
ROM:00011DD6 jsr @r10 ; r4tor0
ROM:00011DD8 nop
ROM:00011DDA mov.l @(h'60,pc), r11 ; [00011E3C] = RPMSMALL
ROM:00011DDC mov.w r0, @r11
ROM:00011DDE mov.l @(h'B0,pc), r4 ; [00011E90] = h'EA6000
ROM:00011DE0 mov r1, r5
ROM:00011DE2 mov.l @(h'A4,pc), r10 ; [00011E88] = sub_9F2
ROM:00011DE4 jsr @r10 ; sub_9F2
ROM:00011DE6 nop
ROM:00011DE8 mov.l @(h'A8,pc), r11 ; [00011E94] = RPM_OTHER
ROM:00011DEA mov.w r0, @r11
ROM:00011DEC mov.l @r15+, r2
ROM:00011DEE mov.l @r15+, r1
ROM:00011DF0 mov.l @r15+, r14
ROM:00011DF2 lds.l @r15+, pr
ROM:00011DF4 rts
ROM:00011DF6 nop
ROM:00011DF6 ; End of function RPMCALC