B4 looks to be checksum. in fact, i just did a test in tunerpro and F4 57 01 00 uses a checksum of B4.
So here is my code below
zero is an int value of 0 because Serial.write(0x00) doesn't compile for some reason.
Serial.write(0x4B); // Packets derived from Serial Monitor
Serial.write(0x05);
Serial.write(0x49);
Serial.write(0xF4);
Serial.write(0x57);
Serial.write(0x01);
Serial.write(zero);
Serial.write(0xB4);
Serial.write(0x99);
/*
Serial.write(0xF4); // Packets from TP5 ADX File
Serial.write(0x57);
Serial.write(0x01);
Serial.write(zero);
Serial.write(0xB4); // Sum Check
*/
/*
Serial.write(0xF4); // Packets from online PDF Project
Serial.write(0x56); // Note that this is different than ther ADX file AND the Serial Monitor data
Serial.write(0x01);
Serial.write(0xB5);
*/
if (Serial.available() > 0) {
incomingByte = Serial.read(); // read the incoming byte:
lcdPosition(90); // Show Data here:
LCD.print("Data! ");
LCD.print(incomingByte);
}
Can anyone verify that this is the correct way to be sending these commands? I have the ALDL connected with the diode and resistor configuration which I have used with TunerPro and it acquires data to TunerPro that way. (It still disconnects when I start the engine, but that's another thread.)
I could try using the circuit in that PDF school project, but I'll have to figure out how to break out the DTR pin on the processor chip. I'm not really interested in doing that right now.
Familiar with 1227747 and 16197427 PCMs
FSJ Guy: that code looks good. I have to look at the datasheet for the max232 to see if it's output +12/-12V or TTL serial.
I would just use the circuit in that PDF doc which uses a couple of PNP transistors to interface the two serial lines on the arduino with the one aldl bi-directional serial line.
If you want to read multiple bytes from serial in Arduino you need a loop or you need to call Serial.read() multiple times. Of course, if you need to send some bytes, then get some bytes, and repeat that, then that code can appear in the loop() function. In Arduino land, the microcontroller calls your setup() function once. Then it basically does a loop calling the loop() function like:
while(1) {
loop();
}
I will try and get back here with more info. I've done quite a bit of stuff with Arduino but very little (so far) with GM EFI systems -- that's soon to change as I convert my Grand Wagoneer to EFI as FSJ Guy has done.
One though for those not comfortable with C, you might look into one of the BASIC options like the BASIC Stamp (there are a couple others). But you might as well start with C and with Arduino as it has a MASSIVE following by lots of non-technical as well as technical folks, so there are loads of examples and help to be had.
Michael
1990 Chevy Suburban 5.7L Auto ECM 1227747 $42!
1998 Chevy Silverado 5.7L Vortec 0411 Swap to RoadRunner!
-= =-
I have been checking into this and I guess we are not the only ones that have had this idea! Just came across this http://arduino.cc/forum/index.php/topic,8218.0.html
Yep, plenty of this same idea floating around, many for OBDII. There is an OBD0 and OBD1 Honda display project that has been documented as well. The communication with the ECM is a little different, though similar to communication with a GM ECM. For the Honda the serial communications connects directly to the board in the ECM, that has separate tx and rx pins, and queries for each parameter, instead of being spit out in a stream it seems.
Speaking of Arduino, is it bad, that after doing 5 C programming labs at school (and several hours at home), that I want to end sentences with ";"? lol
The man who says something is impossible, is usually interrupted by the man doing it.
Probably not as bad as starting the sentences with ;
Square body stepsides forever!!!
The MAX 232 circuit is used to convert a serial RS232 signal to ALDL. There are two parts to the circuit. The first is the MAX232 chip itself. The chip converts the RS232 signal to a TTL signal. Then from there the diode and resistor converts the TTL signal to the ALDL 8192 signal.
Since the Arduino pins are already a TTL type signal, there is no need to use the MAX232 chip. I don't believe you can get away with the simple diode/resistor interface to convert an Arduion TTL signal to the 8192 ALDL interface however.
I also don't believe you can get away with the 'just tie them together' trick to interface the TTL to 8192 ALDL either.
// idk maybe it was funny
Last edited by phonedawgz; 10-18-2012 at 06:40 AM.
Bookmarks