Z31 ECU Tuning: K Value, ROM Table, Nistune and MicroSquirt
Bigger injectors, a different airflow meter, a larger turbo or more boost all mean the engine computer has to be retuned. On a Z31 there are two main routes: reprogram the factory ECU, or replace it with a standalone. This page compares them, explains the values that matter on the factory ECU, and lists where they live in the ROM.
Two Ways to Tune
Nistune (factory ECU)
A Type 1 daughterboard goes inside the stock Z31 ECU, and the fuel, timing and other maps are changed from a laptop, live with the engine running. You keep the factory harness and sensors. It includes real-time map tracing, which shows exactly which fuel and timing cells the ECU is using, and there are base ROMs for every Z31 ECU.
Nistune: install, base ROMs, K-value table and BIN database →
MicroSquirt (standalone)
A complete replacement ECU, tuned in TunerStudio. MicroSquirt has two injector drivers, matching the Z31’s factory bank-fire injection, and runs speed-density from a MAP sensor, so the airflow meter and its limits go away. It needs a replacement trigger disc and new wiring. Megasquirt 3 adds sequential injection and coil-on-plug.
Which one? Nistune is the simpler path for a mostly stock engine and harness. A standalone makes sense when the engine is far from stock, the harness is giving trouble, or you want features like coil-on-plug, speed-density, boost control or built-in logging. The rest of this page applies to the factory ECU.
The Values That Matter on the Factory ECU
The ECU has no way to know you’ve changed injectors or the airflow meter. Unless its programming is updated, the car will run badly or not at all, and every later tuning change depends on getting these right.
- K value (injector constant): the ECU combines the airflow reading and rpm with K to work out the theoretical pulse width (TP) needed for 14.7:1. TP is also the load value used to pick the fuel and timing map columns, so changing K changes far more than fueling. It’s probably the single most important value in the ROM.
- TP scales: the load axis of the fuel and timing maps. Halve K and the ECU calculates half the TP, so it reads the maps in the wrong place and both fuel and timing go off. Scale the TP values by the same ratio you change K.
- TTP min / TTP max: the shortest and longest total pulse widths allowed, by rpm. With larger injectors, K and TP get smaller. If TTP min isn’t lowered too, the injectors can’t open for a short enough time and the engine runs very rich at idle, or not at all. Raising TTP max lifts the duty cycle limit.
- Injector latency (void or dead time): added to TP to cover the time the injector takes to open. Larger injectors usually need more. It has a small effect overall but helps the actual AFR match the map at low load.
Estimating a New K Value
K times injector flow should stay about the same, so scale K by the ratio of injector sizes at the same fuel pressure. Read the stock K from your own ROM, since it varies between ECUs. In this example the stock K was 025F hex:
260 cc × 607 = 157,820
For 440 cc injectors: 157,820 ÷ 440 ≈ 359 decimal (0167 hex)
If you raise fuel pressure instead, use the injectors’ new effective flow (see fuel pressure and FMU). A different MAF changes the airflow reading too: a larger meter needs a larger K, so with both a bigger MAF and bigger injectors, K may not change much.
Injector latency
One published method scales the stock latency by injector size, for example 75 decimal × 555 ÷ 370 ≈ 112. That tends to run rich; the stock value plus half the difference (75 + (112 − 75) ÷ 2 ≈ 93 decimal, 5D hex) is usually closer. For Nistune, enter the injector’s rated latency at 14 V.
One car’s result
With 440 cc direct-fit low-impedance injectors and K set by the tuning software’s own calculation, a Z31 ran mid-9s AFR under boost, far too rich; the software errs rich for safety. Calculating for 480 cc injectors was still rich. Lowering K step by step against the wideband, it ended up around 0120 hex with a latency of 5B hex. The estimate is only a starting point. Owners’ K values for many injectors are in the Nistune K-value table.
Finding K with a Wideband
The goal is to get the actual AFR to match what the fuel map asks for. Use a wideband that logs AFR against rpm (and ideally boost). Being able to change values with the engine running makes it much quicker, since it’s trial and error.
- Keep the ECU out of closed loop: unplug the O2 sensor, or set the closed-loop temperature at 7F91 to FF.
- Set the whole fuel map to about 12.5:1, so closed loop and map shaping are out of the way and changes are easy to see.
- Pick a starting K from the estimate above. When unsure, err larger (richer).
- Start the car watching the wideband and raise the revs slowly. Note whether the AFR is richer or leaner than 12.5 and adjust K until it’s close.
- Recalculate the TP scales by the same ratio you changed K (reduce K by a third, reduce the scales by a third). Skip this and the timing can be badly off.
- Drive gently while logging. Get the higher rpm and boost areas close to 12.5 first. Listen for detonation and stop if you hear any.
- Then set TTP min very low (even zero) and adjust latency to bring low rpm and load closer to 12.5. If it idles lean, raise TTP min until idle AFR is reasonable.

Column (Load) Testing
To change fuel or timing at, say, 3000 rpm and 10 psi, you need to know which map cell the ECU uses there. The rpm row is easy, but the load column isn’t: TP is calculated from the airflow meter and rpm and doesn’t match boost or vacuum directly. Nistune’s map tracing shows the cell in real time. Without it, a column test gets you close, because the load columns mostly follow boost with only minor variation by rpm:
- Set one column of the fuel map as rich as possible.
- Log several runs (AFR, boost and ideally rpm) through the boost range you think that column covers.
- The AFR goes from normal to very rich and back again. That rich patch shows the boost and rpm where the column is in use.
- Repeat for each column to build a chart of where each one takes effect. More logs give a more accurate chart.

Column testing also shows how far the maps reach. With the stock MAF the maps may run out around 12 psi. Past that, the ECU stays in the last column and only moves down it by rpm, so it can’t tell 13 psi from 16 and you lose precision (one car’s AFR leaned from 11.7 to 12.2 as rpm rose at 16 psi, when it should have richened). If you run more boost regularly, raise the TP values of the last columns so the map covers it, within what the meter can measure. The MAF upgrade page covers getting more metering range.
1988–89 ECU ROM Table
The address map of the 1988–89 Z31 ECU program ROM, as worked out by the Z31 tuning community. Rows marked “Unknown” hadn’t been identified.
| Table / value | Address | Size and conversion | Notes |
|---|---|---|---|
| Unknown | 4000–79AF | ||
| VQ (MAF) table, unused copy | 79B0–7A2F | 64 words | A second VQ map that isn’t used. |
| VQ (MAF) table | 7A30–7AAF | 64 words; dec ÷ 65535 × 100 = % of MAF maximum | Each word is a 0.08 V step, from 0% (0.08 V, 0000) to 100% (5.12 V, FFFF): the range the ECU can read. The MAF itself puts out more and less than this. |
| TP scale, fuel 1 | 7AB0–7ABF | 16 values; dec = TP | First copy, unused. |
| RPM scale, fuel 1 | 7AC0–7ACF | 16 values; dec × 50 = rpm | First copy, unused. |
| TP scale, ignition 1 | 7AD0–7ADF | 16 values; dec = TP | First copy, unused. |
| RPM scale, ignition 1 | 7AE0–7AEF | 16 values; dec × 50 = rpm | First copy, unused. |
| TP scale, fuel 2 | 7AF0–7AFF | 16 values; dec = TP | Used. Load axis of the fuel map. |
| RPM scale, fuel 2 | 7B00–7B0F | 16 values; dec × 50 = rpm | Used. |
| TP scale, ignition 2 | 7B10–7B1F | 16 values; dec = TP | Used. Load axis of the ignition map. |
| RPM scale, ignition 2 | 7B20–7B2F | 16 values; dec × 50 = rpm | Used. |
| Coolant temp sensor, volts to temperature | 7B30–7B4F | 32 values; dec − 50 = °C | Voltage axis in 0.16 V steps. |
| Unknown | 7B50–7B5F | ||
| Ignition dwell duty | 7B60–7B7F | 32 values; dec × 0.33 = dwell % | Axis 400–12,800 rpm in 400 rpm steps. More dwell gives a stronger spark but shortens coil life. |
| Unknown | 7B80–7BFF | ||
| Ignition map | 7C00–7CFF | 16 × 16; dec = degrees BTDC | The timing actually used. |
| Fuel map | 7D00–7DFF | 16 × 16; see note | Target AFR = 14.7 ÷ ((value + 128) ÷ 128). As published: values over 128 are negative (subtract 192, C0 hex) and leaner; 80 hex is the closed-loop flag. |
| After-start enrichment vs. temp 1 | 7E00–7E0F | 16 values | |
| After-start enrichment vs. temp 2 | 7E10–7E1F | 16 values | |
| First injection vs. temp | 7E20–7E2F | 16 values | |
| Unknown table | 7E30–7E4F | ||
| Cranking advance vs. temp | 7E50–7E5F | 16 values; dec = degrees BTDC | Axis −50 °C to 110 °C in 10 °C steps. |
| Neutral idle rpm vs. temp | 7E60–7E6F | 16 values; dec = rpm added | Axis −50 °C to 110 °C in 10 °C steps. Added to base idle. |
| TP AF limit | 7E70–7E7F | 16 values | Usually all zeros. |
| TTP min | 7E80–7E8F | 16 values | Minimum total pulse width by rpm (fuel map rpm axis). Keeps the engine running if the MAF signal drops too low. |
| TTP max | 7E90–7E9F | 16 values | Maximum total pulse width by rpm (fuel map rpm axis). |
| Idle ignition | 7EA0–7EAF | 16 values; dec = degrees BTDC | Used with the throttle switch closed, for idle/base timing. Moves along as coolant temperature rises. |
| Coolant temp enrichment 1 | 7EB0–7EBF | Unconfirmed. | |
| Unknown | 7EC0–7F2A | ||
| K value | 7F2B–7F2C | Word | TP = (VQ × K ÷ CAS value) ÷ number of cylinders, where CAS value = rpm ÷ 50 × 256. Sets fueling for the injector size; probably the single most important value. Stock 025F hex for 260 cc injectors. |
| Unknown | 7F2D–7F2F | ||
| Coolant temp enrichment 2 | 7F30–7F3F | 16 values | |
| Unknown | 7F40–7F87 | ||
| Injector latency (dead time) | 7F88 | 1 byte | Added to TP to cover the time the injector takes to open. |
| Unknown | 7F89–7F8A | ||
| Rev limiter 2 | 7F8B | 1 byte; dec × 50 = rpm | A second limit that takes over after about 15 seconds. Change both rev limiters. |
| Unknown | 7F8C–7F90 | ||
| Closed-loop temperature | 7F91 | 1 byte; dec = °C | Coolant temp at which closed loop starts. Default 3C hex. Set to FF to disable closed loop while tuning. |
| Unknown | 7F92–7FA4 | ||
| Speed limiter | 7FA5 | 1 byte; dec × 2 = km/h | |
| Unknown | 7FA6–7FB3 | ||
| Rev limiter | 7FB4 | 1 byte; dec × 50 = rpm | Over 7,000 rpm isn’t recommended. |
| Unknown | 7FB5–7FFF | End of ROM. |
Related
- Nistune ECU Tuning
- Megasquirt and MicroSquirt Standalone EFI
- MAF Upgrade
- More Fuel: Fuel Pressure and FMU
- DSM Injectors
- ECU Codes
Credits
- K value, wideband and column testing methods originally written by Jason Butts (Jason84NA2T) for redz31.net; latency method quoted there from a ztechz.net article. ROM table compiled for redz31.net from Z31 community research. Rewritten for XenonZcar.