2. Output the Analog/Digital data values from the 16 Aux inputs ([see here for info on aux data input configuration](/en/configuration/Auxillary_IO_Configuration))
There are 10 diagnostic services described in the latest OBD-II standard SAE J1979. Before 2002, J1979 referred to these services as "modes". Speeduino supports only a selected number of these modes. These are:
Mode (hex) Description
- 01 Show current data
- 09 Vehicle information (VIN) (coming soon)
- 22 Manufacturer Specific data.
Mode 22 is a custom PID mode that is defined by the manufacturer.It is used to define additional services.
When using Bit-Encoded-Notation, quantities like C4 means bit 4 from data byte C. Each bit is numerated from 0 to 7, so 7 is the most significant bit and 0 is the least significant bit (See below).
5C 92 1 Engine oil temperature -40 210 °C A − 40 {\displaystyle A-40} {\displaystyle A-40}
60 96 4 PIDs supported [61 - 80] Bit encoded [A7..D0] == [PID $61..PID $80] See below
#### Bitwise encoded PIDs
Some of the PIDs in the above table cannot be explained with a simple formula. A more elaborate explanation of these data is provided here:
Example MODE 01 PID 00
A request for this PID returns 4 bytes of data (Big-endian). Each bit, from MSB to LSB, represents one of the next 32 PIDs and specifies whether that PID is supported.
For example, if the car response is BE1FA813, it can be decoded like this:
Speeduino responds to the Mode 22 request for the following PID:
PID(hex) PID(Dec) Data bytes returned Description Min value Max value Units Formula[a]
7701 0 2 AuxIn1 Data
7702 0 2 AuxIn2 Data
7703 0 2 AuxIn3 Data
7704 0 2 AuxIn4 Data
7705 0 2 AuxIn5 Data
7706 0 2 AuxIn6 Data
7707 0 2 AuxIn7 Data
7708 0 2 AuxIn8 Data
7709 0 2 AuxIn9 Data
770A 0 2 AuxIn10 Data
770B 0 2 AuxIn11 Data
770C 0 2 AuxIn12 Data
770D 0 2 AuxIn13 Data
770E 0 2 AuxIn14 Data
770F 0 2 AuxIn15 Data
7710 0 2 AuxIn16 Data
#### CAN (11-bit) bus format
The PID query and response occurs on the vehicle's CAN bus. Standard OBD requests and responses use functional addresses. The diagnostic reader initiates a query using CAN ID 7DFh[clarification needed], which acts as a broadcast address, and accepts responses from any ID in the range 7E8h to 7EFh. ECUs that can respond to OBD queries listen both to the functional broadcast ID of 7DFh and one assigned ID in the range 7E0h to 7E7h. Their response has an ID of their assigned ID plus 8 e.g. 7E8h through 7EFh.
This approach allows up to eight ECUs, each independently responding to OBD queries. The diagnostic reader can use the ID in the ECU response frame to continue communication with a specific ECU. In particular, multi-frame communication requires a response to the specific ECU ID rather than to ID 7DFh.
CAN bus may also be used for communication beyond the standard OBD messages. Physical addressing uses particular CAN IDs for specific modules (e.g., 720h for the instrument cluster in Fords) with proprietary frame payloads.
Query
The functional PID query is sent to the vehicle on the CAN bus at ID 7DFh, using 8 data bytes. The bytes are:
The vehicle responds to the PID query on the CAN bus with message IDs that depend on which module responded. Typically the engine or main ECU responds at ID 7E8h. Other modules, like the hybrid controller or battery controller in a Prius, respond at 07E9h, 07EAh, 07EBh, etc. These are 8h higher than the physical address the module responds to. Even though the number of bytes in the returned value is variable, the message uses 8 data bytes regardless (CAN bus protocol form Frameformat with 8 data bytes). The bytes are:
Byte
PID Type 0 1 2 3 4 5 6 7
SAE Standard
7E8h,
7E9h,
7EAh,
etc. Number of
additional
data bytes:
3 to 6 Custom service
Same as query, except that 40h is added to the service value. So:
41h = show current data;
42h = freeze frame;
etc. PID code
(e.g.: 05 = Engine coolant temperature) value of the specified parameter, byte 0 value, byte 1 (optional) value, byte 2 (optional) value, byte 3 (optional) not used
(may be 00h or 55h)
Vehicle specific
7E8h, or 8h + physical ID of module. Number of
additional
data bytes:
4to 7 Custom service: same as query, except that 40h is added to the service value.(e.g.: 62h = response to service 22h request) PID code
(e.g.: 4980h) value of the specified parameter, byte 0 value, byte 1 (optional) value, byte 2 (optional) value, byte 3 (optional)
Vehicle specific
7E8h, or 8h + physical ID of module. Number of
additional
data bytes:
3 7Fh this a general response usually indicating the module doesn't recognize the request. Custom service: (e.g.: 22h = enhanced diagnostic data by PID, 21h = enhanced data by offset) 31h not used