English
Language : 

ELM323 Datasheet, PDF (10/19 Pages) ELM Electronics – OBD (ISO) to RS232 Interpreter
ELM323
OBD Commands
If the bytes received on the RS232 bus do not
begin with the letters ‘A’ and ‘T’, they are assumed to
be OBD commands for the vehicle. Each pair of ASCII
bytes will be tested to ensure that they are valid
hexadecimal digits, and will then be combined into
single data bytes for transmitting to the vehicle.
OBD commands are actually sent to the vehicle
embedded in a data packet. The standards require
that three header bytes and an error checksum byte
be included with every message, and the ELM323
adds these extra bytes to your command bytes
automatically. The initial (default) values for these
header bytes are usually adequate for most requests,
but if you wish to change them, there is a method to do
so (see the Advanced Data Retrieval section).
When receiving data from a vehicle, the extra
header bytes are not normally displayed by the
ELM323. Occasionally vehicles will have more than
one module responding to a request, though, and it
may be useful to see the extra header bytes in order to
determine which ECU module responded. (The third
byte of the response is the address of the sender). To
view these extra header bytes, simply issue an AT H1
internal command, to turn the header printing on.
Most OBD commands are only one or two bytes in
length, but some can be three or more bytes long. The
ELM323 is capable of sending as many as seven data
bytes (14 hexadecimal digits), the maximum number
allowed by the standards. Attempts to send either an
odd number of hex digits, or too many digits will result
in a syntax error – the entire command is then ignored
and a single question mark printed.
Hexadecimal digits are used for all of the data
exchange with the ELM323 because it is the data
format used in the relevant SAE standards. It is
consistent with mode request listings and is the most
frequently used format used to display results. With a
little practice, it should not be very difficult to deal in
hex numbers, but some people may want to use a
table such as Figure 3, or keep a calculator nearby.
All users will be required to manipulate the results in
some way, though – combining bytes and dividing by 4
to obtain rpm, dividing by 2 to obtain degrees of
advance, etc., and may find a software front-end to be
more helpful.
As an example of sending a command to the
vehicle, assume that A6 (or decimal 166) is the
command that is required to be sent. In this case, the
user would type the letter A, then the number 6, then
would press the return key. These three characters
would be sent to the ELM323 by way of the RS232
port. The ELM323 would store the characters as they
are received, and when the third character (the
carriage return) was received, would begin to assess
the other two. It would see that they are both valid hex
digits, and would convert them to a one byte value
(decimal value is 166). Three header bytes and a
checksum byte would be added, and a total of five
bytes would be sent to the vehicle. Note that the
carriage return character is only a signal to the
ELM323, and is not sent on to the vehicle.
After sending the command, the ELM323 listens
on the OBD bus for messages, looking for ones that
are directed to it. If a message address matches,
those received bytes will be sent on the RS232 port to
the user, while messages received that do not have
matching addresses will be ignored (but still available
for viewing with the AT BD command).
The ELM323 will continue to wait for messages
addressed to it until there are none found in the time
that was set by the AT ST command. As long as
messages are received, the ELM323 will continue to
reset this timer. Note that the IC will always respond
with something, even if it is to say ‘NO DATA’,
(meaning that there were no messages at all
addressed to it).
Hexadecimal
Number
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Decimal
Equivalent
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Figure 3. Hex to Decimal Conversion
ELM323DSC
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
10 of 19