
45 of 83
ELM329DSC
Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
ELM329
Using Higher RS232 Baud Rates
The RS232 serial interface has been maintained
throughout the ELM OBD products, largely due to its
versatility. Although the ELM329 only offers a serial 0
to 5V signal level, you may connect that to a large
number of interfaces. Traditional RS232 interfaces
such as those shown in Figures 11 and 12 (in the
Example Applications section) may be used to connect
to older computers, microprocessors and PDAs.
Alternatively, a USB converter, a Bluetooth module, or
possibly ethernet or wifi interfaces may be used to
connect to many more devices and systems. It is
simply one of the most versatile interfaces available.
Many circuits have been built using the ELM329
integrated circuit and a serial interface. Typical
interfaces such as those shown in Figures 11 and 12
(in the Example Applications section) work very well,
but there are many other alternatives that work just as
well. For most applications all that is required is the
default 38.4 kbps data rate, and the circuit of Figure 11
works very well for this. If pushed beyond 57.6 kbps,
however, it will likely begin to have problems. The
circuit of Figure 12 offers a solution if you are looking
to extend your data rate up to 250 kbps (if you use a
MAX3222E, but a MAX3222 is limited to 120 kbps).
A standard RS232 interface needs large voltage
swings, which are difficult to maintain at high data
rates (as there are large cable capacitances to
contend with). For this reason, if you wish to operate at
rates higher than about 230 kbps, you should look at
alternatives.
One alternative is a direct connection to a
microprocessor, which we discuss in the
Microprocessor Interfaces section. Another alternative
is to use a USB interface.
The USB interface is capable of very high data
transfer rates, certainly much higher than the ELM329
is capable of. Several manufacturers offer special
‘bridge’ circuits that simplify connecting a serial device
(such as the ELM329) directly to the USB bus.
Examples are the FT232R or the DB9-USB module
from Future Technology Devices (see their web site at
http://www.ftdichip.com/) or the CP2102 from Silicon
Labs (http://www.silabs.com/). We show the DB9-USB
module connected in Figure 9, while the CP2102 is
shown in Figure 13. If planning to use the higher baud
rates, a USB interface should be seriously considered.
No matter what type of connection you use to
bring your ELM329 data out, the ELM329 will see it as
a serial connection. As shipped, the ELM329 can be
used at data rates of either 9600 baud, or 38400 baud
(the voltage level at pin 6 during power up or reset
determines the rate used). While the 9600 baud rate is
not adjustable, the 38400 one is. There are two ways
that the rate can be changed – either permanently with
a Programmable Parameter, or temporarily with an AT
command.
Programmable Parameter ‘0C’ is the memory
location that allows you to permanently store a new
baud rate which replaces the 38.4 kbps rate. The
value that you assign is stored in EEPROM, so is not
affected by power cycles or resets (but changing this
value may affect the operation of some software
packages, so be careful how you use it).
If you store a new value in PP 0C, then enable it,
and if pin 6 is at a high level during the next powerup,
your stored rate will become the new data rate. As an
example, perhaps you would like to have the ELM329
use a baud rate of 57.6 kbps, rather than the factory
setting of 38.4 kbps. To do this, you will need to
determine the required value for PP 0C, store this
value in PP 0C, and then enable the PP.
The value stored in PP 0C is actually an internal
divisor that is used to determine the baud rate (the
baud rate will be 4000 kbps divided by the value
stored in PP 0C). To obtain a setting of 57.6, a baud
rate divisor of 69 is required (4000/69 is approximately
57.6). Since 69 in decimal is 45 in hexadecimal, you
need to tell the ELM329 to set the value of PP 0C to
45. The following command is used for that:
>AT PP 0C SV 45
To use the value stored in PP 0C requires that it
be enabled as well:
>AT PP 0C ON
From that point on, the default data rate will be
57.6K, and not 38.4K. Note that the value that you
write does not become effective until the next full reset
(a power off/on, AT Z, or MCLR pulse).
If you are designing your own circuitry, you will
know what speed your interface is capable of, and can
simply assign a value to PP 0C. Software developers
will not usually know what hardware is to be
connected, however, so will not know what the
limitations are. For these users, we have provided the
BRD command.
This command allows a new baud rate divisor to
be tested, and then accepted or rejected depending on
the results of the test. The chart shown here helps to