Notices
ECU Flash

2-byte Injector Pulse Width

Thread Tools
 
Search this Thread
 
Old Apr 14, 2009, 03:19 AM
  #1  
Evolved Member
Thread Starter
 
Mattjin's Avatar
 
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 604
Likes: 0
Received 0 Likes on 0 Posts
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.
Old Apr 14, 2009, 03:32 AM
  #2  
EvoM Guru
iTrader: (6)
 
tephra's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Posts: 9,486
Received 66 Likes on 42 Posts
good on ya - so many things I keep forgetting about in my travels

can you post up a log? so we can see?
Old Apr 14, 2009, 03:49 AM
  #3  
Evolved Member
Thread Starter
 
Mattjin's Avatar
 
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 604
Likes: 0
Received 0 Likes on 0 Posts
I dont have any logs here at home, but I should be able to do something tomorrow if I get some time.

A quick thing I forgot, delete the old IPW when you add this one.
Old Apr 14, 2009, 03:51 AM
  #4  
Evolved Member
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
Nice one. I was struggling to see where the extra IPW resolution would be, this will help me look further at the routines.
Old Apr 14, 2009, 03:55 AM
  #5  
EvoM Guru
iTrader: (6)
 
tephra's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Posts: 9,486
Received 66 Likes on 42 Posts
2a is just the low byte for 29 (the high byte) so its still the same variable
Old Apr 14, 2009, 03:59 AM
  #6  
Evolved Member
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
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
Old Apr 14, 2009, 04:00 AM
  #7  
EvoM Guru
iTrader: (6)
 
tephra's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Posts: 9,486
Received 66 Likes on 42 Posts
sure is...
Old Apr 14, 2009, 04:08 AM
  #8  
Evolved Member
Thread Starter
 
Mattjin's Avatar
 
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 604
Likes: 0
Received 0 Likes on 0 Posts
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).
Old Apr 14, 2009, 04:15 AM
  #9  
Evolved Member
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
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.
Old Apr 14, 2009, 04:19 AM
  #10  
EvoM Guru
iTrader: (6)
 
tephra's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Posts: 9,486
Received 66 Likes on 42 Posts
Yeah I think /1000 is correct...

normally its * .256 or 256/1000 so the 256 is to get it into 2byte...
Old Apr 14, 2009, 04:23 AM
  #11  
Evolved Member
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
Sounds good, ties in with the clock being a decimal frequency (eg 500 rather than 512kHz).
Old Apr 14, 2009, 04:24 AM
  #12  
Evolved Member
Thread Starter
 
Mattjin's Avatar
 
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 604
Likes: 0
Received 0 Likes on 0 Posts
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.

Last edited by Mattjin; Apr 14, 2009 at 04:34 AM.
Old Apr 14, 2009, 10:24 AM
  #13  
Evolved Member
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
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.
Old Apr 14, 2009, 03:28 PM
  #14  
Evolved Member
Thread Starter
 
Mattjin's Avatar
 
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 604
Likes: 0
Received 0 Likes on 0 Posts
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.
Old Apr 14, 2009, 03:41 PM
  #15  
Evolved Member
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
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


Quick Reply: 2-byte Injector Pulse Width



All times are GMT -7. The time now is 03:20 PM.