How ECU Long Coding Works

Let's review how long coding works. We'll do the long complicated math first. There have been a lot of questions as to how to calculate your long coding without the vag-com "long coding helper".

***NOTE***: I've fubared these codes so they are completely FALSE. Some of you are copying codes and ignoring the warnings. These codes posted are 100% FALSE, do not use them! DONOTJUSTCOPYTHISUSETHELONGCODINGHELPER - Yes, use the Long Coding helper in vag-com. You MUST start with your original coding to derive your new code. If you copy a code, bad things can happen, mmmmkay?

We'll start with my stock long coding from my GLI. Don't ever copy this code, that's bad ju-ju and hopefully you will see why it is as we break it down.

Select 09 (Central Electronics)
Long Coding -> Function 07

Original Coding:

Ok, that's the stock long coding! It's actually a group of hex digits that take two number places. Let's work with it. Each "byte" is two digits long, and it's in hex. In the computer world we start counting at 0, not 1, so we count 0,1,2,.... Byte 00 reads from left to right, so here's byte 00 in bold:


Byte 01 would then be the 07, Byte 02 would be 8E, etc. Got it so far? Ok, good. These digits are in hex. So we have to convert them to binary to work with them. But wait, how do we know what to change? Take a look at Sebastian's excellent page at If we want to disable DRL's, we can look in the Central Electronics chart. Here it is

Byte 00 Bit 4 Daytime Running Lights (North America)

Ok, so stick to the bytes, we aren't into bits yet. So if we work with Byte 00 in the example above, we see the digits as 17. Now open up your calculator. In windows click view -> Scientific. Then click on the Hex button. Put in your value of 17, then click on the Bin button. It should reveal a value of 10111. Ok, we are now into the bits!

Bits are read the opposite way as the Hex values. You actually read the individual 1's or 0's from right to left. The spot all the way right is actually Bit "0". But wait, there's only 5 digits in the binary number, the chart has bits 0-7. There are actually leading 0's, so the bin of 17 hex is actually 00010111. So if we look at this byte, we know DRL's are at bit 4. This is bit 4:


Just read right to left, starting at position "0". So we see that DRL's are on. We need to change Bit 4 to "0".


There's the new binary! Pop that into your calculator with "bin" checked. Then click HEX. It shows "7" because the leading zero is dropped. Hex is two digits, so we can add a leading "0". The Hex is actually "07".

So change the original long coding with the new hex value and you have a new long code of:


That's how to do the hex to bin changes. Still confused? You can use the long coding helper that comes with vag-com. You can click on the hex groups and it will display options with check boxes. That's much easier, but the question comes up sometimes on how this all works!

Posted in | Submitted by deviantspeed on Thu, 2006-11-16 23:28.
login to post comments | printer friendly version

Random D:S Image