ELM327
Programming Serial Numbers
A number of our customers have asked for ways
to uniquely identify the circuit that uses our integrated
circuit. While this often took the form of a ‘serial
number’, people occasionally asked for a way to store
dates, and possibly version codes. The @2 and @3
commands were created to assist with this.
If you send the command AT @2 to a new
ELM327 integrated circuit, you will receive an error.
That is, you will see a response that looks like this:
printable group - ie in the range from ‘!’ to ‘_’ (ie hex 21
to hex 5F). Typically, the command would look like:
>AT @3 MYBOARD_9906
OK
This number can never be altered once it is
entered, so you must be sure that you are entering the
values properly. If developing code which does this,
you may find that purchasing an ELM328 IC will save
some trial and error coding with ELM327s.
>AT @2
?
Once the @3 code is set, it will always be
available through the @2 command:
In the above dialog, the ELM327 is trying to tell
you that either the chip is very old and does not
support the command, or that nothing has been
programmed into the @2 memory locations yet.
To program characters into the @2 memory, you
must provide exactly 12 characters using the @3
command. These characters must be in the ASCII
>AT @2
MYBOARD_9906
That’s all there is to using the ELM327 device
identifier.
Saving a Data Byte
The ELM327 provides one memory location that
can be used to save any single byte of information.
Typically, users set flags depending on software
choices, and store these flags in this one spot. Storing
data is easily done with the Save Data command - for
example, to save the value 7F, simply send:
>AT SD 7F
OK
and data is just as easily retrieved using the Read
Data command:
>AT RD
7F
This single byte of data is stored in the internal
EEPROM array, and is subject to the usual limits of
the EEPROM technology - unlimited reads, but
typically only about 1 million writes, with a retention
rating of more than 40 years. This does not pose any
limits to any users that we are aware of.
ELM327DSI
Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
56 of 82