<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://m232.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PRJ</id>
	<title>M232 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://m232.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PRJ"/>
	<link rel="alternate" type="text/html" href="https://m232.org/index.php/Special:Contributions/PRJ"/>
	<updated>2026-04-18T13:04:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=105</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=105"/>
		<updated>2022-12-08T08:28:18Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Community */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;There are only two terms:&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time if you are providing a service to others, but not for the firmware enhancements. Continuing to use this website and viewing the information contained marks your acceptance of the terms.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/m232-org S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Fast diagnostics enable/disable]]&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Knock control]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Speed_Density&amp;diff=104</id>
		<title>Speed Density</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Speed_Density&amp;diff=104"/>
		<updated>2018-02-22T14:05:03Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Load filter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Algorithm ==&lt;br /&gt;
The MAP sensor is sampled crank-synchronously at fixed angles, five times per cycle, at 10bit precision, making the resolution 0.005V or 0.4kPa with a 400kPa sensor&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LOAD = FILTER((VE(MAP,RPM)+VE_ADDEND)*VE_MULT*IATCORR*MAP)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VE Table ==&lt;br /&gt;
[[File:ve_700hp.png|thumb|VE table at 700hp]]&lt;br /&gt;
This table shows how much air is in the cylinder at a given pressure. A few tricks have been done to have very high resolution in 8 bit mode:&lt;br /&gt;
* The table values are shifted by &amp;quot;VE Addend&amp;quot;&lt;br /&gt;
* The table values are multiplied by a factor named &amp;quot;VE multiplier&amp;quot;&lt;br /&gt;
* The VE multiplier is calculated using an exponent and a mantissa.&lt;br /&gt;
Tuning this table goes as follows:&lt;br /&gt;
* Make sure your injectors and injector deadtimes are set at least semi-correctly, or this table will look all sorts of messed up.&lt;br /&gt;
* Log REQ_AFR and compare it to actual AFR. Modify this table so that they match.&lt;br /&gt;
* As a sanity check, consider that at idle with consumers switched off, you should have roughly 18-21 LOAD if you are not running wild cams. Most setups will never need to alter anything but the VE table itself.&lt;br /&gt;
* If you run out of room at the low end (values at 0 and still too rich), but you still have room on top (for example max value is 200), subtract a number from VE Addend, and add it to the entire table. Now the result is the same as before, but you have more room to tune. Do the same if you run out of room at the top end, but have room at the bottom end.&lt;br /&gt;
* If you run out of dynamic range, meaning both the top end and bottom end - you can multiply up the VE multiplier and divide the VE addend and the entire table by the number you multiplied the multiplier by. Also works into the opposite direction if you find that you have way too much range and not enough precision.&lt;br /&gt;
&lt;br /&gt;
== IAT correction ==&lt;br /&gt;
This is a multiplicative factor, that is needed to correct for the density of air due to the ideal gas law, the axis is IAT.&amp;lt;br/&amp;gt;&lt;br /&gt;
It's general shape is governed by &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;PV = nRT&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;, but some of it is empirical as well, due to the location of the sensor and heatsoak.&lt;br /&gt;
&lt;br /&gt;
== Load filter ==&lt;br /&gt;
This filter corrects for jitter and limits LOAD rate of change. Axes are RPMxLOAD. 255 means straight-through, 0 means LOAD can not change. The filter limits LOAD delta to X/255*delta.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an exception - if the load jump is bigger than the constant for the maximum positive delta, then to prevent a lean condition, the filter is disabled and the LOAD is directly set to the new computed LOAD.&amp;lt;br/&amp;gt;&lt;br /&gt;
You should usually not have to modify this, but if you do, keep in mind that because the LOAD calculation is crank-synchronous (five times per two rotations), then at 6000 rpm the filter should be set to half of 3000 rpm for the same effect.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=103</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=103"/>
		<updated>2018-01-09T13:37:54Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;There are only two terms:&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time if you are providing a service to others, but not for the firmware enhancements. Continuing to use this website and viewing the information contained marks your acceptance of the terms.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/m232-org S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Should you require personal consultation from [[User:PRJ|me]] - it is arrangeable, but will be charged at an hourly rate.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Fast diagnostics enable/disable]]&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Knock control]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Fast_diagnostics_enable/disable&amp;diff=102</id>
		<title>Fast diagnostics enable/disable</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Fast_diagnostics_enable/disable&amp;diff=102"/>
		<updated>2017-12-18T10:08:49Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;=== Enabling/disabling fast diag === By default fast diag is always enabled and streaming data, if you want to disable it (for example you want to use VCDS for pulling codes o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Enabling/disabling fast diag ===&lt;br /&gt;
By default fast diag is always enabled and streaming data, if you want to disable it (for example you want to use VCDS for pulling codes or diagnose another module), hold the throttle WOT while turning the ignition on. After that until you turn the ignition off the fast diag will be disabled and normal communication protocol will be active.&lt;br /&gt;
&lt;br /&gt;
=== Fault codes ===&lt;br /&gt;
There will be 2 faults logged - Engine Speed signal, which is widely known as being normal when the engine is off, and also Throttle switch. This happens on a stock ecu also, if you turn the ignition on with the pedal to the floor.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=101</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=101"/>
		<updated>2017-12-18T10:07:03Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;There are only two terms:&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time if you are providing a service to others, but not for the firmware enhancements. Continuing to use this website and viewing the information contained marks your acceptance of the terms.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/prj-tech-zone S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Should you require personal consultation from [[User:PRJ|me]] - it is arrangeable, but will be charged at an hourly rate.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Fast diagnostics enable/disable]]&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Knock control]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Hardware_limitations&amp;diff=100</id>
		<title>Hardware limitations</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Hardware_limitations&amp;diff=100"/>
		<updated>2017-12-16T15:17:55Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== RPM limit ===&lt;br /&gt;
The fast diag puts quite a bit of strain on the boost/knock processor, which is already very strained.&amp;lt;br/&amp;gt;&lt;br /&gt;
It is possible to modify the code, but the current implementation does not run fast enough to deliver fast logging data past 8000 rpm, even at greatly reduced sample rates. If you push it, the ECU will hard reset.&amp;lt;br/&amp;gt;&lt;br /&gt;
The reason is that the fast logging code runs off of the RX/TX interrupt and the RX/TX interrupt calls are not only expensive, but they get higher priority than many other calculations, thus the ECU does not have data ready at some point for the next cycle. To fix it, the byte send code needs to be injected in a few places elsewhere. This is already done in the fuel/ign processor.&amp;lt;br/&amp;gt;&lt;br /&gt;
With fast logging disabled the meaningful limitation on the engine revs is about 9000 rpm, after that you run into dwell issues.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dwell time ===&lt;br /&gt;
Due to the solid-state distributor design, the fuel/ign processor outputs a pulse just like a normal distributor based system.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means that it needs to output 5 spark events every cycle, because as the logic output goes high, the coil starts charging, and as it goes low the spark is fired.&amp;lt;br/&amp;gt;&lt;br /&gt;
This sets some limits on the theoretical maximum dwell time:&amp;lt;br/&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;b&amp;gt;RPM (1/min)&amp;lt;/b&amp;gt;&lt;br /&gt;
|&amp;lt;b&amp;gt;Dwell time (ms)&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1000&lt;br /&gt;
|24.00&lt;br /&gt;
|-&lt;br /&gt;
|2000&lt;br /&gt;
|12.00&lt;br /&gt;
|-&lt;br /&gt;
|3000&lt;br /&gt;
|8.00&lt;br /&gt;
|-&lt;br /&gt;
|4000&lt;br /&gt;
|6.00&lt;br /&gt;
|-&lt;br /&gt;
|5000&lt;br /&gt;
|4.80&lt;br /&gt;
|-&lt;br /&gt;
|6000&lt;br /&gt;
|4.00&lt;br /&gt;
|-&lt;br /&gt;
|7000&lt;br /&gt;
|3.43&lt;br /&gt;
|-&lt;br /&gt;
|8000&lt;br /&gt;
|3.00&lt;br /&gt;
|-&lt;br /&gt;
|8500&lt;br /&gt;
|2.82&lt;br /&gt;
|}&lt;br /&gt;
Realistically the actual maximums are a little lower. For high output applications it is recommend to use the VAG TFSi coil packs.&amp;lt;br&amp;gt;&lt;br /&gt;
They are fully charged between 2.5 and 3ms, they are cheap and they give a very strong spark - enough for over 700 hp on Ethanol.&lt;br /&gt;
&lt;br /&gt;
=== ECU Speed ===&lt;br /&gt;
The boost/knock control chip runs crank-synchronous in real time.&amp;lt;br/&amp;gt;&lt;br /&gt;
The fuel/ign control chip injection time and ignition output runs crank-synchronous in real time.&amp;lt;br/&amp;gt;&lt;br /&gt;
The fuel/ign control chip main loop (map lookup) runs at 100hz or best effort.&amp;lt;br/&amp;gt;&lt;br /&gt;
It can keep updating 100 times per second up to about 5000 RPM, after which the final injection/ignition output calculations start to take more and more processor time and the main loop gives way.&amp;lt;br/&amp;gt;&lt;br /&gt;
At 8500 RPM it still runs at over 30hz. Plenty fast enough for the global low-impact calculations.&lt;br /&gt;
&lt;br /&gt;
=== ECU precision ===&lt;br /&gt;
Ignition precision target is 0.75 degrees. Knock retard precision is 0.5 degrees.&amp;lt;br/&amp;gt;&lt;br /&gt;
Injection precision in the fuel/ign chip is near infinite, because it is represented using an exponent and mantissa. How precise it is in the sequential injection driver is unknown.&amp;lt;br/&amp;gt;&lt;br /&gt;
RPM precision is 1 trigger tooth.&amp;lt;br/&amp;gt;&lt;br /&gt;
Boost precision is 8 bit, meaning for a 400kpa sensor, it is roughly 1.6kpa.&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=99</id>
		<title>Requirements and modifications for running prjmod</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=99"/>
		<updated>2017-12-15T20:14:56Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Follow the instructions with great care.&amp;lt;br/&amp;gt;&lt;br /&gt;
Everything except NLS and Map switching is &amp;lt;b&amp;gt;absolutely mandatory&amp;lt;/b&amp;gt;, you can not do any tuning before the steps are completed.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==Supported ECU part numbers==&lt;br /&gt;
Only the following control units are supported. They are all identically suited for running prjmod firmware. Make sure you have one (for obvious reasons).&amp;lt;br/&amp;gt;&lt;br /&gt;
* 4A0907551AA&lt;br /&gt;
* 4A0907551B&lt;br /&gt;
* 4A0907551C&lt;br /&gt;
* 4A0907551D&lt;br /&gt;
* 4A0907551E&lt;br /&gt;
* 4A0907551F&lt;br /&gt;
* 4A0997551X&lt;br /&gt;
* 4A0997551AX&lt;br /&gt;
* 4A0997551BX&lt;br /&gt;
* 4A0997551CX&lt;br /&gt;
* 4A0997551DX&lt;br /&gt;
* 4A0997551EX&lt;br /&gt;
* 895907551A&lt;br /&gt;
* 895907551B&lt;br /&gt;
* 895997551X&lt;br /&gt;
* 895997551AX&lt;br /&gt;
* 8A0907551B&lt;br /&gt;
* 8A0907551C&lt;br /&gt;
* 8A0997551X&lt;br /&gt;
* 8A0997551BX&lt;br /&gt;
&lt;br /&gt;
==OBD Interface==&lt;br /&gt;
Any KKL cable will work, also the non-current generation Ross-Tech HEX+CAN cables with the USB pass-through driver installed. I recommend setting the COM-port latency to 1 in device settings.&lt;br /&gt;
&lt;br /&gt;
==MAP sensor==&lt;br /&gt;
You need the MPXH6400A MAP sensor. It is possible to use any sensor, but unless you need to run more than 2.8 bar boost, save yourself the trouble, and run the MPXH6400A, as the provided basefiles are calibrated for it.&amp;lt;br/&amp;gt;&lt;br /&gt;
The following image shows the sensors on top of each other, incl. the pin numbering:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensors.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The pinouts are not 1:1, here is a table as to how they should be connected:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;b&amp;gt;Board&amp;lt;/b&amp;gt;&lt;br /&gt;
|&amp;lt;b&amp;gt;MPXH6400A&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
|}&lt;br /&gt;
* Desolder and cut the old sensor off the rubber hose with an exacto knife, make sure to cut right past the nozzle, or you will need a new hose.&lt;br /&gt;
* Re-use the clip. &lt;br /&gt;
* Use a cable tie to secure the sensor in place. &lt;br /&gt;
* Make sure that the edge of the upper half of the MAP sensor package is &amp;quot;behind&amp;quot; the ledge of the white bracket, so the sensor can not be pushed out by pressure. Failing that use &amp;lt;b&amp;gt;heat resistant&amp;lt;/b&amp;gt; glue.&amp;lt;br/&amp;gt;&lt;br /&gt;
Example of finished install:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensor_installed.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Speed Density modifications==&lt;br /&gt;
Remove 0 ohm resistor R660.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:R660.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via under &amp;quot;S900&amp;quot; chip. The via is directly under the writing &amp;quot;C660&amp;quot;. Attach one end of wire through hole, the wire will go from one PCB to the other.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire1.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via directly to the right of D232 (towards D235). Attach second end of wire through hole.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire2.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
As the fuel/ign chip does not have a MAP connection, we are simply routing the MAP signal into a free analog input.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Immobilizer bypass==&lt;br /&gt;
On cars fitted with an immobilizer the K-line runs to the white immobox on the steering column (behind the dash), and then from the immobox to the diagnostic socket.&amp;lt;br/&amp;gt;&lt;br /&gt;
The immo box will block any communications it does not consider &amp;quot;kosher&amp;quot; by pulling the whole K-line LOW on the ECU side. It certainly does not want you to run comms at 187500 baud, so you will need to cut out the middle man if you want to use fast logging.&amp;lt;br/&amp;gt;&lt;br /&gt;
To get rid of it:&lt;br /&gt;
* Remove the immobox connector&lt;br /&gt;
* Find two green wires in the connector.&lt;br /&gt;
* Check continuity.&lt;br /&gt;
** One of the green wires will have continuity to the K-line in the 2x2 connector under the hood.&lt;br /&gt;
** The other of the green wires will have continuity to pin 55 on the ECU.&lt;br /&gt;
* Once you have found the two K-line &amp;quot;ends&amp;quot; cut them at the connector and connect them together, you can also discard the immobox.&lt;br /&gt;
* If you want a proper immobilizer, wire in a reed switch somewhere or install an alarm with immobilization function. If anyone wants to steal one of these cars they can simply swap the ECU for a non-immobilized one in 30 seconds and drive off. The prjmod firmware has immo disabled.&lt;br /&gt;
I will be grateful if anyone can provide some pictures of this process.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Toolchain_setup&amp;diff=98</id>
		<title>Toolchain setup</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Toolchain_setup&amp;diff=98"/>
		<updated>2017-12-14T17:00:35Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initial setup ==&lt;br /&gt;
Download the following:&lt;br /&gt;
* [http://www.tunerpro.net/ TunerPro RT]&lt;br /&gt;
* [http://www.devtechnics.com/winlog.htm WinLog] or [https://www.14point7.com/pages/software-and-documentation Winlog 14point7]. The latter has no nag screens, and the software is abandonware anyway at this point.&lt;br /&gt;
* Clone or download as &amp;quot;zip&amp;quot; the repository on [https://github.com/prj/m232 GitHub].&lt;br /&gt;
&lt;br /&gt;
== Setting up TunerPro RT ==&lt;br /&gt;
* After installing, edit the TunerPro shortcut and add the &amp;lt;b&amp;gt;-multiinstance&amp;lt;/b&amp;gt; command line parameter, this will allow you to open multiple TunerPro instances at the same time.&lt;br /&gt;
* Copy the checksum plugin (M232csum.dll) to &amp;lt;b&amp;gt;My Documents\TunerPro Files\Plugins&amp;lt;/b&amp;gt;. If you are using Windows 10 it can also be in your OneDrive folder. Best way to see is to start TunerPro once and exit.&lt;br /&gt;
* Load the .xdf file (XDF -&amp;gt; Select XDF).&lt;br /&gt;
* Load the acquisition file (Acquisition -&amp;gt; Load Definition File).&lt;br /&gt;
* Load the binary file (File -&amp;gt; Open Bin).&lt;br /&gt;
* In the upper left corner of the map selection view, choose to view by &amp;quot;Category&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Setting up WinLog ==&lt;br /&gt;
* Load the dashboard. File -&amp;gt; Open Dashboard&lt;br /&gt;
* Load the M2.3.2 driver. View -&amp;gt; Device Configuration&lt;br /&gt;
** If the driver is not listed -&amp;gt; Have disk and select WinlogM232FastDiag.dll&lt;br /&gt;
** A window will pop-up with settings - select the COM port you are using for your cable/splitter. The sensor settings are pre-set for the MPXH6400A&lt;br /&gt;
* Turn on the ignition and if you did everything correctly, you should see data streaming&lt;br /&gt;
* To log File -&amp;gt; Start new datalog&lt;br /&gt;
* To view/stop log File -&amp;gt; Open last datalog&lt;br /&gt;
* When using WinLogView - File -&amp;gt; Open Graph, and select m232_fast.wlg for a pre-configured view.&lt;br /&gt;
&lt;br /&gt;
== COM Port Splitter ==&lt;br /&gt;
If you want to use WinLog and the TunerPro acquisition at the same time, then you will need a COM port splitter.&amp;lt;br/&amp;gt;&lt;br /&gt;
A few links:&lt;br /&gt;
* [http://www.curioustech.net/xport.html XPort] - the best free tool, but only works on 32 bit Windows up to Windows 7.&lt;br /&gt;
* [https://www.fabulatech.com/serial-port-splitter.html FabulaTech] - works, but expensive.&lt;br /&gt;
* [https://freevirtualserialports.com/ freevirtualserialports.com] - not tested.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=LC/NLS&amp;diff=97</id>
		<title>LC/NLS</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=LC/NLS&amp;diff=97"/>
		<updated>2017-12-14T14:57:06Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Clutch switch wiring */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
prjmod supports flatshift and launch control with antilag function.&amp;lt;br/&amp;gt;&lt;br /&gt;
Launch control is implemented using ignition retard to build boost and either ignition or fuel cut (more cat friendly).&amp;lt;br/&amp;gt;&lt;br /&gt;
Flatshift is implemented using ignition cut and requires a clutch switch to be wired in to the ECU.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Flat shift algorithm ==&lt;br /&gt;
Flat shift is active when the following conditions are met:&lt;br /&gt;
* The car is not stationary (vehicle speed is not 0)&lt;br /&gt;
* Pin 39 has 12V applied to it&lt;br /&gt;
* The throttle position is WOT (&amp;quot;Min TPS for NLS&amp;quot;)&lt;br /&gt;
* The RPM is higher than the pre-set RPM (&amp;quot;Min RPM for NLS&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Clutch switch wiring ==&lt;br /&gt;
The clutch switch should be connected to Pin 39 at the ECU connector. When the clutch is depressed, there should be 12V and when the clutch switch is not depressed there should be no signal (the ECU has an internal pulldown).&lt;br /&gt;
&lt;br /&gt;
== Launch control algorithm description ==&lt;br /&gt;
In general the launch control is always active when the vehicle is stationary. If you have a car without VSS, set the launch control fuel cut/spark cut RPM equivalent to normal cutout, set the ign retard to be 100 rpm before the revlimiter.&lt;br /&gt;
* Launch control RPM limit - fuel cut. If RPM is above this preset, sequential fuel cut is activated.&lt;br /&gt;
* Launch control IGN cut RPM - spark cut. If RPM is above this preset, sequential spark cut is activated.&lt;br /&gt;
* Launch control IGN retard RPM. If RPM is above this preset, ignition is forced to a static angle and knock control is switched off.&lt;br /&gt;
* Launch control IGN angle. This is the ignition angle that ignition is forced to. The values are ATDC. Increase this to build more boost, reduce it to build less boost. High boost off the line is not terribly useful, there should be enough boost that the car doesn't bog, usually 1 bar is plenty.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=LC/NLS&amp;diff=96</id>
		<title>LC/NLS</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=LC/NLS&amp;diff=96"/>
		<updated>2017-12-14T14:56:48Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;== Description == prjmod supports flatshift and launch control with antilag function.&amp;lt;br/&amp;gt; Launch control is implemented using ignition retard to build boost and either igniti...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
prjmod supports flatshift and launch control with antilag function.&amp;lt;br/&amp;gt;&lt;br /&gt;
Launch control is implemented using ignition retard to build boost and either ignition or fuel cut (more cat friendly).&amp;lt;br/&amp;gt;&lt;br /&gt;
Flatshift is implemented using ignition cut and requires a clutch switch to be wired in to the ECU.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Flat shift algorithm ==&lt;br /&gt;
Flat shift is active when the following conditions are met:&lt;br /&gt;
* The car is not stationary (vehicle speed is not 0)&lt;br /&gt;
* Pin 39 has 12V applied to it&lt;br /&gt;
* The throttle position is WOT (&amp;quot;Min TPS for NLS&amp;quot;)&lt;br /&gt;
* The RPM is higher than the pre-set RPM (&amp;quot;Min RPM for NLS&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Clutch switch wiring ==&lt;br /&gt;
The clutch switch should be connected to Pin 39 in the ECU. When the clutch is depressed, there should be 12V and when the clutch switch is not depressed there should be no signal (the ECU has an internal pulldown).&lt;br /&gt;
&lt;br /&gt;
== Launch control algorithm description ==&lt;br /&gt;
In general the launch control is always active when the vehicle is stationary. If you have a car without VSS, set the launch control fuel cut/spark cut RPM equivalent to normal cutout, set the ign retard to be 100 rpm before the revlimiter.&lt;br /&gt;
* Launch control RPM limit - fuel cut. If RPM is above this preset, sequential fuel cut is activated.&lt;br /&gt;
* Launch control IGN cut RPM - spark cut. If RPM is above this preset, sequential spark cut is activated.&lt;br /&gt;
* Launch control IGN retard RPM. If RPM is above this preset, ignition is forced to a static angle and knock control is switched off.&lt;br /&gt;
* Launch control IGN angle. This is the ignition angle that ignition is forced to. The values are ATDC. Increase this to build more boost, reduce it to build less boost. High boost off the line is not terribly useful, there should be enough boost that the car doesn't bog, usually 1 bar is plenty.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Map_switching&amp;diff=95</id>
		<title>Map switching</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Map_switching&amp;diff=95"/>
		<updated>2017-12-14T14:14:17Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
Map switching is done from the MFTS pin (pin 46).&amp;lt;br/&amp;gt;&lt;br /&gt;
The current logic allows to switch the fuel and ignition maps, as well as gives an option to choose whether to cut boost when the MFTS signal is triggered.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enabling ==&lt;br /&gt;
There are two patches:&lt;br /&gt;
* MFTS boost cut enabled - apply this patch if you want boost to be cut when the MFTS pin is held low (factory behavior), remove the patch if you do not want a boost cut.&amp;lt;br/&amp;gt;&lt;br /&gt;
* MFTS input map switching enabled - apply this patch if you want to switch to &amp;quot;race fuel&amp;quot; maps when the MFTS pin is held high (at least 6V), and switch to &amp;quot;normal&amp;quot; maps when the MFTS pin is held low.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extending ==&lt;br /&gt;
Technically M232 has a master table with pointers to all tables. By default it is located at 0x8800, what the patch does, is switch it to 0xB800 in the fuel and ignition calculation subroutines of the ECU when the MFTS pin is held high.&amp;lt;br/&amp;gt;&lt;br /&gt;
It is possible to add more maps and switch more maps over to new places by adding more differences to the table list at 0xB800.&amp;lt;br/&amp;gt;&lt;br /&gt;
Also, because pin 39 is an ADC with a range of 0 to 12V on the ECU input, it is possible to extend the map switching to have as many maps as is needed using voltage divider multiplexing and some ECU code.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Map_switching&amp;diff=94</id>
		<title>Map switching</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Map_switching&amp;diff=94"/>
		<updated>2017-12-14T13:48:03Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Extending = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
Map switching is done from the MFTS pin (pin 46).&amp;lt;br/&amp;gt;&lt;br /&gt;
The current logic allows to switch the fuel and ignition maps, as well as gives an option to choose whether to cut boost when the MFTS signal is triggered.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enabling ==&lt;br /&gt;
There are two patches:&lt;br /&gt;
* MFTS boost cut enabled - apply this patch if you want boost to be cut when the MFTS pin is held low (factory behavior), remove the patch if you do not want a boost cut.&amp;lt;br/&amp;gt;&lt;br /&gt;
* MFTS input map switching enabled - apply this patch if you want to switch to &amp;quot;race fuel&amp;quot; maps when the MFTS pin is held high, and switch to &amp;quot;normal&amp;quot; maps when the MFTS pin is held low.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extending ==&lt;br /&gt;
Technically M232 has a master table with pointers to all tables. By default it is located at 0x8800, what the patch does, is switch it to 0xB800 in the fuel and ignition calculation subroutines of the ECU when the MFTS pin is held high.&amp;lt;br/&amp;gt;&lt;br /&gt;
It is possible to add more maps and switch more maps over to new places by adding more differences to the table list at 0xB800.&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Map_switching&amp;diff=93</id>
		<title>Map switching</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Map_switching&amp;diff=93"/>
		<updated>2017-12-14T13:47:46Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;== Description == Map switching is done from the MFTS pin (pin 46).&amp;lt;br/&amp;gt; The current logic allows to switch the fuel and ignition maps, as well as gives an option to choose wh...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
Map switching is done from the MFTS pin (pin 46).&amp;lt;br/&amp;gt;&lt;br /&gt;
The current logic allows to switch the fuel and ignition maps, as well as gives an option to choose whether to cut boost when the MFTS signal is triggered.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enabling ==&lt;br /&gt;
There are two patches:&lt;br /&gt;
* MFTS boost cut enabled - apply this patch if you want boost to be cut when the MFTS pin is held low (factory behavior), remove the patch if you do not want a boost cut.&amp;lt;br/&amp;gt;&lt;br /&gt;
* MFTS input map switching enabled - apply this patch if you want to switch to &amp;quot;race fuel&amp;quot; maps when the MFTS pin is held high, and switch to &amp;quot;normal&amp;quot; maps when the MFTS pin is held low.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extending ===&lt;br /&gt;
Technically M232 has a master table with pointers to all tables. By default it is located at 0x8800, what the patch does, is switch it to 0xB800 in the fuel and ignition calculation subroutines of the ECU when the MFTS pin is held high.&amp;lt;br/&amp;gt;&lt;br /&gt;
It is possible to add more maps and switch more maps over to new places by adding more differences to the table list at 0xB800.&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=92</id>
		<title>Requirements and modifications for running prjmod</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=92"/>
		<updated>2017-11-06T09:34:30Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* MAP sensor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Follow the instructions with great care.&amp;lt;br/&amp;gt;&lt;br /&gt;
Everything except NLS and Map switching is &amp;lt;b&amp;gt;absolutely mandatory&amp;lt;/b&amp;gt;, you can not do any tuning before the steps are completed.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==Supported ECU part numbers==&lt;br /&gt;
Only the following control units are supported. They are all identically suited for running prjmod firmware. Make sure you have one (for obvious reasons).&amp;lt;br/&amp;gt;&lt;br /&gt;
* 4A0907551AA&lt;br /&gt;
* 4A0907551B&lt;br /&gt;
* 4A0907551C&lt;br /&gt;
* 4A0907551D&lt;br /&gt;
* 4A0907551E&lt;br /&gt;
* 4A0907551F&lt;br /&gt;
* 4A0997551X&lt;br /&gt;
* 4A0997551AX&lt;br /&gt;
* 4A0997551BX&lt;br /&gt;
* 4A0997551CX&lt;br /&gt;
* 4A0997551DX&lt;br /&gt;
* 4A0997551EX&lt;br /&gt;
* 895907551A&lt;br /&gt;
* 895907551B&lt;br /&gt;
* 895997551X&lt;br /&gt;
* 895997551AX&lt;br /&gt;
* 8A0907551B&lt;br /&gt;
* 8A0907551C&lt;br /&gt;
* 8A0997551X&lt;br /&gt;
* 8A0997551BX&lt;br /&gt;
&lt;br /&gt;
==OBD Interface==&lt;br /&gt;
Any KKL cable will work, also the non-current generation Ross-Tech HEX+CAN cables with the USB pass-through driver installed. I recommend setting the COM-port latency to 1 in device settings.&lt;br /&gt;
&lt;br /&gt;
==MAP sensor==&lt;br /&gt;
You need the MPXH6400A MAP sensor. It is possible to use any sensor, but unless you need to run more than 2.8 bar boost, save yourself the trouble, and run the MPXH6400A, as the provided basefiles are calibrated for it.&amp;lt;br/&amp;gt;&lt;br /&gt;
The following image shows the sensors on top of each other, incl. the pin numbering:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensors.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The pinouts are not 1:1, here is a table as to how they should be connected:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;b&amp;gt;Board&amp;lt;/b&amp;gt;&lt;br /&gt;
|&amp;lt;b&amp;gt;MPXH6400A&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
|}&lt;br /&gt;
* Desolder and cut the old sensor off the rubber hose with an exacto knife, make sure to cut right past the nozzle, or you will need a new hose.&lt;br /&gt;
* Re-use the clip. &lt;br /&gt;
* Use a cable tie to secure the sensor in place. &lt;br /&gt;
* Make sure that the edge of the upper half of the MAP sensor package is &amp;quot;behind&amp;quot; the ledge of the white bracket, so the sensor can not be pushed out by pressure. Failing that use &amp;lt;b&amp;gt;heat resistant&amp;lt;/b&amp;gt; glue.&amp;lt;br/&amp;gt;&lt;br /&gt;
Example of finished install:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensor_installed.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Speed Density modifications==&lt;br /&gt;
Remove 0 ohm resistor R660.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:R660.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via under &amp;quot;S900&amp;quot; chip. The via is directly under the writing &amp;quot;C660&amp;quot;. Attach one end of wire through hole, the wire will go from one PCB to the other.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire1.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via directly to the right of D232 (towards D235). Attach second end of wire through hole.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire2.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
As the fuel/ign chip does not have a MAP connection, we are simply routing the MAP signal into a free analog input.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Immobilizer bypass==&lt;br /&gt;
On cars fitted with an immobilizer the K-line runs to the white immobox on the steering column (behind the dash), and then from the immobox to the diagnostic socket.&amp;lt;br/&amp;gt;&lt;br /&gt;
The immo box will block any communications it does not consider &amp;quot;kosher&amp;quot; by pulling the whole K-line LOW on the ECU side. It certainly does not want you to run comms at 187500 baud, so you will need to cut out the middle man if you want to use fast logging.&amp;lt;br/&amp;gt;&lt;br /&gt;
To get rid of it:&lt;br /&gt;
* Remove the immobox connector&lt;br /&gt;
* Find two green wires in the connector.&lt;br /&gt;
* Check continuity.&lt;br /&gt;
** One of the green wires will have continuity to the K-line in the 2x2 connector under the hood.&lt;br /&gt;
** The other of the green wires will have continuity to pin 55 on the ECU.&lt;br /&gt;
* Once you have found the two K-line &amp;quot;ends&amp;quot; cut them at the connector and connect them together, you can also discard the immobox.&lt;br /&gt;
* If you want a proper immobilizer, wire in a reed switch somewhere or install an alarm with immobilization function. If anyone wants to steal one of these cars they can simply swap the ECU for a non-immobilized one in 30 seconds and drive off. The prjmod firmware has immo disabled.&lt;br /&gt;
I will be grateful if anyone can provide some pictures of this process.&lt;br /&gt;
&lt;br /&gt;
==NLS==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==Map switching==&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Fuel&amp;diff=91</id>
		<title>Fuel</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Fuel&amp;diff=91"/>
		<updated>2017-11-05T19:16:40Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
In M2.3.2 LOAD is the injection time in milliseconds to reach lambda 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Because rescaling all LOAD on every axis every time you change injectors is an insane amount of work, I took a different approach.&amp;lt;br/&amp;gt;&lt;br /&gt;
LOAD is stored internally as a 16 bit variable, but the map axes only go up to 255, because they are 8 bit. This does not mean that you will have any issues after going past 255 LOAD. The table lookup will simply read the last column, but because the internal LOAD (that is also reported by the datalogger) is 16 bit and essentially unlimited, all fueling and timing will still be fine. Also do keep in mind that 255 LOAD is roughly 2.7-2.8 bar of boost, and the MPXH6400A starts being insufficient. It is possible to work around this, by rescaling FGAT0 and LOAD, just as it is possible to linearize an 8 bar MAP sensor.&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
The injection pulsewidth is calculated as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;IPW = LOAD*FGAT0*ENRICHMENT+TVUB&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Enrichment calculation works as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FACTOR = (OLD_FACTOR * NEW_FACTOR) &amp;lt;&amp;lt; 7&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
What this means is - if the new factor is more than 128, then fuel is enriched. If the new factor is less than 128, fuel is leaned, and if the factor is exactly 128, then nothing happens at all.&amp;lt;br/&amp;gt;&lt;br /&gt;
The objective is to calibrate the ECU so, that with a hot engine when ENRICHMENT is 128, then lambda = 1. To achieve this:&lt;br /&gt;
* We must pick the correct injector constant (FGAT0)&lt;br /&gt;
* Pick the correct injector deadtime (TVUB)&lt;br /&gt;
* Calibrate the VE so that LOAD is accurate to deliver a lambda = 1 (or 14.7 AFR) mixture when enrichment is 128&lt;br /&gt;
You can verify this is the case, when your real AFR matches REQ_AFR. REQ_AFR is nothing other than the sum of all enrichment.&lt;br /&gt;
&lt;br /&gt;
== Injector constant FGAT0 ==&lt;br /&gt;
The XDF has convenience functions, so you can just edit the value that represents the FPR you are using (3 bar, 3.8 bar, 4 bar), and set injector size in CC.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you have a FPR with some other pressure, use the 3 bar FPR variant, and multiply the injector size of your injectors in cc additionally by &amp;lt;b&amp;gt;sqrt(YOUR_FPR/3)&amp;lt;/b&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Injector latency/deadtime ==&lt;br /&gt;
Injector latency is hopefully provided by the manufacturer. If you have to find it empirically, you can see if it is more or less right, by revving the engine on idle with no load. As RPM rises and load reduces, the AFR_REQ should still match. This assumes a semi-decently calibrated VE map of course.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an injector minimum pulsewidth constant, but 0.5ms should be OK even for huge injectors.&lt;br /&gt;
&lt;br /&gt;
== Main fuel enrichment ==&lt;br /&gt;
* Fuel enrichment P/T - main fuel enrichment map. Target AFR.&lt;br /&gt;
* Fuel enrichment P/T - Race fuel - Map switched fuel map.&lt;br /&gt;
* Fuel enrichment - IATxRPM correction. IAT based correction. Use to enrich at high IAT. This map is also used to compensate for lean conditions due to heat soak when the car has been left for a while, and then restarted with the engine hot and the IAT sensor reading ridiculous numbers. Thus the fueling corrections at 1000 RPM and 45+C IAT.&lt;br /&gt;
* Fuel enrichment - continuous knock. If you have consistent knocking and the total knock correction over all cylinders exceeds a certain number, then the knock/boost chip sends a signal to the I/O extender, which the fuel/ign chip reads, and enriches fuel by the amount in the map. This is used to combat high EGT due to late ignition.&lt;br /&gt;
&lt;br /&gt;
== Warmup enrichment ==&lt;br /&gt;
This is done a little bit differently. The formula for the final factor is not &amp;lt;&amp;lt;7 (/128), but &amp;lt;&amp;lt;8 (/256)+128.&amp;lt;br/&amp;gt;&lt;br /&gt;
The two maps are multiplied between each other, the result is divided by 256 and added to 128. This makes it so, that these maps can only ever be used to add fuel, never to subtract it.&amp;lt;br/&amp;gt;&lt;br /&gt;
The maps are:&lt;br /&gt;
* Warmup enrichment - Coolant x IAT - temperature based enrichment&lt;br /&gt;
* Warmup enrichment - IDC - RPM by LOAD enrichment&lt;br /&gt;
&lt;br /&gt;
== Acceleration enrichment ==&lt;br /&gt;
=== Working principles ===&lt;br /&gt;
Acceleration enrichment has been rewritten from standard.&amp;lt;br/&amp;gt;&lt;br /&gt;
The standard enrichment works based on delta MAF, but because the MAP sensor is much slower in reaction than the MAF, the delta MAP enrichment does not really work that well.&amp;lt;br/&amp;gt;&lt;br /&gt;
So the routine was rewritten to use Delta TPS instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
The basic principle is that the enrichment event happens on the next injection event after a high TPS delta. If the TPS delta subsides, it tapers off over each injection event, until it is zero. If the TPS delta is still there, it is recalculated again over and over.&lt;br /&gt;
=== Maps ===&lt;br /&gt;
* Load gradient multiplier for wall film - This map is Delta TPS, you can log DTPS to see it. Basically it is an amplification map - the faster and harder you hit the throttle, the more enrichment. The first few values have to be zero, to avoid unnecessary enrichment and jitter. With the values at zero no enrichment is performed.&lt;br /&gt;
* Number of ignition events for wall film enrichment - this is a time component, over how many injections/ignitions the additional enrichment should taper, always use the SD version.&lt;br /&gt;
* Wall film enrichment taper amount per ignition - This gets subtracted per ignition event from the gradient multiplier map.&lt;br /&gt;
* Initial wall film reduction % after ignition events passed - How much to subtract after the ignition events ran out - usually a high enough number to go straight to 0.&lt;br /&gt;
* Wall film enrichment (RPM x LOAD) - RPM x LOAD component of the enrichment amount. Calculated the same way as warmup enrichment, paired with the Coolant x RPM map.&lt;br /&gt;
* Wall film enrichment (Coolant x RPM) - RPM x Coolant component of the enrichment amount. Calculated the same way as warmup enrichment, paired with the RPM x LOAD map.&lt;br /&gt;
&lt;br /&gt;
== Overrun cutout ==&lt;br /&gt;
* Cylinder re-activation start - The RPM where cylinders start to get sequentially phased in.&lt;br /&gt;
* Cylinder re-activation end - The RPM at which RPM all cylinders must be immediately phased in.&lt;br /&gt;
* Cylinder re-activation delta correction - This RPM is added to the fuel resume setpoint. Axis is RPM gradient.&lt;br /&gt;
&lt;br /&gt;
== Crank fuel ==&lt;br /&gt;
This is a multiplier for the cranking fuel. Be careful with this, as you can request 25x fuel enrichment here and flood your engine completely if you are not careful. The standard map is pretty good and will work down to -30C.&lt;br /&gt;
&lt;br /&gt;
== Closed loop control ==&lt;br /&gt;
=== Control principles ===&lt;br /&gt;
Fueling is controlled in closed loop by 2 point O2 sensors. The ECU actually differentiates between 5 states:&lt;br /&gt;
* Very rich&lt;br /&gt;
* Rich&lt;br /&gt;
* Stoich&lt;br /&gt;
* Lean&lt;br /&gt;
* Very lean&lt;br /&gt;
Based on these states corrective action is applied.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are short term and long term corrections. They are visible in group 000 in VCDS. Long term trim is disabled in prjmod.&amp;lt;br/&amp;gt;&lt;br /&gt;
In fast logging, the lambda intervention is visible in AFR_REQ.&amp;lt;br/&amp;gt;&lt;br /&gt;
Another feature of prjmod is initial delay. If you use a simulated signal, then usually the signal is static during LSU warmup rather than mimicking a real O2 sensor. Thus the ECU algorithm instantly goes into a control mode with the trim running to 25% very quickly. To combat this, after engine startup a roughly 20 second delay has been added before the O2 correction function is allowed to run.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are a ton of configurable parameters, such as the PI control, all kinds of voltages, trim limits, diagnosis limits and so on, however not much of it is in the xdf because it simply works quite well &amp;quot;as-is&amp;quot;.&lt;br /&gt;
=== Maps ===&lt;br /&gt;
* Lambda threshold - this is the maximum load, under which the ECU is allowed to enter closed loop. During initial injector calibration it is a good idea to set this to 0 to prevent any kind of closed loop control.&lt;br /&gt;
* Lambda threshold (cont. knock) - same as above, but with the knock fuel flag set.&lt;br /&gt;
&lt;br /&gt;
== Consumption signal ==&lt;br /&gt;
The consumption signal should be corrected whenever the injectors are changed, else you are going to have weird numbers on the consumption display.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also a consumption signal multiplier, that multiplies the signal by 2 each time it is incremented.&amp;lt;br/&amp;gt;&lt;br /&gt;
To recalculate the consumption signal, take the old number, and multiply it by the factor, that your injectors are bigger/smaller than ADU injectors (which are 360cc at 3 BAR and ADU uses a 3.8 BAR FPR).&amp;lt;br/&amp;gt;&lt;br /&gt;
This should get you in the ball park, but basically you can also eventually just drive and compare actual and reported consumption and then multiply this number by the error you have in %.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Safety_limits&amp;diff=90</id>
		<title>Safety limits</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Safety_limits&amp;diff=90"/>
		<updated>2017-11-05T18:57:29Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rev limit==&lt;br /&gt;
===Description===&lt;br /&gt;
The factory revlimiter is sequential fuel cut. With prjmod an ignition cut limiter is also provided.&lt;br /&gt;
===Maps===&lt;br /&gt;
*Rev limiter - fuel cut - start rpm - Main fuel cut limiter. Max RPM value it to allow.&lt;br /&gt;
*Rev limiter - fuel cut - engine speed exceeded - RPM threshold to throw overrev DTC.&lt;br /&gt;
*Rev limiter - fuel cut - cyl 1-5 - How many cylinders to force off sequentially. If you set it somewhat lower, you can have a softer cut. It can start cutting one or two cylinders before it starts aggressively cutting everything.&lt;br /&gt;
*Rev limit - spark cut - set this lower than the fuel cut limiter to use the spark cut limiter. Not recommended with ceramic catalytic converters.&lt;br /&gt;
*Rev limit - spark cut - knock control disable - Because of the fuel explosions in the exhaust the ECU will sense knock, if knock control is not disabled. Set this value to 80-120 RPM lower than the actual limiter, so that when it is banging on the limiter the knock control is off and does not cause false positives.&lt;br /&gt;
*VMax limit - Top speed limiter, sequential fuel cut, just takes speed instead of RPM as control variable. Useless if you do not have VSS.&lt;br /&gt;
&lt;br /&gt;
==LOAD limit==&lt;br /&gt;
===Description===&lt;br /&gt;
There are two limiters. The initial one, if exceeded for a certain amount of time, will turn off boost control and cut fuel to all cylinders, also logging an overboost code.&amp;lt;br/&amp;gt;&lt;br /&gt;
After that, a second limiter is used, without a delay - if you exceed the load specified, fuel is instantly cut.&amp;lt;br/&amp;gt;&lt;br /&gt;
These limiters are essential to set, because they will save your engine from destruction in case a wastegate line gets damaged for example. Because on some highly tuned cars the LOAD can exceed 255, the values in the maps have been multiplied by 10 compared to standard.&lt;br /&gt;
&lt;br /&gt;
===Maps===&lt;br /&gt;
*Max calculated load - Irrelevant in prjmod.&lt;br /&gt;
*Fuel cut - Hard load limit - If the LOAD exceeds the value in this map for the specified time, N75 is forced to zero, fuel is cut to all cylinders, fault code thrown and 2nd map activated.&lt;br /&gt;
*Time for LOAD to exceed cut for trigger - Debounce time for how long the LOAD must be over the threshold specified to cause limp mode and fuel cut.&lt;br /&gt;
*Fuel cut - MAF error, limp mode - Secondary fuel cut which gets activated once the first fuel cut is hit. It has no delay and it is instant. Recommend setting a conservative value, because if you are hitting it, most likely something is really wrong with your hardware.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Safety_limits&amp;diff=89</id>
		<title>Safety limits</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Safety_limits&amp;diff=89"/>
		<updated>2017-11-05T18:57:09Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;==Rev limit== ===Description=== The factory revlimiter is sequential fuel cut. With prjmod an ignition cut limiter is also provided. ===Maps=== *Rev limiter - fuel cut - start...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rev limit==&lt;br /&gt;
===Description===&lt;br /&gt;
The factory revlimiter is sequential fuel cut. With prjmod an ignition cut limiter is also provided.&lt;br /&gt;
===Maps===&lt;br /&gt;
*Rev limiter - fuel cut - start rpm - Main fuel cut limiter. Max RPM value it to allow.&lt;br /&gt;
*Rev limiter - fuel cut - engine speed exceeded - RPM threshold to throw overrev DTC.&lt;br /&gt;
*Rev limiter - fuel cut - cyl 1-5 - How many cylinders to force off sequentially. If you set it somewhat lower, you can have a softer cut. It can start cutting one or two cylinders before it starts aggressively cutting everything.&lt;br /&gt;
*Rev limit - spark cut - set this lower than the fuel cut limiter to use the spark cut limiter. Not recommended with ceramic catalytic converters.&lt;br /&gt;
*Rev limit - spark cut - knock control disable - Because of the fuel explosions in the exhaust the ECU will sense knock, if knock control is not disabled. Set this value to 80-120 RPM lower than the actual limiter, so that when it is banging on the limiter the knock control is off and does not cause false positives.&lt;br /&gt;
*VMax limit - Top speed limiter, sequential fuel cut, just takes speed instead of RPM as control variable. Useless if you do not have VSS.&lt;br /&gt;
&lt;br /&gt;
==LOAD limit==&lt;br /&gt;
===Description===&lt;br /&gt;
There are two limiters. The initial one, if exceeded for a certain amount of time, will turn off boost control and cut fuel to all cylinders, also logging an overboost code.&amp;lt;br/&amp;gt;&lt;br /&gt;
After that, a second limiter is used, without a delay - if you exceed the load specified, fuel is instantly cut.&amp;lt;br/&amp;gt;&lt;br /&gt;
These limiters are essential to set, because the will save your engine from destruction in case a wastegate line gets damaged for example. Because on some highly tuned cars the LOAD can exceed 255, the values in the maps have been multiplied by 10 compared to standard.&lt;br /&gt;
===Maps===&lt;br /&gt;
*Max calculated load - Irrelevant in prjmod.&lt;br /&gt;
*Fuel cut - Hard load limit - If the LOAD exceeds the value in this map for the specified time, N75 is forced to zero, fuel is cut to all cylinders, fault code thrown and 2nd map activated.&lt;br /&gt;
*Time for LOAD to exceed cut for trigger - Debounce time for how long the LOAD must be over the threshold specified to cause limp mode and fuel cut.&lt;br /&gt;
*Fuel cut - MAF error, limp mode - Secondary fuel cut which gets activated once the first fuel cut is hit. It has no delay and it is instant. Recommend setting a conservative value, because if you are hitting it, most likely something is really wrong with your hardware.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Fuel&amp;diff=88</id>
		<title>Fuel</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Fuel&amp;diff=88"/>
		<updated>2017-11-05T18:45:47Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
In M2.3.2 LOAD is the injection time in milliseconds to reach lambda 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Because rescaling all LOAD on every axis every time you change injectors is an insane amount of work, I took a different approach.&amp;lt;br/&amp;gt;&lt;br /&gt;
LOAD is stored internally as a 16 bit variable, but the map axes only go up to 255, because they are 8 bit. This does not mean that you will have any issues after going past 255 LOAD. The table lookup will simply read the last column, but because the internal LOAD (that is also reported by the datalogger) is 16 bit and essentially unlimited, all fueling and timing will still be fine. Also do keep in mind that 255 LOAD is roughly 2.7-2.8 bar of boost, and the MPXH6400A starts being insufficient. It is possible to work around this, by rescaling FGAT0 and LOAD, just as it is possible to linearize an 8 bar MAP sensor.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
The injection pulsewidth is calculated as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;IPW = LOAD*FGAT0*ENRICHMENT+TVUB&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Enrichment calculation works as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FACTOR = (OLD_FACTOR * NEW_FACTOR) &amp;lt;&amp;lt; 7&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
What this means is - if the new factor is more than 128, then fuel is enriched. If the new factor is less than 128, fuel is leaned, and if the factor is exactly 128, then nothing happens at all.&amp;lt;br/&amp;gt;&lt;br /&gt;
The objective is to calibrate the ECU so, that with a hot engine when ENRICHMENT is 128, then lambda = 1. To achieve this:&lt;br /&gt;
* We must pick the correct injector constant (FGAT0)&lt;br /&gt;
* Pick the correct injector deadtime (TVUB)&lt;br /&gt;
* Calibrate the VE so that LOAD is accurate to deliver a lambda = 1 (or 14.7 AFR) mixture when enrichment is 128&lt;br /&gt;
You can verify this is the case, when your real AFR matches REQ_AFR. REQ_AFR is nothing other than the sum of all enrichment.&lt;br /&gt;
&lt;br /&gt;
== Injector constant FGAT0 ==&lt;br /&gt;
The XDF has convenience functions, so you can just edit the value that represents the FPR you are using (3 bar, 3.8 bar, 4 bar), and set injector size in CC.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you have a FPR with some other pressure, use the 3 bar FPR variant, and multiply the injector size of your injectors in cc additionally by &amp;lt;b&amp;gt;sqrt(YOUR_FPR/3)&amp;lt;/b&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Injector latency/deadtime ==&lt;br /&gt;
Injector latency is hopefully provided by the manufacturer. If you have to find it empirically, you can see if it is more or less right, by revving the engine on idle with no load. As RPM rises and load reduces, the AFR_REQ should still match. This assumes a semi-decently calibrated VE map of course.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an injector minimum pulsewidth constant, but 0.5ms should be OK even for huge injectors.&lt;br /&gt;
&lt;br /&gt;
== Main fuel enrichment ==&lt;br /&gt;
* Fuel enrichment P/T - main fuel enrichment map. Target AFR.&lt;br /&gt;
* Fuel enrichment P/T - Race fuel - Map switched fuel map.&lt;br /&gt;
* Fuel enrichment - IATxRPM correction. IAT based correction. Use to enrich at high IAT. This map is also used to compensate for lean conditions due to heat soak when the car has been left for a while, and then restarted with the engine hot and the IAT sensor reading ridiculous numbers. Thus the fueling corrections at 1000 RPM and 45+C IAT.&lt;br /&gt;
* Fuel enrichment - continuous knock. If you have consistent knocking and the total knock correction over all cylinders exceeds a certain number, then the knock/boost chip sends a signal to the I/O extender, which the fuel/ign chip reads, and enriches fuel by the amount in the map. This is used to combat high EGT due to late ignition.&lt;br /&gt;
&lt;br /&gt;
== Warmup enrichment ==&lt;br /&gt;
This is done a little bit differently. The formula for the final factor is not &amp;lt;&amp;lt;7 (/128), but &amp;lt;&amp;lt;8 (/256)+128.&amp;lt;br/&amp;gt;&lt;br /&gt;
The two maps are multiplied between each other, the result is divided by 256 and added to 128. This makes it so, that these maps can only ever be used to add fuel, never to subtract it.&amp;lt;br/&amp;gt;&lt;br /&gt;
The maps are:&lt;br /&gt;
* Warmup enrichment - Coolant x IAT - temperature based enrichment&lt;br /&gt;
* Warmup enrichment - IDC - RPM by LOAD enrichment&lt;br /&gt;
&lt;br /&gt;
== Acceleration enrichment ==&lt;br /&gt;
=== Working principles ===&lt;br /&gt;
Acceleration enrichment has been rewritten from standard.&amp;lt;br/&amp;gt;&lt;br /&gt;
The standard enrichment works based on delta MAF, but because the MAP sensor is much slower in reaction than the MAF, the delta MAP enrichment does not really work that well.&amp;lt;br/&amp;gt;&lt;br /&gt;
So the routine was rewritten to use Delta TPS instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
The basic principle is that the enrichment event happens on the next injection event after a high TPS delta. If the TPS delta subsides, it tapers off over each injection event, until it is zero. If the TPS delta is still there, it is recalculated again over and over.&lt;br /&gt;
=== Maps ===&lt;br /&gt;
* Load gradient multiplier for wall film - This map is Delta TPS, you can log DTPS to see it. Basically it is an amplification map - the faster and harder you hit the throttle, the more enrichment. The first few values have to be zero, to avoid unnecessary enrichment and jitter. With the values at zero no enrichment is performed.&lt;br /&gt;
* Number of ignition events for wall film enrichment - this is a time component, over how many injections/ignitions the additional enrichment should taper, always use the SD version.&lt;br /&gt;
* Wall film enrichment taper amount per ignition - This gets subtracted per ignition event from the gradient multiplier map.&lt;br /&gt;
* Initial wall film reduction % after ignition events passed - How much to subtract after the ignition events ran out - usually a high enough number to go straight to 0.&lt;br /&gt;
* Wall film enrichment (RPM x LOAD) - RPM x LOAD component of the enrichment amount. Calculated the same way as warmup enrichment, paired with the Coolant x RPM map.&lt;br /&gt;
* Wall film enrichment (Coolant x RPM) - RPM x Coolant component of the enrichment amount. Calculated the same way as warmup enrichment, paired with the RPM x LOAD map.&lt;br /&gt;
&lt;br /&gt;
== Overrun cutout ==&lt;br /&gt;
* Cylinder re-activation start - The RPM where cylinders start to get sequentially phased in.&lt;br /&gt;
* Cylinder re-activation end - The RPM at which RPM all cylinders must be immediately phased in.&lt;br /&gt;
* Cylinder re-activation delta correction - This RPM is added to the fuel resume setpoint. Axis is RPM gradient.&lt;br /&gt;
&lt;br /&gt;
== Crank fuel ==&lt;br /&gt;
This is a multiplier for the cranking fuel. Be careful with this, as you can request 25x fuel enrichment here and flood your engine completely if you are not careful. The standard map is pretty good and will work down to -30C.&lt;br /&gt;
&lt;br /&gt;
== Consumption signal ==&lt;br /&gt;
The consumption signal should be corrected whenever the injectors are changed, else you are going to have weird numbers on the consumption display.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also a consumption signal multiplier, that multiplies the signal by 2 each time it is incremented.&amp;lt;br/&amp;gt;&lt;br /&gt;
To recalculate the consumption signal, take the old number, and multiply it by the factor, that your injectors are bigger/smaller than ADU injectors (which are 360cc at 3 BAR and ADU uses a 3.8 BAR FPR).&amp;lt;br/&amp;gt;&lt;br /&gt;
This should get you in the ball park, but basically you can also eventually just drive and compare actual and reported consumption and then multiply this number by the error you have in %.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Boost_control&amp;diff=87</id>
		<title>Boost control</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Boost_control&amp;diff=87"/>
		<updated>2017-11-05T18:41:39Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;==Algorithm== The boost controller is a fairly simple closed loop PID controller with a feed-forward map.&amp;lt;br/&amp;gt;  ==Overboost== The overboost functionality is rather simple - fo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Algorithm==&lt;br /&gt;
The boost controller is a fairly simple closed loop PID controller with a feed-forward map.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overboost==&lt;br /&gt;
The overboost functionality is rather simple - for the time the conditions are met the pedal axis of of the target boost/base duty maps simply gets a fixed number added to it.&amp;lt;br/&amp;gt;&lt;br /&gt;
I don't recommend using this, and it is not included in the xdf either. To avoid it, simply always map the last two pedal positions (87/112) the same, or rescale the axis.&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
* MAP Target - Target absolute pressure in kpa.&amp;lt;br/&amp;gt;&lt;br /&gt;
* Base WGDC - Feed-forward map. In steady-state conditions it should contain the duty cycle, that is needed to reach the target boost. The output of this map is in N75_REQ. Simply alter it so, that N75 and N75_REQ are as close together as possible, apart from the low rpm areas where you have to let the PID controller do it's job.&lt;br /&gt;
* P, I, D term - they are what they say.&lt;br /&gt;
* MAP signal too low diagnosis - If you are WOT for a certain amount of time and the MAP value does not exceed this parameter, it will throw a MAP sensor signal fault.&lt;br /&gt;
* MAP limit - this is the soft boost cut limit. If it is exceeded, N75 will be set to 0 and a fault will be logged.&lt;br /&gt;
* N75 upper/lower limit - min/max WGDC output.&lt;br /&gt;
* Correction maps - IAT, pATM (atmospheric pressure) - corrects the target boost pressure as a factory based on RPM, IAT, Atmospheric pressure. There are a few variants, some of them are used based on coding plugs.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Toolchain_setup&amp;diff=86</id>
		<title>Toolchain setup</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Toolchain_setup&amp;diff=86"/>
		<updated>2017-11-03T08:35:12Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Setting up TunerPro RT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initial setup ==&lt;br /&gt;
Download the following:&lt;br /&gt;
* [http://www.tunerpro.net/ TunerPro RT]&lt;br /&gt;
* [http://www.devtechnics.com/winlog.htm WinLog] or [https://www.14point7.com/pages/software-and-documentation Winlog 14point7]. The latter has no nag screens, and the software is abandonware anyway at this point.&lt;br /&gt;
* Clone or download as &amp;quot;zip&amp;quot; the release folder on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Setting up TunerPro RT ==&lt;br /&gt;
* After installing, edit the TunerPro shortcut and add the &amp;lt;b&amp;gt;-multiinstance&amp;lt;/b&amp;gt; command line parameter, this will allow you to open multiple TunerPro instances at the same time.&lt;br /&gt;
* Copy the checksum plugin (M232csum.dll) to &amp;lt;b&amp;gt;My Documents\TunerPro Files\Plugins&amp;lt;/b&amp;gt;. If you are using Windows 10 it can also be in your OneDrive folder. Best way to see is to start TunerPro once and exit.&lt;br /&gt;
* Load the .xdf file (XDF -&amp;gt; Select XDF).&lt;br /&gt;
* Load the acquisition file (Acquisition -&amp;gt; Load Definition File).&lt;br /&gt;
* Load the binary file (File -&amp;gt; Open Bin).&lt;br /&gt;
* In the upper left corner of the map selection view, choose to view by &amp;quot;Category&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Setting up WinLog ==&lt;br /&gt;
* Load the dashboard. File -&amp;gt; Open Dashboard&lt;br /&gt;
* Load the M2.3.2 driver. View -&amp;gt; Device Configuration&lt;br /&gt;
** If the driver is not listed -&amp;gt; Have disk and select WinlogM232FastDiag.dll&lt;br /&gt;
** A window will pop-up with settings - select the COM port you are using for your cable/splitter. The sensor settings are pre-set for the MPXH6400A&lt;br /&gt;
* Turn on the ignition and if you did everything correctly, you should see data streaming&lt;br /&gt;
* To log File -&amp;gt; Start new datalog&lt;br /&gt;
* To view/stop log File -&amp;gt; Open last datalog&lt;br /&gt;
* When using WinLogView - File -&amp;gt; Open Graph, and select m232_fast.wlg for a pre-configured view.&lt;br /&gt;
&lt;br /&gt;
== COM Port Splitter ==&lt;br /&gt;
If you want to use WinLog and the TunerPro acquisition at the same time, then you will need a COM port splitter.&amp;lt;br/&amp;gt;&lt;br /&gt;
A few links:&lt;br /&gt;
* [http://www.curioustech.net/xport.html XPort] - the best free tool, but only works on 32 bit Windows up to Windows 7.&lt;br /&gt;
* [https://www.fabulatech.com/serial-port-splitter.html FabulaTech] - works, but expensive.&lt;br /&gt;
* [https://freevirtualserialports.com/ freevirtualserialports.com] - not tested.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Idle_control&amp;diff=85</id>
		<title>Idle control</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Idle_control&amp;diff=85"/>
		<updated>2017-11-02T22:54:12Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;==Algorithm== Fast path idle control is done through ignition. Slow path idle control is done through a base lookup map, and then adaptive closed loop control.&amp;lt;br...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Algorithm==&lt;br /&gt;
Fast path idle control is done through [[Ignition|ignition]]. Slow path idle control is done through a base lookup map, and then adaptive closed loop control.&amp;lt;br/&amp;gt;&lt;br /&gt;
During cranking ISV DC is fixed from a map based on ECT.&amp;lt;br/&amp;gt;&lt;br /&gt;
Once the engine starts the idle setpoint is taken from the setpoint map and a base ISV duty is taken from the precontrol map, after which a closed loop controller modifies it.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is no logging for the idle control in the fast logger. You can use VCDS to log it in normal diagnosis, or perhaps it will be added to the fast logger someday.&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
*Idle setpoint RPM - target idle RPM based on ECT.&lt;br /&gt;
*Idle ISV Linearization - target ISV DC based on RPM and ECT. Simply rev up the engine and then release the throttle, and see how slowly the idle drops. Keep in mind that the ISV can control airflow slowly - you want to have a stable base value, and then have adaptive control and ignition fast path to do the rest.&lt;br /&gt;
*Idle ISV Linearization, AC ON - same as above, but when the AC input signal is received by the ECU.&lt;br /&gt;
*ISV frequency during cranking - these two maps are added together and the duty cycle of the ISV during cranking is output from them. If you have more displacement or funny cams you might want to increase this somewhat. Same effect as slightly leaning on the throttle when starting the car (which you should never be doing if this map is tuned right).&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Knock_control&amp;diff=84</id>
		<title>Knock control</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Knock_control&amp;diff=84"/>
		<updated>2017-11-02T01:49:37Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Working principles==&lt;br /&gt;
===Background===&lt;br /&gt;
The M2.3.2 ECU runs a bog-standard distributor based logic in the fuel/ign chip, except that it's output does not go directly to an ignition driver (which it could), but into a solid state distributor/knock controller instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
To give you a bit of history - on the older Motronics, Porsche had the DDE and the KLR, a separate knock control box. M2.3.2 is simply the amalgamation of that, where electronics were downsized and placed into one single unit. It's still two ECU's in one, connected by ribbon cable.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Knock retard===&lt;br /&gt;
The ignition output consists of two steps - pull the ignition line high, wait for the dwell time, pull the ignition line low to fire the spark.&amp;lt;br/&amp;gt;&lt;br /&gt;
This signal gets intercepted by the boost/knock controller. The boost knock/controller looks at the incoming pulse and:&lt;br /&gt;
* Determines which cylinder COP it is supposed to go to.&lt;br /&gt;
* Looks up it's knock array and sees if the timing must be retarded for this cylinder due to knock on previous combustion. If it needs to be retarded, it waits for the amount of crank degrees specified (in 0.5 degree increments).&lt;br /&gt;
* It starts charging the coil.&lt;br /&gt;
* When it sees the signal go low, it waits for the amount of crank degrees specified in the knock array and fires the spark.&lt;br /&gt;
&lt;br /&gt;
Thus in essence, the boost/knock controller is like a piggyback.&lt;br /&gt;
&lt;br /&gt;
===Knock detection===&lt;br /&gt;
There is no knock chip, the entire circuit is visible, it consists of:&lt;br /&gt;
* Level control&lt;br /&gt;
* Switchable capacitors for different noise suppression/filtering&lt;br /&gt;
* Input selection for sensor 1/2&lt;br /&gt;
After the spark is fired, during the knock window, the signal is continuously sampled on the ADC. The min/max are recorded.&lt;br /&gt;
For every cylinder there are knock threshold maps. They are essentially the maximum allowable difference between the min and max on the ADC. If the noise spike exceeds the difference, knock is detected.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
The knock control is &amp;quot;adaptive&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are three types of knock trim:&lt;br /&gt;
* Per cylinder trim - the simplest. If during the knock window knock is detected for a cylinder, the timing is retarded next time on this cylinder.&lt;br /&gt;
* Global trim - Once the sum of all per-cylinder trims exceeds a certain threshold, the global trim is increased each time further knock is detected. Global trim is applied uniformly to all cylinders on top of the per-cylinder trim. It is also very slow to reset, and when tuning, you should never ever have so much knock retard, that you are triggering this trim. This is the doomsday scenario, the code that saves your engine on a bad batch of fuel, the code that has saved thousands and thousands of engines from complete destruction.&lt;br /&gt;
* Dynamic trim - each time there is a sharp throttle gradient, there is a time window during which it is checked whether knock is present. If it is, the dynamic trim is incremented. If there isn't, the dynamic trim is decremented. This is like the global trim, in that it gets applied to all cylinders in addition to the global trim and the per cylinder trim. If you have issues with this, modify the fuel/ign chip to retard more on sharp throttle movements, and increase accel enrichment.&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
* Cyl. selective KR activation threshold - This is the MAP value, at which cylinder selective trim becomes active. Below that, it is frozen and not incremented/decremented. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Global KR activation threshold - As above, but for the Global trim. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* P5.5 setting threshold - As above, but for setting P5.5. This pin goes to the IO extender, and it is either the ignition map switch or the fuel enrichment on excessive retard. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Cylinder selective KR sum threshold for global KR - If all per cylinder trims added together exceed this number, gobal trim starts to get incremented.&lt;br /&gt;
* Global KR limit - the maximum limit for Global KR trim.&lt;br /&gt;
* Global KR phase-in/phase-out time - How long without knock until Global KR gets decremented back.&lt;br /&gt;
* Knock detection threshold cyl.1-5 - these are the knock peak-to-peak thresholds also called cylinder noise maps. The second axis is amplification switch status. By modifying these maps incorrectly, you can destroy your engine in one pull. Higher numbers here do not magically mean more power. It simply means your knock will be detected much later, runaway reactions are possible, and the power will be cut very abruptly.&lt;br /&gt;
* Cylinder selective knock retard step - P/T - how many degrees to retard on a knock event. If you are getting runaway knock conditions, try increasing the retard. The retard should be sufficient, that it should not knock again, until the timing has been phased back in.&lt;br /&gt;
* Cylinder selective knock retard step - WOT - same as above, at wide open throttle.&lt;br /&gt;
* Cylinder selective knock retard limit - WOT and P/T - maximum per cylinder knock trim&lt;br /&gt;
* Cylinder selective knock phase-in delay - how quickly to phase the timing back in. If you are getting runaway conditions of multiple knock events in a row on a single cylinder, try to increasing the time.&lt;br /&gt;
* Throttle gradient for dynamic KR activation - The gradient in throttle degrees the throttle has to travel within a second to activate the dynamic KR trim.&lt;br /&gt;
* Dynamic KR duration - the time window during which knock is monitored after a sharp throttle event.&lt;br /&gt;
&lt;br /&gt;
==Tuning==&lt;br /&gt;
Be aware, that you will almost never need to modify this module. It works really well even at 700hp with the standard calibration. If you have issues with knock control, most of the time the issue will not be due to the ECU calibration.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Knock_control&amp;diff=83</id>
		<title>Knock control</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Knock_control&amp;diff=83"/>
		<updated>2017-11-02T01:48:50Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Working principles==&lt;br /&gt;
===Background===&lt;br /&gt;
The M2.3.2 ECU runs a bog-standard distributor based logic in the fuel/ign chip, except that it's output does not go directly to an ignition driver (which it could), but into a solid state distributor/knock controller instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
To give you a bit of history - on the older Motronics, Porsche had the DDE and the KLR, a separate knock control box. M2.3.2 is simply the amalgamation of that, where electronics were downsized and placed into one single unit. It's still two ECU's in one, connected by ribbon cable.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Knock retard===&lt;br /&gt;
The ignition output consists of two steps - pull the ignition line high, wait for the dwell time, pull the ignition line low to fire the spark.&amp;lt;br/&amp;gt;&lt;br /&gt;
This signal gets intercepted by the boost/knock controller. The boost knock/controller looks at the incoming pulse and:&lt;br /&gt;
* Determines which cylinder COP it is supposed to go to.&lt;br /&gt;
* Looks up it's knock array and sees if the timing must be retarded for this cylinder due to knock on previous combustion. If it needs to be retarded, it waits for the amount of crank degrees specified (in 0.5 degree increments).&lt;br /&gt;
* It starts charging the coil.&lt;br /&gt;
* When it sees the signal go low, it waits for the amount of crank degrees specified in the knock array and fires the spark.&lt;br /&gt;
&lt;br /&gt;
Thus in essence, the boost/knock controller is like a piggyback.&lt;br /&gt;
&lt;br /&gt;
===Knock detection===&lt;br /&gt;
There is no knock chip, the entire circuit is visible, it consists of:&lt;br /&gt;
* Level control&lt;br /&gt;
* Switchable capacitors for different noise suppression/filtering&lt;br /&gt;
* Input selection for sensor 1/2&lt;br /&gt;
After the spark is fired, during the knock window, the signal is continuously sampled on the ADC. The min/max are recorded.&lt;br /&gt;
For every cylinder there are knock threshold maps. They are essentially the maximum allowable difference between the min and max on the ADC. If the noise spike exceeds the difference, knock is detected.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
The knock control is &amp;quot;adaptive&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are three types of knock trim:&lt;br /&gt;
* Per cylinder trim - the simplest. If during the knock window knock is detected for a cylinder, the timing is retarded next time on this cylinder.&lt;br /&gt;
* Global trim - Once the sum of all per-cylinder trims exceeds a certain threshold, the global trim is increased each time further knock is detected. Global trim is applied uniformly to all cylinders on top of the per-cylinder trim. It is also very slow to reset, and when tuning, you should never ever have so much knock retard, that you are triggering this trim. This is the doomsday scenario, the code that saves your engine on a bad batch of fuel, the code that has saved thousands and thousands of engines from complete destruction.&lt;br /&gt;
* Dynamic trim - each time there is a sharp throttle gradient, there is a time window during which it is checked whether knock is present. If it is, the dynamic trim is incremented. If there isn't, the dynamic trim is decremented. This is like the global trim, in that it gets applied to all cylinders in addition to the global trim and the per cylinder trim. If you have issues with this, modify the fuel/ign chip to retard more on sharp throttle movements, and increase fuel enrichment.&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
* Cyl. selective KR activation threshold - This is the MAP value, at which cylinder selective trim becomes active. Below that, it is frozen and not incremented/decremented. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Global KR activation threshold - As above, but for the Global trim. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* P5.5 setting threshold - As above, but for setting P5.5. This pin goes to the IO extender, and it is either the ignition map switch or the fuel enrichment on excessive retard. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Cylinder selective KR sum threshold for global KR - If all per cylinder trims added together exceed this number, gobal trim starts to get incremented.&lt;br /&gt;
* Global KR limit - the maximum limit for Global KR trim.&lt;br /&gt;
* Global KR phase-in/phase-out time - How long without knock until Global KR gets decremented back.&lt;br /&gt;
* Knock detection threshold cyl.1-5 - these are the knock peak-to-peak thresholds also called cylinder noise maps. The second axis is amplification switch status. By modifying these maps incorrectly, you can destroy your engine in one pull. Higher numbers here do not magically mean more power. It simply means your knock will be detected much later, runaway reactions are possible, and the power will be cut very abruptly.&lt;br /&gt;
* Cylinder selective knock retard step - P/T - how many degrees to retard on a knock event. If you are getting runaway knock conditions, try increasing the retard. The retard should be sufficient, that it should not knock again, until the timing has been phased back in.&lt;br /&gt;
* Cylinder selective knock retard step - WOT - same as above, at wide open throttle.&lt;br /&gt;
* Cylinder selective knock retard limit - WOT and P/T - maximum per cylinder knock trim&lt;br /&gt;
* Cylinder selective knock phase-in delay - how quickly to phase the timing back in. If you are getting runaway conditions of multiple knock events in a row on a single cylinder, try to increasing the time.&lt;br /&gt;
* Throttle gradient for dynamic KR activation - The gradient in throttle degrees the throttle has to travel within a second to activate the dynamic KR trim.&lt;br /&gt;
* Dynamic KR duration - the time window during which knock is monitored after a sharp throttle event.&lt;br /&gt;
&lt;br /&gt;
==Tuning==&lt;br /&gt;
Be aware, that you will almost never need to modify this module. It works really well even at 700hp with the standard calibration. If you have issues with knock control, most of the time the issue will not be due to the ECU calibration.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Knock_control&amp;diff=82</id>
		<title>Knock control</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Knock_control&amp;diff=82"/>
		<updated>2017-11-02T01:47:19Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Working principles==&lt;br /&gt;
===Background===&lt;br /&gt;
The M2.3.2 ECU runs a bog-standard distributor based logic in the fuel/ign chip, except that it's output does not go directly to an ignition driver (which it could), but into a solid state distributor/knock controller instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
To give you a bit of history - on the older Motronics, Porsche had the DDE and the KLR, a separate knock control box. M2.3.2 is simply the amalgamation of that, where electronics were downsized and placed into one single unit. It's still two ECU's in one, connected by ribbon cable.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Knock retard===&lt;br /&gt;
The ignition output consists of two steps - pull the ignition line high, wait for the dwell time, pull the ignition line low to fire the spark.&amp;lt;br/&amp;gt;&lt;br /&gt;
This signal gets intercepted by the boost/knock controller. The boost knock/controller looks at the incoming pulse and:&lt;br /&gt;
* Determines which cylinder COP it is supposed to go to.&lt;br /&gt;
* Looks up it's knock array and sees if the timing must be retarded for this cylinder due to knock on previous combustion. If it needs to be retarded, it waits for the amount of crank degrees specified (in 0.5 degree increments).&lt;br /&gt;
* It starts charging the coil.&lt;br /&gt;
* When it sees the signal go low, it waits for the amount of crank degrees specified in the knock array and fires the spark.&lt;br /&gt;
&lt;br /&gt;
Thus in essence, the boost/knock controller is like a piggyback.&lt;br /&gt;
&lt;br /&gt;
===Knock detection===&lt;br /&gt;
There is no knock chip, the entire circuit is visible, it consists of:&lt;br /&gt;
* Level control&lt;br /&gt;
* Switchable capacitors for different noise suppression/filtering&lt;br /&gt;
* Input selection for sensor 1/2&lt;br /&gt;
After the spark is fired, during the knock window, the signal is continuously sampled on the ADC. The min/max are recorded.&lt;br /&gt;
For every cylinder there are knock threshold maps. They are essentially the maximum allowable difference between the min and max on the ADC. If the noise spike exceeds the difference, knock is detected.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
The knock control is &amp;quot;adaptive&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are three types of knock trim:&lt;br /&gt;
* Per cylinder trim - the simplest. If during the knock window knock is detected for a cylinder, the timing is retarded next time on this cylinder.&lt;br /&gt;
* Global trim - Once the sum of all per-cylinder trims exceeds a certain threshold, the global trim is increased each time further knock is detect. Global trim is applied uniformly to all cylinders on top of the per-cylinder trim. It is also very slow to reset, and when tuning, you should never ever have so much knock retard, that you are triggering this trim. This is the doomsday scenario, the code that saves your engine on a bad batch of fuel, the code that has saved thousands and thousands of engines from complete destruction.&lt;br /&gt;
* Dynamic trim - each time there is a sharp throttle gradient, there is a time window during which it is checked whether knock is present. If it is, the dynamic trim is incremented. If there isn't, the dynamic trim is decremented. This is like the global trim, in that it gets applied to all cylinders in addition to the global trim and the per cylinder trim. If you have issues with this, modify the fuel/ign chip to retard more on sharp throttle movements, and increase fuel enrichment.&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
* Cyl. selective KR activation threshold - This is the MAP value, at which cylinder selective trim becomes active. Below that, it is frozen and not incremented/decremented. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Global KR activation threshold - As above, but for the Global trim. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* P5.5 setting threshold - As above, but for setting P5.5. This pin goes to the IO extender, and it is either the ignition map switch or the fuel enrichment on excessive retard. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Cylinder selective KR sum threshold for global KR - If all per cylinder trims added together exceed this number, gobal trim starts to get incremented.&lt;br /&gt;
* Global KR limit - the maximum limit for Global KR trim.&lt;br /&gt;
* Global KR phase-in/phase-out time - How long without knock until Global KR gets decremented back.&lt;br /&gt;
* Knock detection threshold cyl.1-5 - these are the knock peak-to-peak thresholds also called cylinder noise maps. The second axis is amplification switch status. By modifying these maps incorrectly, you can destroy your engine in one pull. Higher numbers here do not magically mean more power. It simply means your knock will be detected much later, runaway reactions are possible, and the power will be cut very abruptly.&lt;br /&gt;
* Cylinder selective knock retard step - P/T - how many degrees to retard on a knock event. If you are getting runaway knock conditions, try increasing the retard. The retard should be sufficient, that it should not knock again, until the timing has been phased back in.&lt;br /&gt;
* Cylinder selective knock retard step - WOT - same as above, at wide open throttle.&lt;br /&gt;
* Cylinder selective knock retard limit - WOT and P/T - maximum per cylinder knock trim&lt;br /&gt;
* Cylinder selective knock phase-in delay - how quickly to phase the timing back in. If you are getting runaway conditions of multiple knock events in a row on a single cylinder, try to increasing the time.&lt;br /&gt;
* Throttle gradient for dynamic KR activation - The gradient in throttle degrees the throttle has to travel within a second to activate the dynamic KR trim.&lt;br /&gt;
* Dynamic KR duration - the time window during which knock is monitored after a sharp throttle event.&lt;br /&gt;
&lt;br /&gt;
==Tuning==&lt;br /&gt;
Be aware, that you will almost never need to modify this module. It works really well even at 700hp with the standard calibration. If you have issues with knock control, most of the time the issue will not be due to the ECU calibration.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=81</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=81"/>
		<updated>2017-11-02T00:11:18Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Community */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;There are only two terms:&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time if you are providing a service to others, but not for the firmware enhancements. Continuing to use this website and viewing the information contained marks your acceptance of the terms.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/prj-tech-zone S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Should you require personal consultation from [[User:PRJ|me]] - it is arrangeable, but will be charged at an hourly rate.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Knock control]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=80</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=80"/>
		<updated>2017-11-02T00:10:24Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;There are only two terms:&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time if you are providing a service to others, but not for the firmware enhancements. Continuing to use this website and viewing the information contained marks your acceptance of the terms.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/prj-tech-zone S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Any personal consultation from [[User:PRJ|me]] will be charged at an hourly rate in line with European software consulting fees.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Knock control]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=79</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=79"/>
		<updated>2017-11-02T00:09:36Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;There are only two terms:&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time, but not for the firmware enhancements. Continuing to use this website and viewing the information contained marks your acceptance of the terms.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/prj-tech-zone S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Any personal consultation from [[User:PRJ|me]] will be charged at an hourly rate in line with European software consulting fees.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Knock control]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Knock_control&amp;diff=78</id>
		<title>Knock control</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Knock_control&amp;diff=78"/>
		<updated>2017-11-02T00:07:41Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Tuning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Working principles==&lt;br /&gt;
===Background===&lt;br /&gt;
The M2.3.2 ECU runs a bog-standard distributor based logic in the fuel/ign chip, except that it's output does not go directly to an ignition driver (which it could), but into a solid state distributor/knock controller instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
To give you a bit of history - on the older Motronics, Porsche had the DDE and the KLR, a separate knock control box. M2.3.2 is simply the amalgamation of that, where electronics were downsized and placed into one single unit. It's still two ECU's in one, connected by ribbon cable.&amp;lt;br/&amp;gt;&lt;br /&gt;
All this information was collected by white room reverse engineering assembly code, so this is exactly how it works, no ifs or buts.&lt;br /&gt;
&lt;br /&gt;
===Knock retard===&lt;br /&gt;
The ignition output consists of two steps - pull the ignition line high, wait for the dwell time, pull the ignition line low to fire the spark.&amp;lt;br/&amp;gt;&lt;br /&gt;
This signal gets intercepted by the boost/knock controller. The boost knock/controller looks at the incoming pulse and:&lt;br /&gt;
* Determines which cylinder COP it is supposed to go to.&lt;br /&gt;
* Looks up it's knock array and sees if the timing must be retarded for this cylinder due to knock on previous combustion. If it needs to be retarded, it waits for the amount of crank degrees specified (in 0.5 degree increments).&lt;br /&gt;
* It starts charging the coil.&lt;br /&gt;
* When it sees the signal go low, it waits for the amount of crank degrees specified in the knock array and fires the spark.&lt;br /&gt;
&lt;br /&gt;
Thus in essence, the boost/knock controller is like a piggyback.&lt;br /&gt;
&lt;br /&gt;
===Knock detection===&lt;br /&gt;
There is no knock chip, the entire circuit is visible, it consists of:&lt;br /&gt;
* Level control&lt;br /&gt;
* Switchable capacitors for different noise suppression/filtering&lt;br /&gt;
* Input selection for sensor 1/2&lt;br /&gt;
After the spark is fired, during the knock window, the signal is continuously sampled on the ADC. The min/max are recorded.&lt;br /&gt;
For every cylinder there are knock threshold maps. They are essentially the maximum allowable difference between the min and max on the ADC. If the noise spike exceeds the difference, knock is detected.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
The knock control is &amp;quot;adaptive&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are three types of knock trim:&lt;br /&gt;
* Per cylinder trim - the simplest. If during the knock window knock is detected for a cylinder, the timing is retarded next time on this cylinder.&lt;br /&gt;
* Global trim - Once the sum of all per-cylinder trims exceeds a certain threshold, the global trim is increased each time further knock is detect. Global trim is applied uniformly to all cylinders on top of the per-cylinder trim. It is also very slow to reset, and when tuning, you should never ever have so much knock retard, that you are triggering this trim. This is the doomsday scenario, the code that saves your engine on a bad batch of fuel, the code that has saved thousands and thousands of engines from complete destruction.&lt;br /&gt;
* Dynamic trim - each time there is a sharp throttle gradient, there is a time window during which it is checked whether knock is present. If it is, the dynamic trim is incremented. If there isn't, the dynamic trim is decremented. This is like the global trim, in that it gets applied to all cylinders in addition to the global trim and the per cylinder trim. If you have issues with this, modify the fuel/ign chip to retard more on sharp throttle movements, and increase fuel enrichment.&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
* Cyl. selective KR activation threshold - This is the MAP value, at which cylinder selective trim becomes active. Below that, it is frozen and not incremented/decremented. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Global KR activation threshold - As above, but for the Global trim. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* P5.5 setting threshold - As above, but for setting P5.5. This pin goes to the IO extender, and it is either the ignition map switch or the fuel enrichment on excessive retard. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Cylinder selective KR sum threshold for global KR - If all per cylinder trims added together exceed this number, gobal trim starts to get incremented.&lt;br /&gt;
* Global KR limit - the maximum limit for Global KR trim.&lt;br /&gt;
* Global KR phase-in/phase-out time - How long without knock until Global KR gets decremented back.&lt;br /&gt;
* Knock detection threshold cyl.1-5 - these are the knock peak-to-peak thresholds also called cylinder noise maps. The second axis is amplification switch status. By modifying these maps incorrectly, you can destroy your engine in one pull. Higher numbers here do not magically mean more power. It simply means your knock will be detected much later, runaway reactions are possible, and the power will be cut very abruptly.&lt;br /&gt;
* Cylinder selective knock retard step - P/T - how many degrees to retard on a knock event. If you are getting runaway knock conditions, try increasing the retard. The retard should be sufficient, that it should not knock again, until the timing has been phased back in.&lt;br /&gt;
* Cylinder selective knock retard step - WOT - same as above, at wide open throttle.&lt;br /&gt;
* Cylinder selective knock retard limit - WOT and P/T - maximum per cylinder knock trim&lt;br /&gt;
* Cylinder selective knock phase-in delay - how quickly to phase the timing back in. If you are getting runaway conditions of multiple knock events in a row on a single cylinder, try to increasing the time.&lt;br /&gt;
* Throttle gradient for dynamic KR activation - The gradient in throttle degrees the throttle has to travel within a second to activate the dynamic KR trim.&lt;br /&gt;
* Dynamic KR duration - the time window during which knock is monitored after a sharp throttle event.&lt;br /&gt;
&lt;br /&gt;
==Tuning==&lt;br /&gt;
Be aware, that you will almost never need to modify this module. It works really well even at 700hp with the standard calibration. If you have issues with knock control, most of the time the issue will not be due to the ECU calibration.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Knock_control&amp;diff=77</id>
		<title>Knock control</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Knock_control&amp;diff=77"/>
		<updated>2017-11-02T00:06:59Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;==Working principles== ===Background=== The M2.3.2 ECU runs a bog-standard distributor based logic in the fuel/ign chip, except that it's output does not go directly to an ign...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Working principles==&lt;br /&gt;
===Background===&lt;br /&gt;
The M2.3.2 ECU runs a bog-standard distributor based logic in the fuel/ign chip, except that it's output does not go directly to an ignition driver (which it could), but into a solid state distributor/knock controller instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
To give you a bit of history - on the older Motronics, Porsche had the DDE and the KLR, a separate knock control box. M2.3.2 is simply the amalgamation of that, where electronics were downsized and placed into one single unit. It's still two ECU's in one, connected by ribbon cable.&amp;lt;br/&amp;gt;&lt;br /&gt;
All this information was collected by white room reverse engineering assembly code, so this is exactly how it works, no ifs or buts.&lt;br /&gt;
&lt;br /&gt;
===Knock retard===&lt;br /&gt;
The ignition output consists of two steps - pull the ignition line high, wait for the dwell time, pull the ignition line low to fire the spark.&amp;lt;br/&amp;gt;&lt;br /&gt;
This signal gets intercepted by the boost/knock controller. The boost knock/controller looks at the incoming pulse and:&lt;br /&gt;
* Determines which cylinder COP it is supposed to go to.&lt;br /&gt;
* Looks up it's knock array and sees if the timing must be retarded for this cylinder due to knock on previous combustion. If it needs to be retarded, it waits for the amount of crank degrees specified (in 0.5 degree increments).&lt;br /&gt;
* It starts charging the coil.&lt;br /&gt;
* When it sees the signal go low, it waits for the amount of crank degrees specified in the knock array and fires the spark.&lt;br /&gt;
&lt;br /&gt;
Thus in essence, the boost/knock controller is like a piggyback.&lt;br /&gt;
&lt;br /&gt;
===Knock detection===&lt;br /&gt;
There is no knock chip, the entire circuit is visible, it consists of:&lt;br /&gt;
* Level control&lt;br /&gt;
* Switchable capacitors for different noise suppression/filtering&lt;br /&gt;
* Input selection for sensor 1/2&lt;br /&gt;
After the spark is fired, during the knock window, the signal is continuously sampled on the ADC. The min/max are recorded.&lt;br /&gt;
For every cylinder there are knock threshold maps. They are essentially the maximum allowable difference between the min and max on the ADC. If the noise spike exceeds the difference, knock is detected.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
The knock control is &amp;quot;adaptive&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are three types of knock trim:&lt;br /&gt;
* Per cylinder trim - the simplest. If during the knock window knock is detected for a cylinder, the timing is retarded next time on this cylinder.&lt;br /&gt;
* Global trim - Once the sum of all per-cylinder trims exceeds a certain threshold, the global trim is increased each time further knock is detect. Global trim is applied uniformly to all cylinders on top of the per-cylinder trim. It is also very slow to reset, and when tuning, you should never ever have so much knock retard, that you are triggering this trim. This is the doomsday scenario, the code that saves your engine on a bad batch of fuel, the code that has saved thousands and thousands of engines from complete destruction.&lt;br /&gt;
* Dynamic trim - each time there is a sharp throttle gradient, there is a time window during which it is checked whether knock is present. If it is, the dynamic trim is incremented. If there isn't, the dynamic trim is decremented. This is like the global trim, in that it gets applied to all cylinders in addition to the global trim and the per cylinder trim. If you have issues with this, modify the fuel/ign chip to retard more on sharp throttle movements, and increase fuel enrichment.&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
* Cyl. selective KR activation threshold - This is the MAP value, at which cylinder selective trim becomes active. Below that, it is frozen and not incremented/decremented. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Global KR activation threshold - As above, but for the Global trim. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* P5.5 setting threshold - As above, but for setting P5.5. This pin goes to the IO extender, and it is either the ignition map switch or the fuel enrichment on excessive retard. You MUST change the values here if using a different MAP sensor than the MPXH6400A.&lt;br /&gt;
* Cylinder selective KR sum threshold for global KR - If all per cylinder trims added together exceed this number, gobal trim starts to get incremented.&lt;br /&gt;
* Global KR limit - the maximum limit for Global KR trim.&lt;br /&gt;
* Global KR phase-in/phase-out time - How long without knock until Global KR gets decremented back.&lt;br /&gt;
* Knock detection threshold cyl.1-5 - these are the knock peak-to-peak thresholds also called cylinder noise maps. The second axis is amplification switch status. By modifying these maps incorrectly, you can destroy your engine in one pull. Higher numbers here do not magically mean more power. It simply means your knock will be detected much later, runaway reactions are possible, and the power will be cut very abruptly.&lt;br /&gt;
* Cylinder selective knock retard step - P/T - how many degrees to retard on a knock event. If you are getting runaway knock conditions, try increasing the retard. The retard should be sufficient, that it should not knock again, until the timing has been phased back in.&lt;br /&gt;
* Cylinder selective knock retard step - WOT - same as above, at wide open throttle.&lt;br /&gt;
* Cylinder selective knock retard limit - WOT and P/T - maximum per cylinder knock trim&lt;br /&gt;
* Cylinder selective knock phase-in delay - how quickly to phase the timing back in. If you are getting runaway conditions of multiple knock events in a row on a single cylinder, try to increasing the time.&lt;br /&gt;
* Throttle gradient for dynamic KR activation - The gradient in throttle degrees the throttle has to travel within a second to activate the dynamic KR trim.&lt;br /&gt;
* Dynamic KR duration - the time window during which knock is monitored after a sharp throttle event.&lt;br /&gt;
&lt;br /&gt;
==Tuning==&lt;br /&gt;
Be aware, that you will almost never need to modify this module. It works really well even at 700hp with the standard calibration. If you have issues with knock control, most of the time the issue will not be the ECU.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Ignition&amp;diff=76</id>
		<title>Ignition</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Ignition&amp;diff=76"/>
		<updated>2017-11-01T23:31:30Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;==Algorithm== Ignition is fairly straightforward, you can specify up to -22.5 degrees of retard in a map cell, or up to 168.75 of advance.&amp;lt;br/&amp;gt; It all gets added up and then o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Algorithm==&lt;br /&gt;
Ignition is fairly straightforward, you can specify up to -22.5 degrees of retard in a map cell, or up to 168.75 of advance.&amp;lt;br/&amp;gt;&lt;br /&gt;
It all gets added up and then output 5 times per cycle.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is a nasty &amp;quot;ignition overboost&amp;quot; function that has been patched out of the ECU - on a stock ECU ignition is randomly advanced and pulled back when hard knock is detected. Good on stock cal, when you have a lot of room left, very bad on a tuned car causing engine damage.&lt;br /&gt;
&lt;br /&gt;
==Timing maps==&lt;br /&gt;
* Ignition - Idle, closed throttle - used for fast-path idle control, it is read when the closed throttle switch is activated on the TPS. Set this map so, that you have some torque reserve, by setting the timing significantly later than MBT. Change the axis on the map so, that your ignition timing is what you would like to run at your target hot idle. Make ignition quickly ramp to MBT 200-300 RPM below it, and make it quickly ramp to a retarded state above it. Now you got closed loop ignition based idle control. This is used for the fast control, the ISV is the slow control, and will adjust in closed loop to your idle setpoint.&lt;br /&gt;
* Ignition - Idle, warmup - used during the warmup stage, when engine is not yet hot. Tune it to follow your idle target map.&lt;br /&gt;
* Ignition - P/T, no knock - Main ignition map.&lt;br /&gt;
* Ignition - P/T, no knock, race fuel - Main ignition map when map switch active.&lt;br /&gt;
* Ignition - P/T, knock level 1 - Gets triggered once knock retard exceeds a certain threshold, the bit is read from the I/O extender and is transferred to it from the fuel/ign chip.&lt;br /&gt;
* Ignition - P/T, overrun - used when throttle is shut at high RPM. Tune it to be in-line with your fuel cut/resume.&lt;br /&gt;
* Ignition - IAT correction - IAT based ignition timing correction.&lt;br /&gt;
* Ignition - Load threshold for IAT correction - minimum LOAD for the IAT timing correction to be active&lt;br /&gt;
* Ignition - CoolantxIAT correction/CAT heating - can be zeroed, used for cat heating at the expense of fuel efficiency.&lt;br /&gt;
* Retard on positive load delta - This is how much to retard ignition on TPS delta/sharp throttle movements. It is instantaneous and lasts for one cycle. Useful because otherwise it is very easy to have knock on sharp throttle movements.&lt;br /&gt;
&lt;br /&gt;
==Dwell==&lt;br /&gt;
The Dwell map specifies the coil charge time. Below 500rpm there is some compensation for the way it is calculated, so the values are not exactly 100% meaningful. After 500 RPM - what you see is what you get.&amp;lt;br/&amp;gt;&lt;br /&gt;
In the map the dwell time is specified in crank degrees, but it has been converted to milliseconds with the help of TunerPro, as it is much easier to work with that way.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=75</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=75"/>
		<updated>2017-11-01T17:25:46Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are only two conditions:&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time, but not for the firmware enhancements.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/prj-tech-zone S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Any personal consultation from [[User:PRJ|me]] will be charged at an hourly rate in line with European software consulting fees.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Knock control]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Fuel&amp;diff=74</id>
		<title>Fuel</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Fuel&amp;diff=74"/>
		<updated>2017-11-01T17:19:55Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
In M2.3.2 LOAD is the injection time in milliseconds to reach lambda 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Because rescaling all LOAD on every axis every time you change injectors is an insane amount of work, I took a different approach.&amp;lt;br/&amp;gt;&lt;br /&gt;
LOAD is stored internally as a 16 bit variable, but the map axes only go up to 255, because they are 8 bit. This does not mean that you will have any issues after going past 255 LOAD. The table lookup will simply read the last column, but because the internal LOAD (that is also reported by the datalogger) is 16 bit and essentially unlimited, all fueling and timing will still be fine. Also do keep in mind that 255 LOAD is roughly 2.7-2.8 bar of boost, and the MPXH6400A starts being insufficient. It is possible to work around this, by rescaling FGAT0 and LOAD, just as it is possible to linearize an 8 bar MAP sensor.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
The injection pulsewidth is calculated as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;IPW = LOAD*FGAT0*ENRICHMENT+TVUB&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Enrichment calculation works as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FACTOR = (OLD_FACTOR * NEW_FACTOR) &amp;lt;&amp;lt; 7&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
What this means is - if the new factor is more than 128, then fuel is enriched. If the new factor is less than 128, fuel is leaned, and if the factor is exactly 128, then nothing happens at all.&amp;lt;br/&amp;gt;&lt;br /&gt;
The objective is to calibrate the ECU so, that with a hot engine when ENRICHMENT is 128, then lambda = 1. To achieve this:&lt;br /&gt;
* We must pick the correct injector constant (FGAT0)&lt;br /&gt;
* Pick the correct injector deadtime (TVUB)&lt;br /&gt;
* Calibrate the VE so that LOAD is accurate to deliver a lambda = 1 (or 14.7 AFR) mixture when enrichment is 128&lt;br /&gt;
You can verify this is the case, when your real AFR matches REQ_AFR. REQ_AFR is nothing other than the sum of all enrichment.&lt;br /&gt;
&lt;br /&gt;
== Injector constant FGAT0 ==&lt;br /&gt;
The XDF has convenience functions, so you can just edit the value that represents the FPR you are using (3 bar, 3.8 bar, 4 bar), and set injector size in CC.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you have a FPR with some other pressure, use the 3 bar FPR variant, and multiply the injector size of your injectors in cc additionally by &amp;lt;b&amp;gt;sqrt(YOUR_FPR/3)&amp;lt;/b&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Injector latency/deadtime ==&lt;br /&gt;
Injector latency is hopefully provided by the manufacturer. If you have to find it empirically, you can see if it is more or less right, by revving the engine on idle with no load. As RPM rises and load reduces, the AFR_REQ should still match. This assumes a semi-decently calibrated VE map of course.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an injector minimum pulsewidth constant, but 0.5ms should be OK even for huge injectors.&lt;br /&gt;
&lt;br /&gt;
== Main fuel enrichment ==&lt;br /&gt;
* Fuel enrichment P/T - main fuel enrichment map. Target AFR.&lt;br /&gt;
* Fuel enrichment P/T - Race fuel - Map switched fuel map.&lt;br /&gt;
* Fuel enrichment - IATxRPM correction. IAT based correction. Use to enrich at high IAT. This map is also used to compensate for lean conditions due to heat soak when the car has been left for a while, and then restarted with the engine hot and the IAT sensor reading ridiculous numbers. Thus the fueling corrections at 1000 RPM and 45+C IAT.&lt;br /&gt;
* Fuel enrichment - continuous knock. If you have consistent knocking and the total knock correction over all cylinders exceeds a certain number, then the knock/boost chip sends a signal to the I/O extender, which the fuel/ign chip reads, and enriches fuel by the amount in the map. This is used to combat high EGT due to late ignition.&lt;br /&gt;
&lt;br /&gt;
== Warmup enrichment ==&lt;br /&gt;
This is done a little bit differently. The formula for the final factor is not &amp;lt;&amp;lt;7 (/128), but &amp;lt;&amp;lt;8 (/256)+128.&amp;lt;br/&amp;gt;&lt;br /&gt;
The two maps are multiplied between each other, the result is divided by 256 and added to 128. This makes it so, that these maps can only ever be used to add fuel, never to subtract it.&amp;lt;br/&amp;gt;&lt;br /&gt;
The maps are:&lt;br /&gt;
* Warmup enrichment - Coolant x IAT - temperature based enrichment&lt;br /&gt;
* Warmup enrichment - IDC - RPM by LOAD enrichment&lt;br /&gt;
&lt;br /&gt;
== Acceleration enrichment ==&lt;br /&gt;
=== Working principles ===&lt;br /&gt;
Acceleration enrichment has been rewritten from standard.&amp;lt;br/&amp;gt;&lt;br /&gt;
The standard enrichment works based on delta MAF, but because the MAP sensor is much slower in reaction than the MAF, the delta MAP enrichment does not really work that well.&amp;lt;br/&amp;gt;&lt;br /&gt;
So the routine was rewritten to use Delta TPS instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
The basic principle is that the enrichment event happens on the next injection event after a high TPS delta. If the TPS delta subsides, it tapers off over each injection event, until it is zero. If the TPS delta is still there, it is recalculated again over and over.&lt;br /&gt;
=== Maps ===&lt;br /&gt;
* Load gradient multiplier for wall film - This map is Delta TPS, you can log DTPS to see it. Basically it is an amplification map - the faster and harder you hit the throttle, the more enrichment. The first few values have to be zero, to avoid unnecessary enrichment and jitter. With the values at zero no enrichment is performed.&lt;br /&gt;
* Number of ignition events for wall film enrichment - this is a time component, over how many injections/ignitions the additional enrichment should taper, always use the SD version.&lt;br /&gt;
* Wall film enrichment taper amount per ignition - This gets subtracted per ignition event from the gradient multiplier map.&lt;br /&gt;
* Initial wall film reduction % after ignition events passed - How much to subtract after the ignition events ran out - usually a high enough number to go straight to 0.&lt;br /&gt;
* Wall film enrichment (RPM x LOAD) - RPM x LOAD component of the enrichment amount. Calculated the same way as warmup enrichment, paired with the Coolant x RPM map.&lt;br /&gt;
* Wall film enrichment (Coolant x RPM) - RPM x Coolant component of the enrichment amount. Calculated the same way as warmup enrichment, paired with the RPM x LOAD map.&lt;br /&gt;
&lt;br /&gt;
== Crank fuel ==&lt;br /&gt;
This is a multiplier for the cranking fuel. Be careful with this, as you can request 25x fuel enrichment here and flood your engine completely if you are not careful. The standard map is pretty good and will work down to -30C.&lt;br /&gt;
&lt;br /&gt;
== Consumption signal ==&lt;br /&gt;
The consumption signal should be corrected whenever the injectors are changed, else you are going to have weird numbers on the consumption display.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also a consumption signal multiplier, that multiplies the signal by 2 each time it is incremented.&amp;lt;br/&amp;gt;&lt;br /&gt;
To recalculate the consumption signal, take the old number, and multiply it by the factor, that your injectors are bigger/smaller than ADU injectors (which are 360cc at 3 BAR and ADU uses a 3.8 BAR FPR).&amp;lt;br/&amp;gt;&lt;br /&gt;
This should get you in the ball park, but basically you can also eventually just drive and compare actual and reported consumption and then multiply this number by the error you have in %.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Fuel&amp;diff=73</id>
		<title>Fuel</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Fuel&amp;diff=73"/>
		<updated>2017-11-01T16:19:27Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
In M2.3.2 LOAD is the injection time in milliseconds to reach lambda 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Because rescaling all LOAD on every axis every time you change injectors is an insane amount of work, I took a different approach.&amp;lt;br/&amp;gt;&lt;br /&gt;
LOAD is stored internally as a 16 bit variable, but the map axes only go up to 255, because they are 8 bit. This does not mean that you will have any issues after going past 255 LOAD. The table lookup will simply read the last column, but because the internal LOAD (that is also reported by the datalogger) is 16 bit and essentially unlimited, all fueling and timing will still be fine. Also do keep in mind that 255 LOAD is roughly 2.7-2.8 bar of boost, and the MPXH6400A starts being insufficient. It is possible to work around this, by rescaling FGAT0 and LOAD, just as it is possible to linearize an 8 bar MAP sensor.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
The injection pulsewidth is calculated as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;IPW = LOAD*FGAT0*ENRICHMENT+TVUB&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Enrichment calculation works as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FACTOR = (OLD_FACTOR * NEW_FACTOR) &amp;lt;&amp;lt; 7&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
What this means is - if the new factor is more than 128, then fuel is enriched. If the new factor is less than 128, fuel is leaned, and if the factor is exactly 128, then nothing happens at all.&amp;lt;br/&amp;gt;&lt;br /&gt;
The objective is to calibrate the ECU so, that with a hot engine when ENRICHMENT is 128, then lambda = 1. To achieve this:&lt;br /&gt;
* We must pick the correct injector constant (FGAT0)&lt;br /&gt;
* Pick the correct injector deadtime (TVUB)&lt;br /&gt;
* Calibrate the VE so that LOAD is accurate to deliver a lambda = 1 (or 14.7 AFR) mixture when enrichment is 128&lt;br /&gt;
You can verify this is the case, when your real AFR matches REQ_AFR. REQ_AFR is nothing other than the sum of all enrichment.&lt;br /&gt;
&lt;br /&gt;
== Injector constant FGAT0 ==&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Fuel&amp;diff=72</id>
		<title>Fuel</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Fuel&amp;diff=72"/>
		<updated>2017-11-01T16:18:38Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
In M2.3.2 LOAD is the injection time in milliseconds to reach lambda 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Because rescaling all LOAD on every axis every time you change injectors is an insane amount of work, I took a different approach.&amp;lt;br/&amp;gt;&lt;br /&gt;
LOAD is stored internally as a 16 bit variable, but the map axes only go up to 255, because they are 8 bit. This does not mean that you will have any issues after going past 255 LOAD. The table lookup will simply read the last column, but because the internal LOAD (that is also reported by the datalogger) is 16 bit and essentially unlimited, all fueling and timing will still be fine. Also do keep in mind that 255 LOAD is roughly 2.7-2.8 bar of boost, and the MPXH6400A starts being insufficient. It is possible to work around this, by rescaling FGAT0 and LOAD, just as it is possible to linearize an 8 bar MAP sensor.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
The injection pulsewidth is calculated as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;IPW = LOAD*FGAT0*ENRICHMENT+TVUB&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Enrichment calculation works as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FACTOR = (OLD_FACTOR * NEW_FACTOR) &amp;lt;&amp;lt; 7&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
What this means is - if the new factor is more than 128, then fuel is enriched. If the new factor is less than 128, fuel is leaned, and if the factor is exactly 128, then nothing happens at all.&amp;lt;br/&amp;gt;&lt;br /&gt;
The objective is to calibrate the ECU so, that with a hot engine when ENRICHMENT is 128, then lambda = 1. To achieve this:&lt;br /&gt;
* We must pick the correct injector constant (FGAT0)&lt;br /&gt;
* Pick the correct injector deadtime (TVUB)&lt;br /&gt;
* Calibrate the VE so that LOAD is accurate to deliver a lambda = 1 (or 14.7 AFR) mixture when enrichment is 128&lt;br /&gt;
You can verify this is the case, when your real AFR matches REQ_AFR.&lt;br /&gt;
&lt;br /&gt;
== Injector constant FGAT0 ==&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Fuel&amp;diff=71</id>
		<title>Fuel</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Fuel&amp;diff=71"/>
		<updated>2017-11-01T16:18:13Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;== Introduction == In M2.3.2 LOAD is the injection time in milliseconds to reach lambda 1.&amp;lt;br/&amp;gt; Because rescaling all LOAD on every axis every time you change injectors is an...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
In M2.3.2 LOAD is the injection time in milliseconds to reach lambda 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Because rescaling all LOAD on every axis every time you change injectors is an insane amount of work, I took a different approach.&amp;lt;br/&amp;gt;&lt;br /&gt;
LOAD is stored internally as a 16 bit variable, but the map axes only go up to 255, because they are 8 bit. This does not mean that you will have any issues after going past 255 LOAD. The table lookup will simply read the last column, but because the internal LOAD (that is also reported by the datalogger) is 16 bit and essentially unlimited, all fueling and timing will still be fine. Also do keep in mind that 255 LOAD is roughly 2.7-2.8 bar of boost, and the MPXH6400A starts being insufficient. It is possible to work around this, by rescaling FGAT0 and LOAD, just as it is possible to linearize an 8 bar MAP sensor.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
The injection pulsewidth is calculated as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;IPW = LOAD*FGAT0*ENRICHMENT+TVUB&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Enrichment calculation works as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FACTOR = (OLD_FACTOR * NEW_FACTOR) &amp;lt;&amp;lt; 7&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
What this means is - if the new factor is more than 128, then fuel is enriched. If the new factor is less than 128, fuel is leaned, and if the factor is exactly 128, then nothing happens at all.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The objective is to calibrate the ECU so, that with a hot engine when ENRICHMENT is 128, then lambda = 1. To achieve this:&lt;br /&gt;
* We must pick the correct injector constant (FGAT0)&lt;br /&gt;
* Pick the correct injector deadtime (TVUB)&lt;br /&gt;
* Calibrate the VE so that LOAD is accurate to deliver a lambda = 1 (or 14.7 AFR) mixture when enrichment is 128&lt;br /&gt;
You can verify this is the case, when your real AFR matches REQ_AFR.&lt;br /&gt;
&lt;br /&gt;
== Injector constant FGAT0 ==&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Speed_Density&amp;diff=70</id>
		<title>Speed Density</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Speed_Density&amp;diff=70"/>
		<updated>2017-11-01T15:55:49Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* VE Table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Algorithm ==&lt;br /&gt;
The MAP sensor is sampled crank-synchronously at fixed angles, five times per cycle, at 10bit precision, making the resolution 0.005V or 0.4kPa with a 400kPa sensor&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LOAD = FILTER((VE(MAP,RPM)+VE_ADDEND)*VE_MULT*IATCORR*MAP)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VE Table ==&lt;br /&gt;
[[File:ve_700hp.png|thumb|VE table at 700hp]]&lt;br /&gt;
This table shows how much air is in the cylinder at a given pressure. A few tricks have been done to have very high resolution in 8 bit mode:&lt;br /&gt;
* The table values are shifted by &amp;quot;VE Addend&amp;quot;&lt;br /&gt;
* The table values are multiplied by a factor named &amp;quot;VE multiplier&amp;quot;&lt;br /&gt;
* The VE multiplier is calculated using an exponent and a mantissa.&lt;br /&gt;
Tuning this table goes as follows:&lt;br /&gt;
* Make sure your injectors and injector deadtimes are set at least semi-correctly, or this table will look all sorts of messed up.&lt;br /&gt;
* Log REQ_AFR and compare it to actual AFR. Modify this table so that they match.&lt;br /&gt;
* As a sanity check, consider that at idle with consumers switched off, you should have roughly 18-21 LOAD if you are not running wild cams. Most setups will never need to alter anything but the VE table itself.&lt;br /&gt;
* If you run out of room at the low end (values at 0 and still too rich), but you still have room on top (for example max value is 200), subtract a number from VE Addend, and add it to the entire table. Now the result is the same as before, but you have more room to tune. Do the same if you run out of room at the top end, but have room at the bottom end.&lt;br /&gt;
* If you run out of dynamic range, meaning both the top end and bottom end - you can multiply up the VE multiplier and divide the VE addend and the entire table by the number you multiplied the multiplier by. Also works into the opposite direction if you find that you have way too much range and not enough precision.&lt;br /&gt;
&lt;br /&gt;
== IAT correction ==&lt;br /&gt;
This is a multiplicative factor, that is needed to correct for the density of air due to the ideal gas law, the axis is IAT.&amp;lt;br/&amp;gt;&lt;br /&gt;
It's general shape is governed by &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;PV = nRT&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;, but some of it is empirical as well, due to the location of the sensor and heatsoak.&lt;br /&gt;
&lt;br /&gt;
== Load filter ==&lt;br /&gt;
This filter corrects for jitter and limits LOAD rate of change. Axes are RPMxLOAD. 255 means straight-through, 0 means LOAD can not change. The filter limits LOAD delta to X/255*delta.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an exception - if the load jump is bigger than the constant for the maximum positive delta, then to prevent a lean condition, the filter is disabled and the LOAD is directly set to the new computed LOAD.&amp;lt;br/&amp;gt;&lt;br /&gt;
You should usually not have to modify this, but if you do, keep in mind that because the LOAD calculation is crank-synchronous (five times per rotation), then at 6000 rpm the filter should be set to half of 3000 rpm for the same effect.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Speed_Density&amp;diff=69</id>
		<title>Speed Density</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Speed_Density&amp;diff=69"/>
		<updated>2017-11-01T15:53:00Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Load filter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Algorithm ==&lt;br /&gt;
The MAP sensor is sampled crank-synchronously at fixed angles, five times per cycle, at 10bit precision, making the resolution 0.005V or 0.4kPa with a 400kPa sensor&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LOAD = FILTER((VE(MAP,RPM)+VE_ADDEND)*VE_MULT*IATCORR*MAP)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VE Table ==&lt;br /&gt;
[[File:ve_700hp.png|thumb|VE table at 700hp]]&lt;br /&gt;
This table shows how much air is in the cylinder at a given pressure. A few tricks have been done to have very high resolution in 8 bit mode:&lt;br /&gt;
* The table values are shifted by &amp;quot;VE Addend&amp;quot;&lt;br /&gt;
* The table values are multiplied by a factor named &amp;quot;VE multiplier&amp;quot;&lt;br /&gt;
* The VE multiplier is calculated using an exponent and a mantissa.&lt;br /&gt;
Tuning this table goes as follows:&lt;br /&gt;
* Make sure your injectors and injector deadtimes are set at least semi-correctly, or this table will look all sorts of messed up.&lt;br /&gt;
* Log REQ_AFR and compare it to actual AFR. Modify this table so that they match.&lt;br /&gt;
* As a sanity check, consider that at idle with consumers switched off, you should have roughly 18-21 LOAD if you are not running wild cams. Most setups will never need to alter anything but the VE table itself.&lt;br /&gt;
* If you run out room at the low end (values at 0 and still too rich), but you still have room on top (for example max value is 200), subtract a number from VE Addend, and add it to the entire table. Now the result is the same as before, but you have more room to tune. Do the same if you run out of room at the top end, but have room at the bottom end.&lt;br /&gt;
* If you run out of dynamic range, meaning both the top end and bottom end - you can multiply up the VE multiplier and divide the VE addend and the entire table by the number you multiplied the multiplier by. Also works into the opposite direction if you find that you have way too much range and not enough precision.&lt;br /&gt;
&lt;br /&gt;
== IAT correction ==&lt;br /&gt;
This is a multiplicative factor, that is needed to correct for the density of air due to the ideal gas law, the axis is IAT.&amp;lt;br/&amp;gt;&lt;br /&gt;
It's general shape is governed by &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;PV = nRT&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;, but some of it is empirical as well, due to the location of the sensor and heatsoak.&lt;br /&gt;
&lt;br /&gt;
== Load filter ==&lt;br /&gt;
This filter corrects for jitter and limits LOAD rate of change. Axes are RPMxLOAD. 255 means straight-through, 0 means LOAD can not change. The filter limits LOAD delta to X/255*delta.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an exception - if the load jump is bigger than the constant for the maximum positive delta, then to prevent a lean condition, the filter is disabled and the LOAD is directly set to the new computed LOAD.&amp;lt;br/&amp;gt;&lt;br /&gt;
You should usually not have to modify this, but if you do, keep in mind that because the LOAD calculation is crank-synchronous (five times per rotation), then at 6000 rpm the filter should be set to half of 3000 rpm for the same effect.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Speed_Density&amp;diff=68</id>
		<title>Speed Density</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Speed_Density&amp;diff=68"/>
		<updated>2017-11-01T15:52:14Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Load filter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Algorithm ==&lt;br /&gt;
The MAP sensor is sampled crank-synchronously at fixed angles, five times per cycle, at 10bit precision, making the resolution 0.005V or 0.4kPa with a 400kPa sensor&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LOAD = FILTER((VE(MAP,RPM)+VE_ADDEND)*VE_MULT*IATCORR*MAP)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VE Table ==&lt;br /&gt;
[[File:ve_700hp.png|thumb|VE table at 700hp]]&lt;br /&gt;
This table shows how much air is in the cylinder at a given pressure. A few tricks have been done to have very high resolution in 8 bit mode:&lt;br /&gt;
* The table values are shifted by &amp;quot;VE Addend&amp;quot;&lt;br /&gt;
* The table values are multiplied by a factor named &amp;quot;VE multiplier&amp;quot;&lt;br /&gt;
* The VE multiplier is calculated using an exponent and a mantissa.&lt;br /&gt;
Tuning this table goes as follows:&lt;br /&gt;
* Make sure your injectors and injector deadtimes are set at least semi-correctly, or this table will look all sorts of messed up.&lt;br /&gt;
* Log REQ_AFR and compare it to actual AFR. Modify this table so that they match.&lt;br /&gt;
* As a sanity check, consider that at idle with consumers switched off, you should have roughly 18-21 LOAD if you are not running wild cams. Most setups will never need to alter anything but the VE table itself.&lt;br /&gt;
* If you run out room at the low end (values at 0 and still too rich), but you still have room on top (for example max value is 200), subtract a number from VE Addend, and add it to the entire table. Now the result is the same as before, but you have more room to tune. Do the same if you run out of room at the top end, but have room at the bottom end.&lt;br /&gt;
* If you run out of dynamic range, meaning both the top end and bottom end - you can multiply up the VE multiplier and divide the VE addend and the entire table by the number you multiplied the multiplier by. Also works into the opposite direction if you find that you have way too much range and not enough precision.&lt;br /&gt;
&lt;br /&gt;
== IAT correction ==&lt;br /&gt;
This is a multiplicative factor, that is needed to correct for the density of air due to the ideal gas law, the axis is IAT.&amp;lt;br/&amp;gt;&lt;br /&gt;
It's general shape is governed by &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;PV = nRT&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;, but some of it is empirical as well, due to the location of the sensor and heatsoak.&lt;br /&gt;
&lt;br /&gt;
== Load filter ==&lt;br /&gt;
This filter corrects for jitter and limits LOAD rate of change. Axes are RPMxLOAD. 255 means straight-through, 0 means LOAD can not change. The filter limits LOAD delta to X/255*delta.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an exception - if the load jump is bigger than the constant for the maximum positive delta, then to prevent a lean condition, the filter is disabled and the LOAD is directly set to the new computed LOAD.&amp;lt;br/&amp;gt;&lt;br /&gt;
You should usually not have to modify this, but if you do, keep in mind that because the load calculation is crank-synchronous (five times per rotation), then at 6000 rpm the filter should be set to half of 3000 rpm for the same effect.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Speed_Density&amp;diff=67</id>
		<title>Speed Density</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Speed_Density&amp;diff=67"/>
		<updated>2017-11-01T15:51:48Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Algorithm ==&lt;br /&gt;
The MAP sensor is sampled crank-synchronously at fixed angles, five times per cycle, at 10bit precision, making the resolution 0.005V or 0.4kPa with a 400kPa sensor&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LOAD = FILTER((VE(MAP,RPM)+VE_ADDEND)*VE_MULT*IATCORR*MAP)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VE Table ==&lt;br /&gt;
[[File:ve_700hp.png|thumb|VE table at 700hp]]&lt;br /&gt;
This table shows how much air is in the cylinder at a given pressure. A few tricks have been done to have very high resolution in 8 bit mode:&lt;br /&gt;
* The table values are shifted by &amp;quot;VE Addend&amp;quot;&lt;br /&gt;
* The table values are multiplied by a factor named &amp;quot;VE multiplier&amp;quot;&lt;br /&gt;
* The VE multiplier is calculated using an exponent and a mantissa.&lt;br /&gt;
Tuning this table goes as follows:&lt;br /&gt;
* Make sure your injectors and injector deadtimes are set at least semi-correctly, or this table will look all sorts of messed up.&lt;br /&gt;
* Log REQ_AFR and compare it to actual AFR. Modify this table so that they match.&lt;br /&gt;
* As a sanity check, consider that at idle with consumers switched off, you should have roughly 18-21 LOAD if you are not running wild cams. Most setups will never need to alter anything but the VE table itself.&lt;br /&gt;
* If you run out room at the low end (values at 0 and still too rich), but you still have room on top (for example max value is 200), subtract a number from VE Addend, and add it to the entire table. Now the result is the same as before, but you have more room to tune. Do the same if you run out of room at the top end, but have room at the bottom end.&lt;br /&gt;
* If you run out of dynamic range, meaning both the top end and bottom end - you can multiply up the VE multiplier and divide the VE addend and the entire table by the number you multiplied the multiplier by. Also works into the opposite direction if you find that you have way too much range and not enough precision.&lt;br /&gt;
&lt;br /&gt;
== IAT correction ==&lt;br /&gt;
This is a multiplicative factor, that is needed to correct for the density of air due to the ideal gas law, the axis is IAT.&amp;lt;br/&amp;gt;&lt;br /&gt;
It's general shape is governed by &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;PV = nRT&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;, but some of it is empirical as well, due to the location of the sensor and heatsoak.&lt;br /&gt;
&lt;br /&gt;
== Load filter ==&lt;br /&gt;
This filter corrects for jitter and limits LOAD rate of change. Axes are RPMxLOAD. 255 means straight-through, 0 means load can not change. The filter limits LOAD delta to X/255*delta.&amp;lt;br/&amp;gt;&lt;br /&gt;
There is also an exception - if the load jump is bigger than the constant for the maximum positive delta, then to prevent a lean condition, the filter is disabled and the LOAD is directly set to the new computed LOAD.&amp;lt;br/&amp;gt;&lt;br /&gt;
You should usually not have to modify this, but if you do, keep in mind that because the load calculation is crank-synchronous (five times per rotation), then at 6000 rpm the filter should be set to half of 3000 rpm for the same effect.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=File:Ve_700hp.png&amp;diff=66</id>
		<title>File:Ve 700hp.png</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=File:Ve_700hp.png&amp;diff=66"/>
		<updated>2017-11-01T15:26:52Z</updated>

		<summary type="html">&lt;p&gt;PRJ: VE map from highly tuned 700hp 2.2T engine&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VE map from highly tuned 700hp 2.2T engine&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Speed_Density&amp;diff=65</id>
		<title>Speed Density</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Speed_Density&amp;diff=65"/>
		<updated>2017-11-01T15:18:15Z</updated>

		<summary type="html">&lt;p&gt;PRJ: Created page with &amp;quot;== Algorithm == The MAP sensor is sampled crank-synchronously. Five times per cycle.&amp;lt;br/&amp;gt; &amp;lt;b&amp;gt;LOAD = FILTER((VE(MAP,RPM)*VE_MULT+VE_ADDEND)*MAP)&amp;lt;/b&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Algorithm ==&lt;br /&gt;
The MAP sensor is sampled crank-synchronously. Five times per cycle.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LOAD = FILTER((VE(MAP,RPM)*VE_MULT+VE_ADDEND)*MAP)&amp;lt;/b&amp;gt;&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Main_Page&amp;diff=64</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Main_Page&amp;diff=64"/>
		<updated>2017-11-01T15:12:35Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Wiki deals with modifying the Bosch M2.3.2 Engine Control Unit both software and hardware wise for aftermarket operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;The author(s) of this Wiki make no warranty, expressed or implied, as to the results obtained from the use of the information on the website, nor can they be held liable for any third-party claims or losses of any damages.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[User:PRJ|I]] have spent many years working out the intricacies of this ECU. Additions both hardware and software wise were developed by [[User:PRJ|me]] to make it more than the sum of it's parts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Because there is no longer any commercial interest in modifying these ECU's, I release all of [[User:PRJ|my]] work for free.&amp;lt;br /&amp;gt;&lt;br /&gt;
Using this information you can modify the standard ECU to efficiently and reliably control the Audi 2.2T engine at more than the triple of the factory rated output.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are only two conditions:&amp;lt;br/&amp;gt;&lt;br /&gt;
* Any derivative works or tools using this information &amp;lt;b&amp;gt;MUST&amp;lt;/b&amp;gt; be licensed under GPLv3, this also applies to third party applications using the fast diag datastream.&lt;br /&gt;
* Do not remove the &amp;quot;prjmod&amp;quot; mark and firmware revision that are shown in the component box of VCDS. The reasons are:&lt;br /&gt;
** Ability to quickly check firmware revision number via VCDS, and see if any updates are available.&lt;br /&gt;
** Attribution - you will be named and shamed if you try to pass this off as your own work, because if you had the ability to rewrite the load acquisition from scratch you would not be needing this.&amp;lt;br/&amp;gt;&lt;br /&gt;
This means you are free to charge for your time, but not for the firmware enhancements.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
Discussion shall take place at the relevant [https://www.s2forum.com/forum/technical/prj-tech-zone S2Forum subforum]. &amp;lt;b&amp;gt;Any attempts to contact [[User:PRJ|me]] directly about this topic through other means will be ignored&amp;lt;/b&amp;gt;, except for developers who can freely read 8051 assembler and wish to contribute to the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Any personal consultation from [[User:PRJ|me]] will be charged at an hourly rate in line with European software consulting fees.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
* [[Hardware architecture]]&lt;br /&gt;
* [[Hardware limitations]]&lt;br /&gt;
* [[Requirements and modifications for running prjmod]]&lt;br /&gt;
* [[Realtime emulation]]&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
* [[prjmod features]]&lt;br /&gt;
* [[Toolchain setup]]&lt;br /&gt;
* Tuning&lt;br /&gt;
** [[Speed Density]]&lt;br /&gt;
** [[Fuel]]&lt;br /&gt;
** [[Ignition]]&lt;br /&gt;
** [[Boost control]]&lt;br /&gt;
** [[Idle control]]&lt;br /&gt;
** [[Safety limits]]&lt;br /&gt;
** [[LC/NLS]]&lt;br /&gt;
** [[Map switching]]&lt;br /&gt;
** [[Sensor linearization]]&lt;br /&gt;
* [[Software development]]&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Toolchain_setup&amp;diff=63</id>
		<title>Toolchain setup</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Toolchain_setup&amp;diff=63"/>
		<updated>2017-11-01T15:10:40Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initial setup ==&lt;br /&gt;
Download the following:&lt;br /&gt;
* [http://www.tunerpro.net/ TunerPro RT]&lt;br /&gt;
* [http://www.devtechnics.com/winlog.htm WinLog] or [https://www.14point7.com/pages/software-and-documentation Winlog 14point7]. The latter has no nag screens, and the software is abandonware anyway at this point.&lt;br /&gt;
* Clone or download as &amp;quot;zip&amp;quot; the release folder on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Setting up TunerPro RT ==&lt;br /&gt;
* After installing, edit the TunerPro shortcut and add the &amp;lt;b&amp;gt;-multiinstance&amp;lt;/b&amp;gt; command line parameter, this will allow you to open multiple TunerPro instances at the same time.&lt;br /&gt;
* Copy the checksum plugin (M232csum.dll) to &amp;lt;b&amp;gt;My Documents\TunerPro Files\Plugins&amp;lt;/b&amp;gt;. If you are using Windows 10 it can also be in your OneDrive folder. Best way to see is to start TunerPro once and exit.&lt;br /&gt;
* Load the .xdf file (XDF -&amp;gt; Select XDF)&lt;br /&gt;
* Load the acquisition file (Acquisition -&amp;gt; Load Definition File)&lt;br /&gt;
* Load the binary file (File -&amp;gt; Open Bin)&lt;br /&gt;
&lt;br /&gt;
== Setting up WinLog ==&lt;br /&gt;
* Load the dashboard. File -&amp;gt; Open Dashboard&lt;br /&gt;
* Load the M2.3.2 driver. View -&amp;gt; Device Configuration&lt;br /&gt;
** If the driver is not listed -&amp;gt; Have disk and select WinlogM232FastDiag.dll&lt;br /&gt;
** A window will pop-up with settings - select the COM port you are using for your cable/splitter. The sensor settings are pre-set for the MPXH6400A&lt;br /&gt;
* Turn on the ignition and if you did everything correctly, you should see data streaming&lt;br /&gt;
* To log File -&amp;gt; Start new datalog&lt;br /&gt;
* To view/stop log File -&amp;gt; Open last datalog&lt;br /&gt;
* When using WinLogView - File -&amp;gt; Open Graph, and select m232_fast.wlg for a pre-configured view.&lt;br /&gt;
&lt;br /&gt;
== COM Port Splitter ==&lt;br /&gt;
If you want to use WinLog and the TunerPro acquisition at the same time, then you will need a COM port splitter.&amp;lt;br/&amp;gt;&lt;br /&gt;
A few links:&lt;br /&gt;
* [http://www.curioustech.net/xport.html XPort] - the best free tool, but only works on 32 bit Windows up to Windows 7.&lt;br /&gt;
* [https://www.fabulatech.com/serial-port-splitter.html FabulaTech] - works, but expensive.&lt;br /&gt;
* [https://freevirtualserialports.com/ freevirtualserialports.com] - not tested.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Toolchain_setup&amp;diff=62</id>
		<title>Toolchain setup</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Toolchain_setup&amp;diff=62"/>
		<updated>2017-11-01T14:43:14Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* Initial setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initial setup ==&lt;br /&gt;
Download the following:&lt;br /&gt;
* [http://www.tunerpro.net/ TunerPro RT]&lt;br /&gt;
* [http://www.devtechnics.com/winlog.htm WinLog] or [https://www.14point7.com/pages/software-and-documentation Winlog 14point7]. The latter has no nag screens, and the software is abandonware anyway at this point.&lt;br /&gt;
* Clone or download as &amp;quot;zip&amp;quot; the release folder on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Setting up TunerPro RT ==&lt;br /&gt;
* After installing, edit the TunerPro shortcut and add the &amp;lt;b&amp;gt;-multiinstance&amp;lt;/b&amp;gt; command line parameter, this will allow you to open multiple TunerPro instances at the same time.&lt;br /&gt;
* Copy the checksum plugin (M232csum.dll) to &amp;lt;b&amp;gt;My Documents\TunerPro Files\Plugins&amp;lt;/b&amp;gt;. If you are using Windows 10 it can also be in your OneDrive folder. Best way to see is to start TunerPro once and exit.&lt;br /&gt;
* Load the .xdf file (XDF -&amp;gt; Select XDF)&lt;br /&gt;
* Load the acquisition file (Acquisition -&amp;gt; Load Definition File)&lt;br /&gt;
* Load the binary file (File -&amp;gt; Open Bin)&lt;br /&gt;
&lt;br /&gt;
== Setting up Winlog ==&lt;br /&gt;
&lt;br /&gt;
== COM Port Splitter ==&lt;br /&gt;
If you want to use WinLog and the TunerPro acquisition at the same time, then you will need a COM port splitter.&amp;lt;br/&amp;gt;&lt;br /&gt;
A few links:&lt;br /&gt;
* [http://www.curioustech.net/xport.html XPort] - the best free tool, but only works on 32 bit Windows up to Windows 7.&lt;br /&gt;
* [https://www.fabulatech.com/serial-port-splitter.html FabulaTech] - works, but expensive&lt;br /&gt;
* [https://freevirtualserialports.com/ freevirtualserialports.com] - not tested.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Toolchain_setup&amp;diff=61</id>
		<title>Toolchain setup</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Toolchain_setup&amp;diff=61"/>
		<updated>2017-11-01T14:42:43Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* COM Port splitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initial setup ==&lt;br /&gt;
Download the following:&lt;br /&gt;
* [http://www.tunerpro.net/ TunerPro RT]&lt;br /&gt;
* [http://www.devtechnics.com/winlog.htm WinLog] or [https://www.14point7.com/pages/software-and-documentation Winlog 14point7] - the latter has no nag screens, and the software is abandonware anyway at this point.&lt;br /&gt;
* Clone or download as &amp;quot;zip&amp;quot; the release folder on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Setting up TunerPro RT ==&lt;br /&gt;
* After installing, edit the TunerPro shortcut and add the &amp;lt;b&amp;gt;-multiinstance&amp;lt;/b&amp;gt; command line parameter, this will allow you to open multiple TunerPro instances at the same time.&lt;br /&gt;
* Copy the checksum plugin (M232csum.dll) to &amp;lt;b&amp;gt;My Documents\TunerPro Files\Plugins&amp;lt;/b&amp;gt;. If you are using Windows 10 it can also be in your OneDrive folder. Best way to see is to start TunerPro once and exit.&lt;br /&gt;
* Load the .xdf file (XDF -&amp;gt; Select XDF)&lt;br /&gt;
* Load the acquisition file (Acquisition -&amp;gt; Load Definition File)&lt;br /&gt;
* Load the binary file (File -&amp;gt; Open Bin)&lt;br /&gt;
&lt;br /&gt;
== Setting up Winlog ==&lt;br /&gt;
&lt;br /&gt;
== COM Port Splitter ==&lt;br /&gt;
If you want to use WinLog and the TunerPro acquisition at the same time, then you will need a COM port splitter.&amp;lt;br/&amp;gt;&lt;br /&gt;
A few links:&lt;br /&gt;
* [http://www.curioustech.net/xport.html XPort] - the best free tool, but only works on 32 bit Windows up to Windows 7.&lt;br /&gt;
* [https://www.fabulatech.com/serial-port-splitter.html FabulaTech] - works, but expensive&lt;br /&gt;
* [https://freevirtualserialports.com/ freevirtualserialports.com] - not tested.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Toolchain_setup&amp;diff=60</id>
		<title>Toolchain setup</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Toolchain_setup&amp;diff=60"/>
		<updated>2017-11-01T14:42:33Z</updated>

		<summary type="html">&lt;p&gt;PRJ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initial setup ==&lt;br /&gt;
Download the following:&lt;br /&gt;
* [http://www.tunerpro.net/ TunerPro RT]&lt;br /&gt;
* [http://www.devtechnics.com/winlog.htm WinLog] or [https://www.14point7.com/pages/software-and-documentation Winlog 14point7] - the latter has no nag screens, and the software is abandonware anyway at this point.&lt;br /&gt;
* Clone or download as &amp;quot;zip&amp;quot; the release folder on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Setting up TunerPro RT ==&lt;br /&gt;
* After installing, edit the TunerPro shortcut and add the &amp;lt;b&amp;gt;-multiinstance&amp;lt;/b&amp;gt; command line parameter, this will allow you to open multiple TunerPro instances at the same time.&lt;br /&gt;
* Copy the checksum plugin (M232csum.dll) to &amp;lt;b&amp;gt;My Documents\TunerPro Files\Plugins&amp;lt;/b&amp;gt;. If you are using Windows 10 it can also be in your OneDrive folder. Best way to see is to start TunerPro once and exit.&lt;br /&gt;
* Load the .xdf file (XDF -&amp;gt; Select XDF)&lt;br /&gt;
* Load the acquisition file (Acquisition -&amp;gt; Load Definition File)&lt;br /&gt;
* Load the binary file (File -&amp;gt; Open Bin)&lt;br /&gt;
&lt;br /&gt;
== Setting up Winlog ==&lt;br /&gt;
&lt;br /&gt;
== COM Port splitter ==&lt;br /&gt;
If you want to use WinLog and the TunerPro acquisition at the same time, then you will need a COM port splitter.&amp;lt;br/&amp;gt;&lt;br /&gt;
A few links:&lt;br /&gt;
* [http://www.curioustech.net/xport.html XPort] - the best free tool, but only works on 32 bit Windows up to Windows 7.&lt;br /&gt;
* [https://www.fabulatech.com/serial-port-splitter.html FabulaTech] - works, but expensive&lt;br /&gt;
* [https://freevirtualserialports.com/ freevirtualserialports.com] - not tested.&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Prjmod_features&amp;diff=59</id>
		<title>Prjmod features</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Prjmod_features&amp;diff=59"/>
		<updated>2017-11-01T14:16:23Z</updated>

		<summary type="html">&lt;p&gt;PRJ: PRJ moved page Пrjmod features to Prjmod features without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following list of features is currently implemented:&lt;br /&gt;
* Speed Density fueling strategy (MAF not used) - complete rewrite of load acquisition from scratch&lt;br /&gt;
* Full support for 400kpa MAP sensors (and beyond)&lt;br /&gt;
* High-speed data logging incl. per-cylinder knock feedback&lt;br /&gt;
* 8 bit load rollover protection (16 bit load uncapped)&lt;br /&gt;
* Map switching&lt;br /&gt;
* Launch control with antilag and knock control disable&lt;br /&gt;
* Flat-foot shifting with antilag and knock control disable&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Prjmod_features&amp;diff=58</id>
		<title>Prjmod features</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Prjmod_features&amp;diff=58"/>
		<updated>2017-11-01T14:16:07Z</updated>

		<summary type="html">&lt;p&gt;PRJ: PRJ moved page Prjmod features to Пrjmod features without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following list of features is currently implemented:&lt;br /&gt;
* Speed Density fueling strategy (MAF not used) - complete rewrite of load acquisition from scratch&lt;br /&gt;
* Full support for 400kpa MAP sensors (and beyond)&lt;br /&gt;
* High-speed data logging incl. per-cylinder knock feedback&lt;br /&gt;
* 8 bit load rollover protection (16 bit load uncapped)&lt;br /&gt;
* Map switching&lt;br /&gt;
* Launch control with antilag and knock control disable&lt;br /&gt;
* Flat-foot shifting with antilag and knock control disable&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=57</id>
		<title>Requirements and modifications for running prjmod</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=57"/>
		<updated>2017-11-01T14:14:33Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* OBD Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Follow the instructions with great care.&amp;lt;br/&amp;gt;&lt;br /&gt;
Everything except NLS and Map switching is &amp;lt;b&amp;gt;absolutely mandatory&amp;lt;/b&amp;gt;, you can not do any tuning before the steps are completed.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==Supported ECU part numbers==&lt;br /&gt;
Only the following control units are supported. They are all identically suited for running prjmod firmware. Make sure you have one (for obvious reasons).&amp;lt;br/&amp;gt;&lt;br /&gt;
* 4A0907551AA&lt;br /&gt;
* 4A0907551B&lt;br /&gt;
* 4A0907551C&lt;br /&gt;
* 4A0907551D&lt;br /&gt;
* 4A0907551E&lt;br /&gt;
* 4A0907551F&lt;br /&gt;
* 4A0997551X&lt;br /&gt;
* 4A0997551AX&lt;br /&gt;
* 4A0997551BX&lt;br /&gt;
* 4A0997551CX&lt;br /&gt;
* 4A0997551DX&lt;br /&gt;
* 4A0997551EX&lt;br /&gt;
* 895907551A&lt;br /&gt;
* 895907551B&lt;br /&gt;
* 895997551X&lt;br /&gt;
* 895997551AX&lt;br /&gt;
* 8A0907551B&lt;br /&gt;
* 8A0907551C&lt;br /&gt;
* 8A0997551X&lt;br /&gt;
* 8A0997551BX&lt;br /&gt;
&lt;br /&gt;
==OBD Interface==&lt;br /&gt;
Any KKL cable will work, also the non-current generation Ross-Tech HEX+CAN cables with the USB pass-through driver installed. I recommend setting the COM-port latency to 1 in device settings.&lt;br /&gt;
&lt;br /&gt;
==MAP sensor==&lt;br /&gt;
You need the MPXH6400A MAP sensor. It is possible to use any sensor, but unless you need to run more than 2.8 bar boost, save yourself the trouble, and run the MPXH6400A, as the provided basefiles are calibrated for it.&amp;lt;br/&amp;gt;&lt;br /&gt;
The following image shows the sensors on top of each other, incl. the pin numbering:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensors.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The pinouts are not 1:1, here is a table as to how they should be connected:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;b&amp;gt;Board&amp;lt;/b&amp;gt;&lt;br /&gt;
|&amp;lt;b&amp;gt;MPXH6400A&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
|}&lt;br /&gt;
* Cut the old sensor off the rubber hose with an exacto knife, make sure to cut right past the nozzle, or you will need a new hose.&lt;br /&gt;
* Re-use the clip. &lt;br /&gt;
* Use a cable tie to secure the sensor in place. &lt;br /&gt;
* Make sure that the edge of the upper half of the MAP sensor package is &amp;quot;behind&amp;quot; the ledge of the white bracket, so the sensor can not be pushed out by pressure. Failing that use &amp;lt;b&amp;gt;heat resistant&amp;lt;/b&amp;gt; glue.&amp;lt;br/&amp;gt;&lt;br /&gt;
Example of finished install:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensor_installed.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Speed Density modifications==&lt;br /&gt;
Remove 0 ohm resistor R660.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:R660.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via under &amp;quot;S900&amp;quot; chip. The via is directly under the writing &amp;quot;C660&amp;quot;. Attach one end of wire through hole, the wire will go from one PCB to the other.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire1.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via directly to the right of D232 (towards D235). Attach second end of wire through hole.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire2.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
As the fuel/ign chip does not have a MAP connection, we are simply routing the MAP signal into a free analog input.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Immobilizer bypass==&lt;br /&gt;
On cars fitted with an immobilizer the K-line runs to the white immobox on the steering column (behind the dash), and then from the immobox to the diagnostic socket.&amp;lt;br/&amp;gt;&lt;br /&gt;
The immo box will block any communications it does not consider &amp;quot;kosher&amp;quot; by pulling the whole K-line LOW on the ECU side. It certainly does not want you to run comms at 187500 baud, so you will need to cut out the middle man if you want to use fast logging.&amp;lt;br/&amp;gt;&lt;br /&gt;
To get rid of it:&lt;br /&gt;
* Remove the immobox connector&lt;br /&gt;
* Find two green wires in the connector.&lt;br /&gt;
* Check continuity.&lt;br /&gt;
** One of the green wires will have continuity to the K-line in the 2x2 connector under the hood.&lt;br /&gt;
** The other of the green wires will have continuity to pin 55 on the ECU.&lt;br /&gt;
* Once you have found the two K-line &amp;quot;ends&amp;quot; cut them at the connector and connect them together, you can also discard the immobox.&lt;br /&gt;
* If you want a proper immobilizer, wire in a reed switch somewhere or install an alarm with immobilization function. If anyone wants to steal one of these cars they can simply swap the ECU for a non-immobilized one in 30 seconds and drive off. The prjmod firmware has immo disabled.&lt;br /&gt;
I will be grateful if anyone can provide some pictures of this process.&lt;br /&gt;
&lt;br /&gt;
==NLS==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==Map switching==&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
	<entry>
		<id>https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=56</id>
		<title>Requirements and modifications for running prjmod</title>
		<link rel="alternate" type="text/html" href="https://m232.org/index.php?title=Requirements_and_modifications_for_running_prjmod&amp;diff=56"/>
		<updated>2017-11-01T14:14:18Z</updated>

		<summary type="html">&lt;p&gt;PRJ: /* OBD Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Follow the instructions with great care.&amp;lt;br/&amp;gt;&lt;br /&gt;
Everything except NLS and Map switching is &amp;lt;b&amp;gt;absolutely mandatory&amp;lt;/b&amp;gt;, you can not do any tuning before the steps are completed.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==Supported ECU part numbers==&lt;br /&gt;
Only the following control units are supported. They are all identically suited for running prjmod firmware. Make sure you have one (for obvious reasons).&amp;lt;br/&amp;gt;&lt;br /&gt;
* 4A0907551AA&lt;br /&gt;
* 4A0907551B&lt;br /&gt;
* 4A0907551C&lt;br /&gt;
* 4A0907551D&lt;br /&gt;
* 4A0907551E&lt;br /&gt;
* 4A0907551F&lt;br /&gt;
* 4A0997551X&lt;br /&gt;
* 4A0997551AX&lt;br /&gt;
* 4A0997551BX&lt;br /&gt;
* 4A0997551CX&lt;br /&gt;
* 4A0997551DX&lt;br /&gt;
* 4A0997551EX&lt;br /&gt;
* 895907551A&lt;br /&gt;
* 895907551B&lt;br /&gt;
* 895997551X&lt;br /&gt;
* 895997551AX&lt;br /&gt;
* 8A0907551B&lt;br /&gt;
* 8A0907551C&lt;br /&gt;
* 8A0997551X&lt;br /&gt;
* 8A0997551BX&lt;br /&gt;
&lt;br /&gt;
==OBD Interface==&lt;br /&gt;
Any KKL cable will work, also the non-current generation Ross-tech HEX+CAN cables with the USB pass-through driver installed. I recommend setting the COM-port latency to 1 in device settings.&lt;br /&gt;
&lt;br /&gt;
==MAP sensor==&lt;br /&gt;
You need the MPXH6400A MAP sensor. It is possible to use any sensor, but unless you need to run more than 2.8 bar boost, save yourself the trouble, and run the MPXH6400A, as the provided basefiles are calibrated for it.&amp;lt;br/&amp;gt;&lt;br /&gt;
The following image shows the sensors on top of each other, incl. the pin numbering:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensors.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The pinouts are not 1:1, here is a table as to how they should be connected:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;b&amp;gt;Board&amp;lt;/b&amp;gt;&lt;br /&gt;
|&amp;lt;b&amp;gt;MPXH6400A&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;color: #f00; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;color: #0e0; font-weight: bold; text-align:center;&amp;quot; | 3&lt;br /&gt;
|}&lt;br /&gt;
* Cut the old sensor off the rubber hose with an exacto knife, make sure to cut right past the nozzle, or you will need a new hose.&lt;br /&gt;
* Re-use the clip. &lt;br /&gt;
* Use a cable tie to secure the sensor in place. &lt;br /&gt;
* Make sure that the edge of the upper half of the MAP sensor package is &amp;quot;behind&amp;quot; the ledge of the white bracket, so the sensor can not be pushed out by pressure. Failing that use &amp;lt;b&amp;gt;heat resistant&amp;lt;/b&amp;gt; glue.&amp;lt;br/&amp;gt;&lt;br /&gt;
Example of finished install:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Mapsensor_installed.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Speed Density modifications==&lt;br /&gt;
Remove 0 ohm resistor R660.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:R660.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via under &amp;quot;S900&amp;quot; chip. The via is directly under the writing &amp;quot;C660&amp;quot;. Attach one end of wire through hole, the wire will go from one PCB to the other.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire1.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Remove solder from the via directly to the right of D232 (towards D235). Attach second end of wire through hole.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Wire2.jpg|frameless|600px]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
As the fuel/ign chip does not have a MAP connection, we are simply routing the MAP signal into a free analog input.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Immobilizer bypass==&lt;br /&gt;
On cars fitted with an immobilizer the K-line runs to the white immobox on the steering column (behind the dash), and then from the immobox to the diagnostic socket.&amp;lt;br/&amp;gt;&lt;br /&gt;
The immo box will block any communications it does not consider &amp;quot;kosher&amp;quot; by pulling the whole K-line LOW on the ECU side. It certainly does not want you to run comms at 187500 baud, so you will need to cut out the middle man if you want to use fast logging.&amp;lt;br/&amp;gt;&lt;br /&gt;
To get rid of it:&lt;br /&gt;
* Remove the immobox connector&lt;br /&gt;
* Find two green wires in the connector.&lt;br /&gt;
* Check continuity.&lt;br /&gt;
** One of the green wires will have continuity to the K-line in the 2x2 connector under the hood.&lt;br /&gt;
** The other of the green wires will have continuity to pin 55 on the ECU.&lt;br /&gt;
* Once you have found the two K-line &amp;quot;ends&amp;quot; cut them at the connector and connect them together, you can also discard the immobox.&lt;br /&gt;
* If you want a proper immobilizer, wire in a reed switch somewhere or install an alarm with immobilization function. If anyone wants to steal one of these cars they can simply swap the ECU for a non-immobilized one in 30 seconds and drive off. The prjmod firmware has immo disabled.&lt;br /&gt;
I will be grateful if anyone can provide some pictures of this process.&lt;br /&gt;
&lt;br /&gt;
==NLS==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
==Map switching==&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>PRJ</name></author>
	</entry>
</feed>