ELM327
OBD Message Formats (continued)
as the ‘Target Address’ (TA), and the transmitter as
the ‘Source Address’ (SA).
difference really only relating to the structure of the
header. CAN header bytes are not referred to as
header bytes – they are called ‘ID bits’ instead. The
initial CAN standard defined the ID bits as being 11 in
number, while the more recent CAN standard now
allows for either 11 or 29 bit IDs.
Another concern when sending any message is
that errors might occur in the transmission, and the
received data may be falsely interpreted. To detect
errors, the various protocols all provide some form of
check on the received data. This may be as simple as
a sum calculation (ie a ‘running total’ of byte values)
that is sent at the end of a message. If the receiver
also calculates a sum as bytes are received, then the
two values can be compared and if they do not agree,
the receiver will know that an error has occurred.
Since simple sums might not detect multiple errors, a
more reliable (and more complicated) sum called a
Cyclic Redundancy Check (or ‘CRC’) is often used. All
of the protocols specify how errors are to be detected,
and the various ways of handling them if they occur.
The OBD data bytes are thus normally
encapsulated within a message, with ‘header’ bytes at
the beginning, and a ‘checksum’ at the end. The
J1850, ISO 9141-2, and ISO 14230-4 protocols all use
essentially the same structure, with three header
bytes, a maximum of seven data bytes and one
checksum byte.
The ELM327 does not normally show any of these
extra bytes unless you turn that feature on with the
Headers On command (AT H1). Issuing that allows
you to see the header bytes and the checksum byte
(for the J1850, ISO 9141 and ISO 14230 protocols).
For the CAN protocols, you will see the ID bits, and
other items which are normally hidden such as the PCI
byte for ISO 15765, or the data length codes (if they
are enabled with PP 29, or AT D1). Note that the
ELM327 does not display the checksum information
for CAN systems, or the IFR bytes for J1850 systems.
It is not necessary to ever have to set these
header byes, or to perform a checksum calculation, as
the ELM327 will always do this for you. The header
bytes are adjustable however, should you wish to
experiment with advanced messages such as those
for physical addressing. The next section provides a
discussion on how to do this…
The ISO 15765-4 (CAN) protocol uses a very
similar structure (see Figure 4, below), the main
‘header’ bytes
data bytes (8 in total)
7 data bytes
ID bits (11 or 29)
PCI
checksum
Figure 4. A CAN OBD Message
ELM327DSI
Elm Electronics – Circuits for the Hobbyist
37 of 82
www.elmelectronics.com