Specifications

14 of 19ELM323DSD Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
Monitoring the Bus
Some vehicles use the OBD bus for information
transfer during normal vehicle operation, passing a
great deal of information over it. A lot can be learned if
you have the good fortune to connect to one of these
vehicles, and are able to decipher the contents of the
messages. Other vehicles cannot be initialized, and
instead continually send information; the only way to
read the data from them is by monitoring everything
that is being sent, and extracting the useful data.
To see how your vehicle uses the OBD bus, you
will have to enter the ELM323’s ‘Monitor All’ mode, by
sending the command AT MA from your terminal
program. Once received, the IC will continually display
information that it sees on the OBD bus, regardless of
transmitter or receiver addresses. Note that the
periodic ‘wakeup’ messages are not sent while in this
mode, so the bus may ‘go to sleep’ in a short time.
The monitoring mode can only be stopped by
sending a single character over the RS232 connection
to the ELM323. Any single character will interrupt the
IC, returning it to the command mode (waiting for an
input). Note that the character you send will be
discarded, and will have no effect on any subsequent
commands. The time it takes to respond to this
interrupting character will depend on what the ELM323
is doing when it is received. The IC will always finish a
task that is in progress (printing a line, for example)
before returning to wait for input, so you should always
Computer Control – Using Packed Data
If a person is simply asking a vehicle for the
current Diagnostic Trouble Codes, speed is normally
not an issue, as data is displayed (essentially) as
quickly as it can be read. If interfaced to a computer,
however, speed may be very important.
The ‘Packed Data’ mode is a convenient means to
effectively triple the ELM323’s data transfer rate while
maintaining the 9600 baud connection. Once entered
(with AT PD), all OBD messages will be returned as a
single length byte followed by the actual data bytes.
There are no space characters sent between the
bytes, and no carriage returns or linefeeds between
messages either – the data is simply retransmitted
exactly as received from the vehicle. While no longer
readable by a person, computers will understand this
information, and will gain speed through both reduced
transfer and reduced data conversion times. The
ELM323 does not function any differently when in this
wait for the prompt character (‘>’) before continuing to
issue other commands.
If the headers are not currently displayed, simply
typing AT MA shows only the contents of messages, not
the transmitter and receiver addresses. To show who is
sending to whom, you will need to first turn headers on
(AT H1) before beginning to monitor (AT MA).
There is a slight possibility that OBD messages
could be missed by the ELM323 while it is retransmitting
a previous OBD message on the RS232 connection.
This is due to the fact that the ELM323 is a single-
tasking microprocessor that does not have hardware to
buffer all of the OBD data in the background while it is
performing other tasks. Should an OBD message begin
while the IC is ‘talking’ on the RS232 bus, several bytes
may be missed, and a ‘<DATA ERROR’ message will
likely be displayed. Usually the vehicle ECUs provide
tens of milliseconds between messages and this is not a
problem, but we are just warning that if an ECU should
be transmitting data at a very high rate, it may
overwhelm the ELM323, and DATA ERRORs could
result. If this occurs, you may want to reduce the amount
of RS232 data sent by turning linefeeds off, and using
the ‘packed data’ mode. Most users will never encounter
this problem, and so this limitation will not be noticeable.
mode – if the headers are to be displayed, they are
sent, if in monitoring mode, data is continually sent,
etc. The only difference is in the format in which the
OBD responses are returned to the controlling
computer.
Often there is no response from the vehicle for a
particular request. When in the default (formatted data)
mode, this is shown with ‘NO DATA’ being printed, but
while in the Packed Data mode you will only receive a
single length byte of value 0 (zero).
While rare, errors may occasionally be detected in
the vehicle’s data. Normally, a ‘<DATA ERROR’ would
be printed for this, but in the Packed Data mode,
checksum errors are identified by setting the most
significant bit of the length byte. Because of this, one
should always check the length byte for a value of 128
or greater before processing the remainder of the
message.
ELM323