612699
51
Zoom out
Zoom in
Previous page
1/94
Next page
Using Higher RS232 Baud Rates (continued)
* the 75 msec time is adjustable
with the AT BRT hh command
The sequence begins with the PC making a
request for a new baud rate divisor, with the BRD
command. For example, to try the 57.6K rate that was
previously discussed, the controlling PC would send:
AT BRD 45
If the ELM327 firmware is a very old version, it will
not support this command and will return with the
familiar ‘?’ response. If it does support the command, it
will respond with ‘OK’, so the software knows whether
to proceed or not. No prompt character follows the
‘OK’ reply; it is followed only by a carriage return
character (and optionally, a linefeed character).
Having sent the ‘OK’, the ELM327 then switches
to the new (proposed) baud rate, and then simply
waits the time set by the BRT command (it is 75 msec
by default). This period is to allow the PC sufficient
time to change its baud rate. When the time is up, the
ELM327 then sends the ID string (currently ‘ELM327
v2.1’) to the PC at the new baud rate (followed by a
carriage return character and optionally, a linefeed
character) and waits for a response.
Knowing that it should receive the ELM327 ID
string, the PC software compares what was actually
received to what was expected. If they match, the PC
responds with a carriage return character, but if there
is a problem, the PC sends nothing. The ELM327 is
meanwhile waiting for a valid carriage return character
to arrive. If it does (within 75 msec), the proposed
baud rate is retained, and the ELM327 says ‘OK’ at
this new rate. If it does not see a carriage return in the
75 msec ‘window’, the baud rate will revert back to the
original rate. Note that the PC might correctly output
the carriage return at this new rate, but the interface
circuitry could corrupt the character, and the ELM327
might not see a valid response, so your software must
check for an ‘OK’ response before assuming that the
new rate has been accepted.
Using this method, a program can quickly try
several baud rates, and determine the most suitable
one for the connected hardware. The new baud rate
will stay in effect until reset by an AT Z, a Power
off/on, or a MCLR input. It is not affected by the AT D
(set Defaults), or AT WS (Warm Start) commands.
Request for a new
baud rate divisor:
AT BRD hh
ELM327 responds
with ‘OK’
(if it is supported)
ELM327 sends
the AT I string
Program switches to
the new baud rate,
and waits for input
ELM327 waits
up to 75 msec*
for a carriage return
If the Rx is good,
Program sends a
carriage return
ELM327 says ‘OK’
(and remains at the
new baud setting)
Baud rate reverts
to the previous
baud rate
PC ELM327
CR
received
?
yes
no
Print a prompt,
and wait for the
next command
ELM327 switches to
new baud rate and
waits for 75 msec*
ELM327
51 of 94ELM327DSJ Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
51


Need help? Post your question in this forum.

Forumrules


Report abuse

Libble takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Product:

For example, Anti-Semitic content, racist content, or material that could result in a violent physical act.

For example, a credit card number, a personal identification number, or an unlisted home address. Note that email addresses and full names are not considered private information.

Forumrules

To achieve meaningful questions, we apply the following rules:

Register

Register getting emails for Elm 327 at:


You will receive an email to register for one or both of the options.


Get your user manual by e-mail

Enter your email address to receive the manual of Elm 327 in the language / languages: English as an attachment in your email.

The manual is 0,23 mb in size.

 

You will receive the manual in your email within minutes. If you have not received an email, then probably have entered the wrong email address or your mailbox is too full. In addition, it may be that your ISP may have a maximum size for emails to receive.

The manual is sent by email. Check your email

If you have not received an email with the manual within fifteen minutes, it may be that you have a entered a wrong email address or that your ISP has set a maximum size to receive email that is smaller than the size of the manual.

The email address you have provided is not correct.

Please check the email address and correct it.

Your question is posted on this page

Would you like to receive an email when new answers and questions are posted? Please enter your email address.



Info