P-codes, or OBD-II PIDs On Board Diagnostics “Parameter IDs”, are codes used to request data from a vehicle, used as a diagnostic tool. These codes are part of SAE standard J/1979, required to be implemented in all cars sold in North America since 1996.
Typically, an automotive technician will use PIDs with a scan tool connected to the vehicle’s OBD-II connector.
There are ten modes of operation described in the latest OBD-II standard SAE J1979. They are, the $ prefix indicating a hexadecimal number:
$01. Show current data
$02. Show freeze frame data
$03. Show stored Diagnostic Trouble Codes
$04. Clear Diagnostic Trouble Codes and stored values
$05. Test results, oxygen sensor monitoring (non CAN only)
$06. Test results, other component/system monitoring (Test results, oxygen sensor monitoring for CAN only)
$07. Show pending Diagnostic Trouble Codes (detected during current or last driving cycle)
$08. Control operation of on-board component/system
$09. Request vehicle information
$0A. Permanent DTC’s (Cleared DTC’s)
Vehicle manufactures are not required to support all modes.
Each manufacturer may define additional modes above #9 (e.g.: mode 22 as defined by SAE J2190 for Ford/GM, mode 21 for Toyota) for other information (e.g.: the voltage of the Traction Battery in a HEV).
The table below shows the standard OBD-II PIDs as defined by SAE J1979. The expected response for each PID is given, along with information on how to translate the response into meaningful data. Again, not all vehicles will support all PIDs and there can be manufacturer-defined custom PIDs that are not defined in the OBD-II standard.
Note that modes 1 and 2 are basically identical, except that Mode 1 provides current information, whereas Mode 2 provides a snapshot of the same data taken at the point when the last diagnostic trouble code was set. The exceptions are PID 01, which is only available in Mode 1, and PID 02, which is only available in Mode 2. If Mode 2 PID 02 returns zero, then there is no snapshot and all other Mode 2 data is meaningless.
Mode(hex) | PID(hex) | Data bytes returned | Description | Min value | Max value | Units | Formula |
---|---|---|---|---|---|---|---|
01 | 00 | 4 | PIDs supported [01 - 20] | Bit encoded [A7..D0] == [PID 0x01..PID 0x20] | |||
01 | 01 | 4 | Monitor status since DTCs cleared. (Includes malfunction indicator lamp (MIL) status and number of DTCs.) | Bit encoded. See below. | |||
01 | 02 | 8 | Freeze DTC | ||||
01 | 03 | 2 | Fuel system status | Bit encoded. See below. | |||
01 | 04 | 1 | Calculated engine load value | 0 | 100 | % | A*100/255 |
01 | 05 | 1 | Engine coolant temperature | -40 | 215 | °C | A-40 |
01 | 06 | 1 | Short term fuel % trim—Bank 1 | -100 (Rich) | 99.22 (Lean) | % | (A-128) * 100/128 |
01 | 07 | 1 | Long term fuel % trim—Bank 1 | -100 (Rich) | 99.22 (Lean) | % | (A-128) * 100/128 |
01 | 08 | 1 | Short term fuel % trim—Bank 2 | -100 (Rich) | 99.22 (Lean) | % | (A-128) * 100/128 |
01 | 09 | 1 | Long term fuel % trim—Bank 2 | -100 (Rich) | 99.22 (Lean) | % | (A-128) * 100/128 |
01 | 0A | 1 | Fuel pressure | 0 | 765 | kPa (gauge) | A*3 |
01 | 0B | 1 | Intake manifold absolute pressure | 0 | 255 | kPa (absolute) | A |
01 | 0C | 2 | Engine RPM | 0 | 16,383.75 | rpm | ((A*256)+B)/4 |
01 | 0D | 1 | Vehicle speed | 0 | 255 | km/h | A |
01 | 0E | 1 | Timing advance | -64 | 63.5 | ° relative to #1 cylinder | A/2 – 64 |
01 | 0F | 1 | Intake air temperature | -40 | 215 | °C | A-40 |
01 | 10 | 2 | MAF air flow rate | 0 | 655.35 | g/s | ((A*256)+B) / 100 |
01 | 11 | 1 | Throttle position | 0 | 100 | % | A*100/255 |
01 | 12 | 1 | Commanded secondary air status | Bit encoded. See below. | |||
01 | 13 | 1 | Oxygen sensors present | [A0..A3] == Bank 1, Sensors 1-4. [A4..A7] == Bank 2… | |||
01 | 14 | 2 | Bank 1, Sensor 1:Oxygen sensor voltage, |