Programming 101
The Programming 101 project analyzes GM OEM fuel and ignition management issues.
Several EFI DIY'erst are focused the GM 1227747 ECM, a TBI system, used in 4/6/8 cylinder GM trucks and Vans from 87-91. We hope to develop and understanding of the location (addresses) and function of all the tables in the EPROM. Once this is accomplished the knowledge can be applied to other GM ECM's.
Changing the calibrations of your ECM may violate the laws in your area. If you attempt recalibrations, serious engine damage may result. These matters should be done under adult supervision. Again this is in general for GM ECM's, and most specifically the 1227747.
The 1227747 ECM uses a socketed PROM that
contains all of the calibration and a part of there algorithm; $0000 to $0616 Relative,
(actual address is $D000 - $D616),. The remainder of the algorithm is stored in a special
device that has a masked ROM, $0616 - $1FFF relative, $D616 - $EFFF
CPU ADDRESS |
RELATIVE ADDRESS |
EEPROM |
ROM |
|||
$DOOO - $D616 |
$0000 - $0616 |
YES |
NO |
|||
$D617 -$EFFF |
$0617 - $1FFF |
NO |
YES |
|||
| Note: Motorola code uses the "$" to indicate hex values |
||||||
The 1227747 ECM uses a GM unique derivative of the Motorola 6803 not available commercially .
Editors note:
Bruce used the
version 1.3 of WinTuner to show the construction of the calibrations tables and functions.
Tables and their locations in
the EPROM:
Click on the address to jump to the description
| Address Range | Purpose |
| $0000-0001 | Checksum |
| $0002-$0003 | Scan ID |
| $0004 | EPROM Template ID |
| $0032-0106 | Main Spark table, 3d |
| $015E-0165 | WOT Spark adder |
| $017F-0187 | Knock sensor retard at WOT |
| $0188-018C | Knock sensor retard non WOT |
| $030E-0312 | MAP Power Enrichment |
| $0314-031D | TPS Power Enrichment |
| $037F-03C6 | Main Fuel table, 3d |
| $03C7-03D7 | Main fuel table Adder |
| $044A-0458 | Crank Air Fuel Ratio Vs Coolant |
| $0459-0468 | Air Fuel Ratio Vs Coolant |
| $047D-0485 | Percent of TPS to enable PE |
| $050D-050F | Error Code Masks |
| $05F5-0605 | Air Fuel Ratio Vs Coolant |
| $060E-0616 | Idle Speed Temperature Corrections |
Units and Scalars
All these tables are used in a similar fashion. You index into the table using one or two values (MAP, RPM, temp, etc.), and retrieve the value stored there.
Table indices are fixed by the algorithm in the ROM, but what about the value stored in tables? How is the value there converted to a real world number representing spark angle, volumetric efficiency, etc? See the table below. In this table, "N" represents the value retrieved from the table.
| Unit Type | Calculation | Units |
| Temperature, Coolant | N x (191/255)-40 | degrees C |
| Speed | N x 1 | 0-255 MPH |
| RPM | N x 25 | RPM |
| RPM, low range | N x 12.5 | RPM |
| WOT AFR | N x (100/256) | AFR |
| PE (power enrich) | N x 10 | |
| VE (volumetric efficiency) | N x (256/100) | 0-100% |
| Knock retard | N x (45/256) | 0-45 degrees |
| Knock attack Rate | N x 0.0225 | milliseconds |
| Knock recovery Rate | N x (500/256) | milliseconds |
| Spark Advance | N x (90/256) | 0-90 degrees |
| Spark Retard | N x (45/90) | 0-45 degrees |
Example:
| Checksum, $0000 - $0001 |
To calculate the checksum:
|
Example:
|
| Scan ID Word, $0002 - $0003 |
| The Scan ID word is the last four digits of the software
part number. This number can be looked up to verify which software in the EPROM. |
| Note: This function is found at the same address for most early ECM's using 32K EPROM's. |
| ID Byte, $0004 |
| Address $0004 contains the calibration ID byte. The value
generally found in the 1227747 ECM is $42, this is the production code. In some ECM's several different software variations (different ID byte), may be in use although the ECM service number is the same. If the value $AA is stored here then the ECM does not perform a checksum test, This is considered the engineering code. |
| Spark
Table, $0032 to $0106 The Main Spark Table is a 3D table is organized as a 14 row by 15 column tables as shown below There is a three byte header that define the minimum RPM value, minimum Map Value and the number of rows in each column. The total spark applied to the engine is the summation of several values, this table is the base value. |
![]() |
| Maximum Spark Retard Vs. RPM, $017F - $0187 | ||
|
||
| Maximum Knock Retard Vs. MAP, $0188 to $018C | ||
WOT a 2D table using MAP as the look up value
Same as the RPM table above only this table is MAP selected. |
||
Accelerator pump enrichment TBI systems needs to emulate the accelerator pump found on carburated engines. The accelerator pump on a Carburetor injects a big squirt of fuel into the manifold when the throttle is opened quickly. There are three reasons for this extra fuel in that case of a Carburated engine.:
The TBI system has a slightly different problem, since it can react to rapid opening and it has a TPS sensor to tell the CPU about that fact, and we don't need all that mush fuel at WOT, because we can control fuel much better than a Carburetor. The TBI suffers from the long delay from the time fuel is called for by the CPU and the time it combusts and ultimately become an o2 signal in the exhaust at the o2 sensor. This is called "transport time". The type $42 code running in the 1227747 ECM uses the following two tables to provide acceleration enrichment. |
||
| Acceleration Enrichment
Vs. MAP, $030D - $0312 (Pump Shot) This table uses change in MAP from one cycle of the ECM to the next as Differential MAP. Note: |
||
![]() |
||
| Acceleration Enrichment
Vs. TPS, $0313 - $03 (Pump Shot) |
||
|
| Power Enrichment Spark Correction, $015D to $0165 | ||
Note: |
| Main
Fuel tables, $037C to $03C6 and This is the main 3D fuel delivery table and its companion 2D table The value in the table is volumetric efficiency, which is used ultimately in the fuel calculation to determine the injector pulse width along with RPM, and coolant temperature, This is why this is a speed/density system. Fuel is the easiest parameter to get right, record the Block Learn Value when the Integrator if neutral (Near 128). Divide the BLM value by 128 and you have the current error from 14.7:1 AFR. Example:
What this indicates is that the BLM is multiplying the calculated value of fuel by 1.09 to achieve 14.7:1 AFR (The Stocheometric point) To improve this situation got to 200 RPM and 50 KPA map on the fuel table and multiply the value of VE by 1.09, (46 x 50.14), we round to 50 and move on. Make sure the total of the two table is less that 100. Sample table from a stock 5.7l truck. |
||
![]() |
||
| Note: The table starts with a three byte header that defines minimum MAP, minimum RPM and the number of row /column |
||
VE
Adder Table, $03C7 - $03D7
Note: |
| Cranking
AFR Vs Coolant, $0449 - $0459 These values are used in open loop while cranking. |
||
|
| Percent of TPS to enable Power Enrichment, $047D - $0485 | ||
|
| IAC STEPS Vs. Coolant, $05F5 - $0605 Controls idle speed based on engine temperature until the Idle
speed PID loop can get control of idle RPM. see Idle RPM Vs.
Coolant |
|||
|
|||
Idle RPM Vs. Coolant |
|||
|
|||
| Air
Fuel Ratio Vs Coolant, $0459 to $0468 These values are used during open loop operation
|
||
|
||
This table details corrections to the A/F ratio, based on engine temperature. It includes startup enrichment (choke).
These three eight bit values specifies the diagnostic codes that are enabled. Disabling a code does not necessarily turn off the corresponding test. It does prevent a failure code from being stored and prevents the check engine light from coming on. Each address has an 8 bit value stored, and each bit controls a particular diagnostic code. Example: $050D has the value $FC. (1111 1100 in
binary). The two zeros are in the LSB (least significant bit) (b0 & b1), that
means codes 24 and 23 are disabled. |
| Mask for Error Flag 1 |
| $050D, 1111 1100b bit
0 code 24, VSS bit
4 code 15, Coolant sensor low |
| Mask for Error Flag 2 |
| LD50E, 0011 1001
1 b0 code 42, EST Mon error
1 b4 code 33, MAP Sensor hi |
| Mask for Error Flag 3 |
| LD05F, 1111 1001
1 bit 0 code 55, ADU Error
1 bit 4 code 51, EPROM error |
For corrections and additions, email Bruce Plecan, nacelp@bright.net