BMW Coding & Programming Guide: Variant Codes, ZCS, EPROM and Flash Memory

Coding and programming allow for a reduction in the number of ECU hardware versions by providing the means to electronically write firmware onto a blank or used control module.
As a manufacturer of cars distributed worldwide, BMW must produce several variants of ECU versions to meet diverse requirements due to:
- The regulations of the specific country of operation
- The list of options installed on the car
- The engine configuration
Before coding and programming became available at dealership service centers, this process was performed only at the manufacturer's plant. Factory programming equipment would load the base firmware onto an empty control module. The base firmware was common for all automotive markets. Then, additional special data for the country of operation and variant-specific data for the particular car were flashed.
As the number of ECUs installed in a car increased, so did the number of their modifications required for spare parts sales. This led to enormous stocks of similar hardware that differed only in the coded firmware.
Coding and programming are the solution to this problem, allowing for a reduction in spare parts inventory and costs. The advantages of coding and programming at dealerships:
- Software update is possible (re-coding and service measures).
- Lower costs for spare parts and their inventory.
- Adding new options to an existing car (e.g., DWA alarm).
- Fewer ECU versions.
- Fine-tuning of various assemblies (e.g., engine CO adjustment).

There are several different methods used to provide operating instructions to a control module. The methods depend on the car, year of manufacture, and ECU type:
- DME Variant Coding.
- Car and Key Memory Coding.
- DME EPROM Programming.
- Central Coding Key (ZCS).
- DME Flash Memory Programming.
Where is the firmware stored in the control module?
One difference between a personal computer and a car's ECU is that the computer stores data on a hard drive, while the control module uses either EPROM or EEPROM, depending on the system.
EPROM (Erasable Programmable Read-Only Memory) is a removable chip with several connector pins that plug into the ECU's printed circuit board. Such a chip cannot be reprogrammed. To change the ECU firmware, the old chip needs to be desoldered from the PCB and a new blank one installed.

EEPROM (Electrically Erasable Programmable Read-Only Memory) is a chip soldered onto the printed circuit board, which is not removed from the control module. As their name suggests, EEPROMs can be electrically erased and reprogrammed without disassembling the control module. This is called "Flash Programming."
What is BMW Coding?
Through coding, a specific set of instructions that are already pre-programmed into the ECU can be selected. When a codable module is ordered as a spare part, it already contains all the programs necessary for any car version.
The programs are stored in the EPROM as "resident data." During the coding process, one set of instructions is activated in the control module (e.g., US version, with a lambda sensor, etc.). Coding is used for the majority of control modules in the car.
There are several types of coding:
- Variant Coding.
- ZCS Coding.
- Coding Code (Code Number).
- Car and Key Memory Coding.

What is Variant Coding?
The variant code is a 4-digit hexadecimal code that activates specific functions of the control module required by the car's market of operation. The variant code is stored in the control module after coding.
Variant coding via DIS/MoDiC/GT1 is applicable to all DME M1.X engine control modules (e.g., M1.3, M1.7, M1.7.2, etc.). DME M1.x control modules are the only DME modules that can be coded differently.
To put it simply, every DME 1.X ECU already has all the instructions and possible operating modes for any engine flashed into it. The variant code simply activates or deactivates the needed instructions (operating modes), for example: lambda sensor, fuel tank ventilation, etc.
DIS/MoDiC/GT1 allows you to:
- Code a new, uncoded control module.
- Re-code a previously coded control module (up to 7 times).
The variant code is entered into the control module in one of the following ways:
- Using the existing code from a faulty DME control module (if diagnostic communication is possible).
- Manual entry of the variant code.
During computer diagnostics of engines with the Bosch DME 1.X management system, it is necessary to check the correctness of the coded variant code. An incorrectly coded DME will create unusual and difficult-to-diagnose problems.

The four-digit structure of the variant code is a hexadecimal code consisting of two words. Each hexadecimal character provides specific information about the coding of the control module.
Intentional incorrect coding of a DME will not provide any performance benefits and may well lead to engine damage. DISLauncher can calculate and recalculate variant codes.

What is a Coding Code?
Coding Code (Code Number) - is a kind of analogue of the variant code, but if the variant code is used only in engine ECUs, the coding code is used by body modules. It was used as a temporary replacement for ZCS while it was under development, from October 1990 to September 1991 on BMW E34 and E32 bodies. It was applied only to the coding of DWA, EDC III, and IHKR 2/3.
The coding code is a single digit. As with variant coding, a single-digit code is entered into the MoDiC. Then MoDiC loads the correct coding data into the control module based on that one digit.

Coding of the coding code is only possible using a BMW MoDiC or a BMW Service-test Sun 2013!!!
Along with the VIN, the coding number of the installed ECU is printed on the label located on the underside of the fuse box cover.

What is the Central Coding Key (ZCS)?
The Central Coding Key is a unique 37-digit code that contains all information about the car's model and installed equipment. The ZCS code for a specific car is created at the factory, based on its individual specification and version. Coding equipment at the factory duplicates the ZCS and, after assembly, codes the control modules installed in the car.
The ZCS code is stored in one or two modules (depending on the car) and is retrieved by the DIS/MoDiC/GT1 software whenever coding of other control modules is necessary.
The process of coding ZCS-coded modules occurs by selecting or activating data maps already contained in the control module. Control modules have an EPROM in which "resident data" is pre-programmed. There is more information (data) than is necessary for the module to operate. This data is ready for activation as soon as the key is available to "unlock" the program. ZCS is called a key because it unlocks a specific set of instructions in a new control module or re-codes a used one.
Before coding a control module, DIS checks the compatibility of the stored ZCS code, coding data, and control module version. If they differ from each other, DIS will determine a new "Central Code."
The use of the central coding key began with the introduction of the E31 in 1990.

ZCS consists of 37 digits and is divided into 3 segments. The segments represent specific information about the car. Each segment ends with a "checksum." The checksum is a number or letter used by the coding software to detect unacceptable or implausible codes.
ZCS Segments:
GM = Main Characteristics
9 GM digits describe:
- Country of operation.
- Body type.
- Car type (E38, E46, etc.).
- Body equipment.
- Base language.
SA = Special Equipment
17 SA digits describe:
- Presence of headlight washers.
- Presence of an alarm (DWA).
- Presence of power windows.
- Car trim level.
- Presence of a sunroof.
- Presence of xenon headlights.
- etc.
VN = Version Number
11 VN digits describe:
- All data related to coding that does not belong to the main functions (GM) or special equipment (SA). For example: data dependent on the model year, software and hardware version, coding instructions, etc.

Originally, the ZCS code also contained a fourth line called AM = Drive Management. This 11-digit code was supposed to contain information related to engine control modules. AM was never used and was removed from ZCS early in the design phase.

Where is ZCS stored?
The master copy of ZCS is stored electronically in the car to provide the coding software with a source for retrieval. The ZCS code is stored in the instrument cluster or EKM and additionally in the EWS module on cars produced from 1/95 onwards. When coding a ZCS-coded control module, MoDiC/DIS/GT1 automatically searches for the stored location based on the car's VIN and identification information.


A label printed with the ZCS code was used as a backup to the electronic version stored in the control modules. This backup was necessary, particularly for cars where ZCS was stored in only one control module. The ZCS labeling was removed from all cars except the 318ti and Z3 from the end of March 1998. For the 318ti and Z3, the labels were removed from September 1998 when the instrument clusters became diagnosable.

What is BMW Programming?
Programming is entirely different from coding. New programmable ECUs contain identification information but do not have pre-recorded instructions.
During the programming operation, the corresponding specific data (e.g., ignition maps, fuel injection maps, shift points, etc.) is electronically written into the EPROM of the "basic control unit."
There are two types of basic control modules: programmable and flash-programmable. Programmable ECUs can have instructions written into their EPROM only once. If the dataset needs to be changed, the EPROM should be removed from the module and replaced with a new blank one.
The EEPROMs of flash-memory control modules are soldered onto the printed circuit board and are not removable. However, they can be electronically erased and rewritten multiple times, up to 14 times.

What is DME Programming with EPROM?
DME programming is used to convert a "basic control unit" into a "programmed control unit" by writing instructions into a blank EPROM. Programming is also used to update an existing DME program by writing additional instructions that supplement the existing software. Programming is used on Bosch M3.X DME variants:
- M3.3 - 740i/iL (E32 & E38), 540i, 530i,it, 840Ci
- M3.1 - 325i, is and 525i, with M50 engines up to 8/92
- M3.3.1 - 325i,is, 525i,it, from 9/92 and the M3
In an unprogrammed, basic state, the EPROM contains only "resident data." Resident data provides identification of the control module/EPROM for MoDiC/DIS/GT1 prior to actual programming. During programming, the EPROM is filled with the required ignition and injection characteristic maps, ECU constants, identification data, etc.

The need to program a control unit arises when:
- There is a recall campaign or a firmware update to a newer version.
- Installing a new basic control unit into a car.
- Replacing the EPROM in an existing ECU.
Attention!!!
The new EPROM chip must contain the basic "resident data." It is impossible to program an EPROM without the base data. This is precisely why a new EPROM needs to be ordered by part number, not just some look-alike from AliExpress. DIS simply will not program it.
What is DME EPROM Firmware Update?
A software update refers to customer service measures. The existing program in the EPROM is simply supplemented with new data. The amount of free space in the EPROM is always greater than the volume occupied by the primary firmware. It is into this reserved, but unused, section of the EPROM that new update data can be written.
Due to the limited reserved free space in the EPROM, the program update can only be performed once. DIS will display a corresponding notification if the EPROM has already been updated at any time. Updates and new DME firmware versions come with updated DIS releases.

Some larger updates have too many changes to fit into the reserved part of the EPROM. An update with that many changes requires replacing the EPROM with a basic one and performing a full reprogramming procedure.

What is DME Flash EEPROM Programming?
The procedure for programming a DME with flash memory is similar to EPROM programming, except for the absence of the need to extract the chip, as the EEPROMs are soldered onto the DME's printed circuit board.
When connected to the diagnostic port, DIS/MoDiC/GT1 uses the loaded software to communicate with the engine or transmission control module to establish an "authorized unlocked connection" with the control module. This communication is known as the "seed/key relationship" and is used solely for programming purposes. The connection is established as follows:
- DIS/MoDiC/GT1 initiates communication by requesting "seed" data from the control module.
- The control module responds by sending a seed value to DIS/MoDiC/GT1.
- Based on the received seed, DIS/MoDiC/GT1 generates "key" data and sends it back to the control module.
- Then the control module compares the received "key" data with a previously stored value. If they are identical, the control module "unlocks" in preparation for programming and sends confirmation to DIS/MoDiC to continue. If the "key" data is incorrect, the control module terminates the connection, preventing "unauthorized unlocking" as a security measure.
- The control module then allows DIS/MoDiC/GT1 to erase specific areas of the EEPROM to make room for update data or to program the firmware from scratch when a new basic module is installed in the vehicle.
