GM ALDL interface

Terryk terryk at foothill.net
Sun Dec 7 18:26:45 GMT 1997


Ok,here is some of the stuff.

These numbers matched reality very closely:

6.25mS period 9 bits
9 1's specify start of data
Every byte has the first bit set to 1's

So you know where the data starts, where the byte starts, and where the
bits start.

0->1 transition valid for 200us
Data field 0/1 valid for 3.025mS
Return to 0 valid for 3.025mS

That adds to the 6.25ms as specified.       

The spec in the archives is dead-nuts on.
************************************************

Based on that: 

1.Change the TOD int to interrupt and jump to an lpt read every 50uS.
This assures you will catch the 0->1 transition at the start of bit.

2. The int routine reads the lpt line of your choice (that you connected a
simple level shifter to). Remember that CE data and Serial Data are
inverted from each other. You will need to add a bit inversion in this
routine.

So now every, 50uS a sample is taken and stored in a buffer. Most 160 data
lengths are 20-25 bytes, so the buffer needs to be say 25x9x4 or 900 long
but because you may start in the middle of a stream, make it twice as long.
In there is one complete data package. But it contains the unfiltered data.

3. Search through the data received and look for a 0 followed by a 1. This
only occurs at the start of the each bit and no where else.

4. When found, skip the next 8 samples and take the next and store it to
another place. No matter what, you are in the data area (8x50uS) = 400uS.
You could skip up to the next 40 or so and still be in the data area.

5. Do this for 9 bits (start and then 8 data bits) and store them.

6. Repeat that process until the sample bits are read and converted to
bytes.

If you set this up as a circular buffer being filled in the background, and
read in the foreground, the conversion is seamless.

What the bytes means are the next step. The 160 Fiero (which follows the
standard pretty close) is in the archive. It is speed density and they tend
to follow a common format. I have the 160 baud mass air flow list for
anyone interested.TBI is a third beast, but if should follow one of those
fairly close and you can play with sensors to see what data changes.

Remember, CE 160 lamp data (D?) is inverted from Serial 160 data (pin E or
M), so you will need to invert the bits just after they are read. 

A little hint, search the internet for a game timer scaling factor routine.
With that, you can specify a sample rate. 

I looked for my lists of why a uart wouldn't work, but I can't find it. It
was something subtle. It certainly wasn't a divisor issue, but something
about 9 bit (1 start 8 bit) that wouldn't work.

Oh well, that's my 2 cents worth on the subject!

Terry



More information about the Diy_efi mailing list