A Simple Program to Read Device Trouble Codes (RDDTC)
I wrote this program to assist in solving engine problems. It is very simple. It has 6 command buttons, two indicators and a text area. The program does nothing until one of the command buttons is tapped or characters are entered in the text box. The text area displays all the characters received by the PPC from the ELM chip. Since the program runs with "Echo" enabled, all characters sent from the PPC to the ELM are echoed and appear in the text area. (Note, the ELM seems to send a non-displayable character which the PPC displays as a "box" character. Someday I will track down what character that is and stop it from displaying.)
To run the program, you have to stop ActiveSync from controlling the serial port. Otherwise, when you plug in the serial cable you will see ActiveSync trying to connect.
Go to ActiveSync, Tools, Options, and un-check the box for "Enable sychronization when cradled using:"
If anyone knows some Visual Basic code that I can add to the program to do this, please pass it on to me.
The command buttons are:
Read MIL:
When tapped, it will read the status of the MIL (Malfunction Indicator Light) and the count of Device Trouble Codes (DTCs) that are set. If the count is nonzero, it will read the DTCs, decode them, and display them. For example, when Read MIL is tapped, a 0101 command is sent and echoed in the text box. The ELM might respond with 41 01 81 07 65 04 which will also appear in the text box. The program will decode the response (see the ELM data sheet for how decoding is done). In this case, the MIL is on and there is one DTC set. The program will change the MIL indicator to read "MIL Status ON" and DTCs Set indicator to "DTCs Set 1". It will then send a 03 command to get the DTCs that are set. A typical response might be 43 01 33 00 00 00 00. This will be decoded and displayed as:
"DTCs Set
P0133
P0000
P0000"
Note, only one DTC was set for this example so the second and third DTC fields are displayed as P0000.
Reset DTCs:
When tapped, you will be asked if you are sure you want to clear the DTCs. If you reply "Yes", All set and pending DTCs and the MIL will be cleared.
Read Pending:
When tapped, a 07 is sent which will return a list of DTCs that are pending but have not yet met the criteria to be set. For example, the problem has not existed for the required number of drive cycles. These will be decoded like the "set" DTCs.
Repeat Last: This will repeat the last line sent to the ELM.
Loop on Last:
This will send the last line once per second until "Stop" is tapped. Note, the Loop on Last button changes to Stop when looping.
View Help:
This will display a shorten form of this information. Tap "Hide Help" to return to the normal screen. Note, the View Help command changes to Hide Help when viewing help.
Text Area:
The text area can be used to enter any commands you wish. Just tap the characters you wish in the area and tap enter. For example, tap 010c in the text area and tap the enter key. The ELM could respond with something like:
41 0C 0F 94.
Which means the Engine RPM= 997.
i.e. 0F hex = 15 Decimal
94 hex = 140 Decimal
RPM=0.25*(15*256+140)=997
Now you can tap Loop on Last and get RPM updates once per second.
Right-click here and "Save Target As" to download the 11/02/04 version of the program.