Z32 ECU Tuning: EPROM Maps, Limiters and Injector Scaling
The stock Z32 ECU is a capable engine management system. Its whole program lives on one removable memory chip, and once you know where things are in that chip you can raise the rev limit, remove the speed and boost limiters, run larger injectors and dual MAFs, and adjust the fuel and timing maps. This page explains how the program is laid out and what each part does. It's our rewrite of the tuning guide by Devin (“Z from Japan”), published on ztechz.net with help from Niclas (ProZ), Ash Powers (AshZ) and others, including the corrections from his later revision.
Tools
- A 28-pin EPROM socket (0.6″ wide DIP) to replace the soldered-in chip, so chips can be swapped by hand.
- 27C256 EPROMs. The stock chip is a 27C256 rated at 85 ns. The ECU needs roughly 100 ns or faster; Devin used 55 ns chips. The speed is the number after the dash, where -85 is 85 ns but -20 means 200 ns, which is far too slow. Look for something between -45 and -85.
- An EPROM programmer to read the stock chip and write new ones, and an eraser if you reuse UV EPROMs.
- An EPROM emulator (optional but a huge help). It plugs into the socket in place of the chip, so you can load changes from a laptop while the engine runs instead of burning a new chip each time.
- A hex editor and a calculator that converts between hex and decimal.
- A wideband air/fuel meter, and ideally a Consult data logger, so you can see what the engine is actually doing and which map cells it's using.
- An anti-static wrist strap when handling the ECU board and chips.
This is the original do-it-yourself method. Today most Z32 tuning is done with commercial plug-in boards such as Nistune, which replace the EPROM and let you tune live from a laptop. The map layout and principles on this page still apply.
Get the engine right first
- Set base timing to 15° BTDC at the crank angle sensor. The timing map assumes it. Advancing the CAS to “make power” shifts the entire map and makes your tuning meaningless. See CAS problems.
- Plugs: correctly gapped and in good condition. Devin used colder copper NGK ZFR7F-11 plugs while developing a tune, because they're easy to read and show trouble quickly, then went back to colder-than-stock platinums.
- Fuel delivery: a weak pump or bad regulator will make a good map run lean.
Preparing the ECU
- Disconnect the battery and remove the ECU from the passenger footwell.
- Unbolt the ECU's top cover, then carefully unbolt the small circuit board inside and set it aside to reach the EPROM.
- Have the stock EPROM desoldered and a socket soldered in. This needs a good desoldering station; too much heat damages the board. An electronics repair shop can do it quickly. Mark which chip it is first, because the shop won't know.
- Read and save the stock chip before anything else. Keep that file safe.
- Fit chips the right way round. The notch on the EPROM faces in, toward the center of the ECU. The socket's notch shows the direction.
Keep a folder for each tune with its .bin file and a record of the fuel map, the timing map and every other value you changed. Experimental tunes get mixed up quickly.
Hex and the address map
The program is written in hexadecimal (base 16: 0–9 then A–F). 9 hex is 9, A hex is 10, 10 hex is 16 and FF hex is 255. On this page “8C” and the like are hex. Always be clear which base a number is in.
The 27C256 holds 256 kilobits, which is 32,768 bytes, so its addresses run from 0000 to 7FFF hex. A hex editor shows it in rows of 16 bytes. Each 16 × 16 map takes a 256-byte block, for example 7D00–7DFF for the fuel map. Most of the tunable settings are near the end of the chip.
Some values are single bytes. Others are words, two bytes read together: if 7A70 is 00 and 7A71 is 30, the word is 0030.
Limiters
Rev limiter: 7FB4
One byte, multiplied by 50 to give rpm. Stock is 8C (140 × 50 = 7,000 rpm). For 7,300 rpm, 7300 ÷ 50 = 146 = 92. Devin used 7,300 on stock injectors. Tuned ECUs commonly run 7,000–7,500, and built engines more. On hard pulls the engine can overshoot the limit by a few hundred rpm, so leave a margin.
Top speed limiter: 7FA5
One byte, multiplied by 2 to give km/h. The JDM value is 5C (92 × 2 = 184 km/h). Setting it to FF gives 510 km/h, which effectively removes it. You can also set it low for a “valet” program.
Air flow (boost cut) limiter: 7960–796F
This is the one that stops a modified car pulling once it moves more air than stock, and no piggyback controller can get around it. The values are words, stock 8080. When the MAF signal reaches about 4.08 V, the corresponding VQ table value (8219) passes that limit and the ECU cuts power.
- Remove it: set every word to FFFF. This is what most commercial tunes have done.
- Raise it: Niclas recommends doubling the stock values instead, which allows roughly 2 bar (29 psi). That keeps some protection if a wastegate actuator hose blows and boost runs away.
How fueling works
The fuel map isn't the whole story. The ECU first works out the fuel needed for a 14.7:1 mixture, then the fuel map adds enrichment on top:
- The MAF sends a 0–5.12 V signal.
- The ECU looks that voltage up in the VQ table to get an air flow number.
- It multiplies that by the K value and divides by engine speed to get TP (theoretical pulse width), the injector time for 14.7:1 at that load. TP is also the “load” that picks the column in the fuel and timing maps.
- The fuel map enriches that pulse width for the current load and rpm, and the injector latency is added to cover the time the injector takes to open.
- Limits apply: TTP Min keeps a minimum pulse and TTP Max caps it.
VQ table: 7A70–7AEF
64 words, one for each 0.08 V step of MAF voltage from 0.00 to 5.12 V. At 5.12 V the MAF is at its limit and the last entry (7AEE–7AEF) is FFFF. You almost never need to change it, even for dual MAFs.
This is also how air/fuel controllers (AFCs) work: they raise or lower the MAF signal before the ECU reads it. Once you can tune the ECU directly, they're unnecessary.
K value: 7F2B–7F2C
A word, stock 0120 (288) for the stock 370 cc injectors. Leave it alone on stock injectors. It's the main adjustment for larger injectors and dual MAFs.
Injector latency: 7F88
The fixed time added to every pulse to allow for the injector opening and closing. Stock is 4B (75). It mainly affects idle and light-load running. Leave it on stock injectors.
TTP Min: 7E80–7E8F
A minimum pulse width by rpm, so the engine keeps running if the MAF signal drops briefly, such as on a hard shift or sudden lift when air surges back past the MAF. Commercial tunes leave it stock. It can be lowered somewhat, and must be lowered with larger injectors.
TTP Max: 7E90–7E9F
A maximum pulse width by rpm. It stops the enrichments (fuel map, throttle enrichment, warm-up) or a MAF problem from sending the pulse width sky high. With more air and boost the engine needs more fuel, so the upper values usually need raising on a car running more than stock boost. JWT's tune raises the last seven values to 88; Devin raised them further. Don't simply set them all to FF.
Fuel and timing maps
Both maps are 16 × 16. Load (TP) runs across the columns from left to right and rpm runs down the rows. Idle is the top left corner. As you open the throttle the ECU moves right, and as rpm rises it moves down. Between cells the ECU averages the block of four values around the current point, which keeps the map smooth.
The scales
| Scale | Address | Notes |
|---|---|---|
| Rpm scale, fuel map | 7B00–7B0F | × 50 = rpm. The last stock value is 80 (6,400 rpm). |
| Rpm scale, timing map | 7B20–7B2F | × 50 = rpm. The last stock value is 80 (6,400 rpm). |
| TP (load) scale, fuel map | 7AF0–7AFF | The last stock value is 58. |
| TP (load) scale, timing map | 7B10–7B1F | The last stock value is 60. |
The stock maps run out at about 13–14 psi and 6,400 rpm. Beyond that, the ECU keeps using the last column or row, so 13 psi and 25 psi at the same rpm get the same timing and enrichment. That's why expanding the maps matters on a modified car.
Primary timing map: 7800–78FF
Each value is ignition advance in degrees BTDC, in hex. The top left cell is 0F, 15° at idle. Values of 80 and above mark the knock-monitored zone: subtract 80 to get the timing. So 9E means 9E − 80 = 1E = 30°, with the ECU watching the knock sensor in that cell.
The JDM map has more advance than the US map, because Japanese pump fuel is higher octane. Devin found it works well on many US cars, but check for knock on your fuel.
If the car knocks at a certain boost, don't retard the whole map at the CAS: you lose power everywhere. Find the cell instead. For example, knock at 17 psi above 4,500 rpm on a stock-scale map is in the last column (anything over about 13 psi), on the 4,500 rpm row. Pull timing and/or add fuel there and leave the rest of the map alone.
Primary fuel map: 7D00–7DFF
Each value is enrichment on top of 14.7:1, on a scale of 128. For example, the stock bottom right cell (6,400 rpm, top load) is 3C = 60. 60 ÷ 128 = 0.47, so the ECU adds 47% more fuel, which gives about 10.1:1. The leanest cells work out to about 15:1.
Knock protection
The ECU has a second set of maps for when it detects knock. As Devin understood it: on knock it first retards timing a few degrees. If knock continues in the knock-monitored zone, it switches to the knock timing and fuel maps and stays on them until the engine is turned off and restarted. If knock still continues, it drops to safety boost through the boost control solenoids.
- Knock timing map: 7C00–7CFF. In stock form it's close to the normal map, so it adds little protection. Many tunes (JWT, for example) simply copy the normal maps into the knock maps. Devin preferred to fill the knock timing map with much more retarded values: the car stays drivable but noticeably slow, so you know something is wrong.
- On cars with an aftermarket boost controller the safety boost solenoids are often removed, so that last level of protection is gone.
- Knock sensor settings (7FE0–7FE8) and knock limit (79E3–79EF) were rarely changed by anyone and are best left alone.
Other settings
- Valve timing control release: 79F6. The rpm (× 50) where the ECU stops advancing the intake cams. Stock is 76 (5,900 rpm). Devin lowered it to 62 (4,900 rpm). The best value depends on the engine and is worth testing on a dyno.
- Ignition dwell: 7B60–7B7F. Higher values give a stronger spark but shorten coil pack life.
- 7B30–7B4F is a temperature conversion table, not warm-up enrichment as first thought (Ash Powers' correction). Don't change it.
- Feedback control (7F91) and the throttle enrichment table weren't documented. The stock throttle enrichment was considered good for all but heavily modified cars.
- AIV delete: 1993 Z32s were built without the AIV valves, so the 1993 program can be used as a base if you remove them.
Larger injectors
The stock 370 cc injectors run out early. Devin calculated about 94% duty cycle at 7,000 rpm at the top of the stock map, and 100% by about 7,400 rpm and 15 psi with intake and exhaust work. Many injector makers advise staying under 80%.
The idea is simple: bigger injectors flow more in the same time, so the pulse width has to shrink by the same ratio. The ratio is 370 ÷ new size; for 555 cc it's 0.667.
- K value: multiply the stock 288 by the ratio. 555 cc: 288 × 0.667 = 192 = 00C0. 740 cc: 144 = 0090. 850 cc: 125 = 007D.
- TP scales: the smaller pulse widths also lower the calculated load, so multiply every value in both TP scales (7AF0–7AFF and 7B10–7B1F) by the same ratio. Otherwise the ECU reads the wrong map cells.
- Injector latency (7F88): bigger injectors open more slowly, so latency goes up. Scaling the stock 75 directly (75 × 555 ÷ 370 = 112) gave too much fuel in Devin's testing. His rule of thumb is halfway: 75 + (112 − 75) ÷ 2 ≈ 93 = 5D for 555 cc. Fine-tune it for a smooth idle.
- TTP Min: multiply all values by the ratio.
- TTP Max: trim the low end: multiply the first two values by the ratio and the next two by about 0.85. Leave the rest.
- Recheck idle and light-load mixture. With the extra fuel available you can consider a higher rev limit.
Dual MAFs
With two intakes (two real MAFs, or one real MAF and a dummy), each MAF only sees half the air, so the calculated TP is half what it should be. Double the K value, after making any injector changes. Fit larger injectors before going to dual intakes, because the stock ones will run out even sooner. With a real/dummy pair you may need small corrections: raise TTP Min if idle is lean, or move the K value up or down by about 5% to shift the whole curve.
Expanding the maps
Expanding the scales gives the ECU separate cells for the extra boost and rpm a modified car makes, instead of reusing the last row and column for everything.
Rpm
Raise the last value from 80 (6,400 rpm) to B0 (176 × 50 = 8,800 rpm) and space the 16 values evenly: 0B, 16, 21, 2C, 37, 42, 4D, 58, 63, 6E, 79, 84, 8F, 9A, A5, B0 (550 rpm steps). Do this in both rpm scales.
Load
The bottom half of the stock TP scale is in vacuum and only the top half covers boost. So doubling the top value covers about three times the boost, not twice (Niclas' correction). The stock scale is good for about 14 psi; making the top value about 50% higher covers roughly 28 psi, which is plenty for most cars. Don't overdo it: a huge scale wastes resolution in the area you actually use. For the same reason, set both maps to the same scale so the fuel and timing cells line up.
Filling in the new maps
- Lay out the new, blank 16 × 16 grid with the new scales.
- Keep the first cell the same as stock (C0 on the fuel map, 0F on the timing map).
- For every cell inside the old map's range, use the stock value at that load and rpm. Where a new cell falls between old cells, average the surrounding stock values.
- For the new area beyond the stock range (higher boost and rpm), set conservative values: more fuel, less timing. Then refine them on a dyno with a wideband.
- Do the injector and dual MAF adjustments after expanding the maps.
Air/fuel targets and timing for more boost are where the real power is, and they depend on fuel, the engine and its condition. Research and testing beat copying someone else's numbers.
The math
Finding where the ECU is on the map
Devin's approximate formula, which Niclas later said isn't exact but comes close:
TP ≈ VQ × K ÷ (rpm ÷ 50 × 256) ÷ 6
Example: at 2,500 rpm the MAF reads 2.56 V, which is VQ entry 32, value 1B39 = 6969. So 6969 × 288 = 2,007,072; 2500 ÷ 50 × 256 = 12,800; 2,007,072 ÷ 12,800 ≈ 156.8; and 156.8 ÷ 6 ≈ 26 = 1A. Find TP 1A on the load scale and 2,500 rpm on the rpm scale, and you have the cell (or block of four) the ECU is using. A Consult logger makes this quick, but a voltmeter on the MAF signal and the tachometer work too.
Pulse width
TP × 0.125 = pulse width in milliseconds for 14.7:1. At the top of the stock load scale (58 = 88): 88 × 0.125 = 11 ms. The fuel map then adds its enrichment: 3C = 47%, so 11 × 1.47 ≈ 16.2 ms.
Injector duty cycle
Each injector fires once every two crank revolutions, so at 7,000 rpm it fires 3,500 times a minute. That's 58.3 times a second, leaving 17.14 ms per cycle. 16.2 ÷ 17.14 = 94% duty cycle on stock injectors, before any other enrichment. That's why larger injectors are the first upgrade on a tuned car.
Address chart
From Japanese-market programs. Verify against your own stock chip.
| Address | What it is | Stock (JDM) | Conversion |
|---|---|---|---|
| 7800–78FF | Primary timing map | 0F at idle | Degrees; 80+ = knock zone, subtract 80 |
| 7960–796F | Air flow (boost cut) limiter | 8080 words | Compared with VQ table values |
| 79E3–79EF | Knock limit | Leave stock | |
| 79F6 | Valve timing control release | 76 (5,900 rpm) | × 50 = rpm |
| 7A70–7AEF | VQ table (MAF voltage to air flow) | FFFF at 5.12 V | 64 words, 0.08 V steps |
| 7AF0–7AFF | TP (load) scale, fuel | Last value 58 | |
| 7B00–7B0F | Rpm scale, fuel | Last value 80 (6,400 rpm) | × 50 = rpm |
| 7B10–7B1F | TP (load) scale, timing | Last value 60 | |
| 7B20–7B2F | Rpm scale, timing | Last value 80 (6,400 rpm) | × 50 = rpm |
| 7B30–7B4F | Temperature conversion table | Don't change | |
| 7B60–7B7F | Ignition dwell | ||
| 7C00–7CFF | Knock timing map | As timing map | |
| 7D00–7DFF | Primary fuel map | 3C at top load, 6,400 rpm | ÷ 128 = enrichment over 14.7:1 |
| 7E80–7E8F | TTP Min (minimum pulse width) | ||
| 7E90–7E9F | TTP Max (maximum pulse width) | ||
| 7F2B–7F2C | K value (injector size) | 0120 (288) | Word |
| 7F88 | Injector latency | 4B (75) | |
| 7F91 | Feedback control | Not documented | |
| 7FA5 | Top speed limiter | 5C (184 km/h) | × 2 = km/h |
| 7FB4 | Rev limiter | 8C (7,000 rpm) | × 50 = rpm |
| 7FE0–7FE8 | Knock sensor settings | Leave stock |
Related pages: ECU trouble codes, fuel injectors, twin turbo system.
Sources Used
- “ECU Tuning” by Devin (Z from Japan), ztechz.net, including his Revision 1. Rewritten and condensed here; equipment prices, suppliers and downloadable code from the original are left out.
- Corrections and additions credited in that guide to Niclas (ProZ on twinturbo.net), Ash Powers (AshZ), and Petri (Consult tracing), with help from Technosports in Japan.