Programming 101 Information Repository/CSH suppository
The purpose of the Programming 101 project is to analyze OEM fuel and ignition management issues. To this end, some members of the DIY_EFI list are focusing on the GM 1227747 ECM. This ECM is a TBI controller, used in 6/8 cylinder GM trucks and 6 cylinder Astro vans from 87-91. The goal is to understand the location and purpose of all the tables in the EPROM. Once this is accomplished the knowledge can be applied to other GM ECMs. The information on this page is also in the archives, and can be retrieved by doing a subject line search for "Programming 101".
This is for educational purposes. Changing the calibrations of your ecm may violate the laws in your area. If you attempt recalibrations, serious engine damage may result. Please read past posts about tune up procedures, when attempting recalibrations. These matters should be done under adult supervision. Again this is in general for GM ecms, and most specifically the 1227747.
The '747 ECM uses a socketed PROM and a soldered ROM. The PROM has tables and some program code. It maps into processor space from 0xd000 to 0xdfff. The ROM appears in the processor space from 0xe000 to 0xffff. Data space in the PROM is from 0x000 to 0x616. Code starts at 0x617 and continues to the end of the PROM, 0xfff.
The '747 ECM uses a GM specific derivative of the Motorola 6809.
Summary of tables and their locations in the EPROM:
|0x00-0x004||Checksum and PROM ID|
|0x035-0x106||Spark table (14x15)|
|0x15e-0x165||WOT Spark adder|
|0x17f-0x187||Knock sensor retard at WOT|
|0x188-0x18c||Knock sensor retard non WOT|
|0x30e-0x312||Delta MAP enrich|
|0x37f-0x3c6||Fuel table (9x8)|
|0x44a-0x458||Cranking fuel vs temp|
|0x459-0x468||AFR vs temp|
|0x47d-0x485||Percent of TPS to enable PE|
|0x5f5-0x605||Idle fuel vs temp|
|0x60e-0x616||Idle speed temperature corrections|
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. The table indices are fixed by the coding in the ECM, but what about the value stored in the table? How is the value there converted to a real world number representing spark angle, volumetric efficiency, etc? See the table below. In this table, "X" represents the value retrieved from the table.
|Type of data||Calculation||Units|
|Speed||no calculation||0-255 MPH|
|Idle RPM||X*12.5 (0-3187, most common) or
|WOT AFR||X*100/256||% change in calculated AFR for WOT|
|PE (power enrich)||X/10, or
|X/10 gives absolute AFR,
the other formula gives a % change from -100 to +100.
|VE (volumetric efficiency)||X/256*100||0-100%|
|Knock retard||X*45/256||0-45 degrees|
|Spark Advance||X*90/256||0-90 degrees|
For example, if you looked in the knock retard table, you might find the value 0x44 (hex, or 68 decimal). What's that mean in real world units? According to the table above (Knock retard), you take the table value, multiply by 45 and divide by 256, which gives 11.9. That's almost 12 degrees of retard when knock is detected.
Here is a table for converting between pressure units. kPa and PSI are in absolute pressure, in-hg is in gauge pressure as you would see it on a vacuum gauge.
Checksums and PROM ID
|0x000 to 0x001||Checksum|
|0x002 to x003||Chip ID|
To calculate the checksum, add all bytes in the PROM, starting immediately after the Checksum word itself. Truncate the result to 16 bits (4 hex digits). The result is the checksum. For example, add all bytes starting at offset 0x002 and continuing to the end (0xfff). Lets say the result is 72,182 decimal, or 0x119f6. Truncating the result to 4 hex digits results in 0x19f6, which is the checksum. Location 4 is the enable checksum flag. If the value 0xaa is stored here then the ECM does not perform a checksum test on the PROM image. This value and location is specific to the 7747 ECM, it may not be the same for others.
|0x35 to 0x106||Spark advance table|
This table is organized as a 14 row by 15 column table. It appears in memory as row 0, followed by row 1, etc. The rows are RPM, and the columns are manifold pressure in kPa. Here is an example from a non-factory EPROM:
Please don't burn this table into your EPROM. This is for a fairly hotrodded engine, aluminum heads. See the tuning tips link for the details.
Knock sensor retard
|0x17f to 0x187||WOT retard|
|0x188 to 0x18c||non WOT retard|
The WOT table is by RPM, the other table appears to be MAP related. A good value for all entries would be 0x44, or 68 decimal. The value to store in the table is the retard in degrees, multiplied by 255 and divided by 45. For 12 degrees of knock retard: (12*255)/45=68, or 0x44.
WOT enrichment and spark
|0x15e to 0x165||Timing advance WOT|
|0x3C7 to 0x3d7||Fuel enrichment WOT|
This table specifies spark advance and fuel enrichment at WOT throttle conditions. When modifying remember that it's better to start with too much fuel and too little spark, and slowly sneak up on better values.
This is the main fuel delivery table. It is a two dimensional table, with RPM on one axis and MAP on the other axis. The value in the table is volumetric efficiency, which is used in the fuel calculation to determine the injector pulse width. Volumetric efficiency is expressed as a percentage. It's the theoretical amount of air that the engine should be pumping (depends only on RPM) divided by the actual amount of air that the engine is pumping (it's less than theoretical due to the throttle plates and other intake restrictions). Here is a sample table. Again, it is from a somewhat hot-rodded engine, so please don't just burn it to your PROM.
This table specifies which diagnostic codes are enabled, and which are disabled. Disabling a code does not necessarily turn off the corresponding test. It does prevent a failure code from being stored, prevents the check engine light from coming on, and prevents "limp home mode" if a failure of the particular test would otherwise cause "limp home mode". Each address has an 8 bit value stored, and each bit controls a particular diagnostic code. Bits are numbered with 0 being the least significant bit, and 7 being the most significant. An example? Lets say address 0x50f has the value 0xfc. 0xfc is 1111 1100 in binary. The two zeros are in the least significant places, so that means codes 54 and 55 are disabled. Any service manual can tell you what the meaning of the various error codes is.
Cranking fuel vs temp
|0x44a to 0x458||Cranking fuel vs temp|
Idle fuel vs. temp
|0x5f5 to 0x605||Idle fuel vs temp|
Percent of TPS to enable PE
|0x47d to 0x485||Percent of TPS to enable PE|
TPS is throttle position sensor. It tells the ECM how far open the throttle is. PE is power enrichment. When the ECM is in PE mode, it advances the spark some and adds extra fuel for more power. This table tells the ECM when to enter PE mode, based on the TPS.
Idle speed temperature corrections
|0x60e to 0x616||Idle speed temperature correction|
Corrects idle speed based on engine temperature.
AFR temperature corrections
|0x459 to 0x468||AFR/temp corrections|
This table details corrections to the A/F ratio, based on engine temperature. It includes startup enrichment (choke).
Accelerator pump enrichment
|0x30e to 0x312||Delta MAP enrich|
|0x314 to 0x31d||Delta TPS enrich|
|0x31e to 0x323||Quantity enrich|
The '747 EFI system, being a TBI system, needs to emulate the accelerator pump found on carbed engines. The accelerator pump on a carb injects a squirt of fuel into the manifold when the throttle is opened quickly. There are three reasons for this extra fuel:
1) The sudden opening of the throttle lets in more air, which the venturies can't immediately respond to.
2) The sudden opening of the throttle increases the absolute pressure in the manifold, which can cause some of the vaporized gas to condense into a liquid on the manifold walls.
3) At WOT you want more fuel anyway to make the most power.
The '747 ECM uses these 3 tables to emulate the accelerator pump function. Delta MAP refers to the change in MAP versus time. A large Delta MAP indicates a large change in MAP over a small period of time, and a need for an extra squirt to make up for the fuel that condenses onto the manifold walls. Similarly a large delta TPS indicates a large change in throttle position over a small period of time, and the need for extra fuel.