View Single Post
Old 01-30-2011, 08:36 AM   #27 (permalink)
EcoModding Apprentice
Join Date: Jan 2011
Location: Australia
Posts: 179

Sonata97 - '97 Hyundai Sonata GL
90 day: 25.96 mpg (US)

Pulsar - '03 Nissan Pulsar ST
Team Nissan
90 day: 36.09 mpg (US)

Lancer - '04 Mitsubishi Lancer
90 day: 31.11 mpg (US)

Lancer 2.0 - '09 Mitsubishi Lancer
90 day: 27.1 mpg (US)
Thanks: 9
Thanked 16 Times in 13 Posts
I'm not doing anything other than read and use the data!

The baud rate is 1920. The code on Source Forge for mmcd shows it as 1920, despite the webpage claiming 1953 - I checked with 1953 anyway.

Perhaps my breadboard, 2 x MAX232 chips, 12 capacitors, resistors, or the chopped cabling is noisy.

Another issue is the arduino might not have finished receiving when i've called (tho I do insist on either 2 bytes or 100ms).

So, there's still some elimination room there which I hope to tackle after work tomorrow maybe.

I haven't done anything with any form of oscilloscope.
I've simply got the MAX232 circuit facing the ALDL port, then another MAX232 taking it to TTL levels, then the arduino processing the data, then a USB -> TTL adapter to the serial monitor.

It is almost certainly, the circuit, or the ECU, or the timing of the arduino, affecting the data I am getting, the coincidence in the data (i.e. a "5A" value instead of "1A").

Below is another example too I guess:
RPM: Resultat 0: 39Dat 1: DBDB|RPM Val: 6843
RPM: Resultat 0: 39Dat 1: 1B1B|RPM Val: 843

I can only assume (though cannot explain) that '39' is the HEX of the query I sent (0x21).
DB is bad response, 1B is the correct response.
(The doubling up is actually done in code here, the second DB was my initial output to result, before I decided to push out the DAT value from within the function).
The above is the same 0x21 asked twice.

I did start looking at binary for what DB and 1B are - they appear very similar - which is where I thought electrical noise (a 1 being inadvertantly picked up), or, for example, the full data hadn't been received to make a 1B so DB resulted.. somehow...

The simpler circuit (i.e. remove the MAX232 facing the car, use just diode and resistor), might help - it might not.

  Reply With Quote