It seems that one of the most challenging aspects of our cars, is getting that little silver box between the seats to agree with what we have done to our engines

In this thread I will share what I know about computers (like the one Im using now, and like the one in my car) and ask our resident experts (Darth?, Rockcrawl?....) for there advice or knowlege about the ECM and how to tune it.
I am not good at tuning EFI's by any means, but I know alot about the system, and would like to get familiar with tuning it. But In order to do so, I need to know everything I dont already.
I know that 1/2-2/3 of the computer is used to interperate data coming in, and data going out. Turning the data into a value between 0-255 in the form of hexidecimal (witch is represented with a $ sign) $00-FF, and turning the $00-FF into useable outputs, such as pulse width for the injectors. 0 or 12 Volts on and off for solenoids, lights and motors.
The smaller part of the computer is just that. A very basic computer. The microprosessor is a motorola HC6811 (not quite a Pentium, not even a 286!) and it operates at I think 8Kbps. The microprosessor is stupid. All it does is do what its told to do. And that information comes in the form of a program witch is stored on the later half of a PROM (Programmable Read Only Memory). That PROM also has a whole section in the beginning of the chip that stores fixed variables, such as timing advance curves, Idle, when to turn the fan on, the check engine light, and so on. There is also a special part, either on the computer board itself, or attached to the PROM held within a modular unit, its called the CALPAK. What this does is it stores a small amount of data that is used to tell the microproessor how to function. It tells the computer what to do if the microprosessor (We'll call it the uP from here on) fails to run properly. Also, if your car is equipt with a knock sensor, this calpak interperates the signals coming from it.
Now that I've told you the very basics about our GM computers, now comes the interesting stuff.
Hexidecimal is a numbering system. The name kinda stands for 6+10 or 16. Decimal is our standard numbering system, where when we get past 9, we start over at 0, but put a 1 in front of it, and you have 10. Where Hexidecimal is different is, we go 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, THEN we get to 10. (witch is really 16 now isin't it? thats were it got the name hexidecimal) Makes you wish you had 6 more fingers to count on though
Then there is the numbering system we call Binary. Same consept, except theres only two numbers we are allowed to use. 0 and 1. this graph should help alot to compare the numbering systems
This is a VERY IMPORTANT thing to understand if you really want to know the nitty gritty about how computers work.
First colum is Decimal, second is Hexidecimal, third is binary.
,00 00 ,0000
,01 01 ,0001
,02 02 ,0010
,03 03 ,0011
,04 04 ,0100
,05 05 ,0101
,06 06 ,0110
,07 07 ,0111
,08 08 ,1000
,09 09 ,1001
10 0A ,1010
11 0B ,1011
12 0C ,1100
13 0D ,1101
14 0E ,1110
15 0F ,1111
16 10 10000
now your probably asking yourself "Why is this so important?"
The answer:
Computers don't have 10 fingers to count on. They only have "2 fingers to count on" The wire is either:
HI or LO
1 or 0
5 Volts or 0 Volts.
There are no exceptions. So what some genious thaught of is using binary to create numbers that computers can "use" to do things. The problem is, Binary is ugly. How can you look at 01101011 and know that it means 107? perhaps thats alittle too hard for the average person. (I admit I had to use my chart and a calculator) We can make it easier! So, thats why we have Hexidecimal to the rescue. Most uP's have 8 wires for data to pass through, Lets take that 01101011 number and put it through those 8 wires, the first one is 0 volts, the next 2 are 5 volts, the next 4 are 0 volts and the last one is 5 volts. So what we have accomplished is we put a number through 8 wires. Those 8 wires is what the uP uses to communicate with whatever it needs to. Now heres where Hexidecimal comes in. According to my little chart, 0110 is 6 and 1011 is B so 01101011 in hexidecimal is 6B. Where did I get 107? Simple, take the first number and multiply it by 16, then add the second number. 6 X 16 is 96, plus B (11) and youv'e got 107.
So, with 8 wires you can transmit anywhere from 00000000 to 11111111 witch in hex is 00 to FF or in decimal 0 to 255.
Bits and Bytes:
A "0" or a "1" Is called a bit. 01101011 or "6B" is a byte. your 60 Gigabyte Hard drive stores roughly 61,440,000,000 bytes. If one bit within those bytes is a 1 insted of a 0 or vice versa, your computer may mal-function. (Im not kidding!)
Knowing these numbering systems is the key to understanding how computers really work.
Now. When it all comes down to it, all we care about within the whole computer is the first half of the PROM. This is where the settings are stored. These settings can be modified to tune the car, but it is at your own risk. YOU CAN BLOW YOUR CAR UP! If you do something really wrong. The PROM chip is small by todays standards, it only stores about 4,000 - 32,000 bytes. You will be looking at your PROM chip in hexidecimal, you will never get to see it in just 0's and 1's.
Settings are stored in four different ways. Flags, Values, 2D (curves), 3D (Charts or maps).
Flags:
A flag is an on or off setting, a 1 or a 0.
Since you programing in hex, The Flags are grouped into 8. You may see 6B, but really it turns on or off 8 different things. So really, Flags are binary. You have to disect them using the chart. If you want to turn one item within the byte from a 0 to a 1, then your new Hex number could be fairly different. Lets say you wanted to turn the third bit of 6B (01101011) to a 0, then your new hex number would be 4B (01001011)
Values:
These are the simplest things to understand, basically, its anything that is set at 00-FF (0-255) lets say you want the fan to turn on when the temperature value gets to 195. you would change the value to 195 or "C3" . Simple really!
2D (curves or Arrays):
These are a series of values that form a curved line if you were to plot them out:
1E 2B 3A 48 57 66 78 89 would form a curve, but it doesn't really have to.
3D (charts or maps)
these are basically a series of arrays in sequence. They look like a ski slope when plotted in 3D.
These are used for the main spark control, And volumetric efficiency amongst other things.
To do tuning of your ECM, there is an assortment of "must have's" before you even contemplate attempting this.
First, you have to know everything about engines, how they work, what spark knock is, fuel pulse width, timing advance, Air to fuel ratios...
You need tools. At the very least, you need a prom burner, a prom eraser, a scan tool, software and some chips to burn. You would be much more sucsessful if you have a Wide band OČ sensor, a laptop, Data logging, and a PROM emulator. These things cost $$$.
Your software is VERY important when it comes to tuning. You can extract a Bin file (the information stored on the PROM) from the PROM and have a mess of useless numbers and letters, but with the software, you can make heads and tails of the information easily, and proceed to modify as necessary. Decoding the PROM chip is an extreemly difficult task and you probably don't want to go there. Thats why you spend the money on the software. The most popular editors I know of are Winbin, and Tunercat. Tunercat is supported, you get the definition files directly from them, they cost money though, but thats better then trying to make the definition files yourself.
If you find any mis information let me know. Feel free to add your knowlege and experiences as you so desire. I'm hoping that by sharing what I know about tuning and listening to what others know, I will learn how to go about taking on my specific tuning challanges and help others take on thers.