NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
ELM327 RS232 ELM320 ELM322 ELM323 J1850 J1939 ELM327DSF ELM327P ELM327SM ERR94 - Datasheet Archive
OBD to RS232 Interpreter Description Features Almost all new automobiles produced today are required, by law, to provide an
ELM327 ELM327 OBD to RS232 RS232 Interpreter Description Features Almost all new automobiles produced today are required, by law, to provide an interface from which test equipment can obtain diagnostic information. The data transfer on these interfaces follow several standards, none of which are directly compatible with PCs or PDAs. The ELM327 ELM327 is designed to act as a bridge between these On-Board Diagnostics (OBD) ports and a standard RS232 RS232 interface. The ELM327 ELM327 builds on improved versions of our proven ELM320 ELM320, ELM322 ELM322, and ELM323 ELM323 interfaces by adding seven CAN protocols to them. The result is an IC that can automatically sense and convert the most common protocols in use today. There are a number of other improvements as well a high speed RS232 RS232 option, battery voltage monitoring, and customizable features through programmable parameters, to name only a few. The ELM327 ELM327 requires few external components to make a fully functioning circuit. The following pages discuss the interface details, and show how to use the IC to `talk' to your vehicle, then concludes with two schematics to get you started. · Supports 12 protocols · RS232 RS232 baud rates to 500Kbps · Automatically searches for protocols · Fully configurable with AT commands · Voltage input for battery monitoring · Low power CMOS design Connection Diagram PDIP and SOIC (top view) MCLR OBD Tx LED Vmeasure OBD Rx LED J1850 J1850 Volts RS232 RS232 Tx LED J1850 J1850 Bus+ RS232 RS232 Rx LED Memory CAN Rx Baud Rate CAN Tx LFmode ISO L VSS ISO K XT1 VDD XT2 VSS Applications VPW In · Automotive scan tools RS232 RS232 Rx ISO In · Diagnostic trouble code readers RS232 RS232 Tx PWM In Busy J1850 J1850 Bus- · Teaching aids RTS 4.00 MHz Block Diagram Memory 5 XT1 9 10 XT2 MCLR 1 Vmeasure 2 Baud Rate 6 LFmode 7 RS232Rx 18 RS232Tx 17 RTS 15 Busy A/D Converter Command and Protocol Interpreter 16 RS232 RS232 Interface CAN ISO 15765-4 SAE J1939 J1939* 23 25 26 27 28 status LEDs ELM327DSF ELM327DSF 24 ISO 9141-2 ISO 14230-4 21 22 12 OBD interfaces Elm Electronics Circuits for the Hobbyist www.elmelectronics.com SAE J1850 J1850 PWM & VPW 3 4 14 13 11 *some support 1 of 59 ELM327 ELM327 Pin Descriptions MCLR (pin 1) A momentary (>2µsec) logic low applied to this input will reset the ELM327 ELM327. If unused, this pin should be connected to a logic high (VDD) level. Vmeasure (pin 2) This analog input is used to measure a 0 to 5V signal that is applied to it. Care must be taken to prevent the voltage from going outside of the supply levels of the ELM327 ELM327, or damage may occur. If it is not used, this pin should be tied to either VDD or VSS. J1850 J1850 Volts (pin 3) This output can be used to control a voltage supply for the J1850 J1850 Bus+ output. The pin will output a logic high level when a nominal 8V is required (for J1850 J1850 VPW), and will output a low level when 5V is needed (as for J1850 J1850 PWM applications). If this switching capability is not required for your application, this output can be left open-circuited. J1850 J1850 Bus+ (pin 4) This active high output is used to drive the J1850 J1850 Bus+ Line to an active level. Note that this signal does not have to be used for the Bus- Line (as was the case for the ELM320 ELM320), since a separate J1850 J1850 Bus- drive output is provided on pin 14. reset, the baud rate will be set to 38400 (or the rate that has been set by PP 0C). If at a low level, the baud rate will always be 9600. LFmode (pin 7) This input is used to select the default linefeed mode to be used after a power-up or system reset. If it is at a high level, then by default messages sent by the ELM327 ELM327 will be terminated with both a carriage return and a linefeed character. If it is at a low level, lines will be terminated by a carriage return only. This behaviour can always be modified by issuing an AT L1 or AT L0 command. VSS (pins 8 and 19) Circuit common must be connected to these pins. XT1 (pin 9) and XT2 (pin 10) A 4.000 MHz oscillator crystal is connected between these two pins. Loading capacitors as required by the crystal (typically 27pF each) will also need to be connected between each of these pins and circuit common (Vss). Note that this device has not been configured for operation with an external oscillator it expects a crystal to be connected to these pins. Use of an external clock source is not recommended. Memory (pin 5) This input controls the default state of the memory option. If this pin is at a high level during power-up or reset, the memory function will be enabled by default. If it is at a low level, then the default will be to have it disabled. Memory can always be enabled or disabled with the AT M1 and AT M0 commands. VPW In (pin 11) This is the active high input for the J1850 J1850 VPW data signal. When at rest (bus recessive) this pin should be at a low logic level. This input has Schmitt trigger waveshaping, so no special amplification is required. Baud Rate (pin 6) This input controls the baud rate of the RS232 RS232 interface. If it is at a high level during power-up or ISO In (pin 12) This is the active low input for the ISO 9141 and ISO 14230 data signal. It is derived from the K Line, and should be at a high logic level when at All rights reserved. Copyright 2005, 2006, 2007, and 2008 by Elm Electronics Inc. Every effort is made to verify the accuracy of information provided in this document, but no representation or warranty can be given and no liability assumed by Elm Electronics with respect to the accuracy and/or use of any products or information described in this document. Elm Electronics will not be responsible for any patent infringements arising from the use of these products or information, and does not authorize or warrant the use of any Elm Electronics product in life support devices and/or systems. Elm Electronics reserves the right to make changes to the device(s) described in this document in order to improve reliability, function, or design. ELM327DSF ELM327DSF Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 2 of 59 ELM327 ELM327 Pin Descriptions (continued) rest (bus recessive). No special amplification is required, as this input has Schmitt trigger waveshaping. PWM In (pin 13) This is the active low input for the J1850 J1850 PWM data signal. It should normally be at a high level when at rest (ie. bus recessive). This input has Schmitt trigger waveshaping, so no special amplification is required. J1850 J1850 Bus- (pin 14) This active high output is used to drive the J1850 J1850 Bus- Line to an active (dominant) level for J1850 J1850 PWM applications. If unused, this output can be left open-circuited. RTS (pin 15) This active low "Request To Send" input can be used to interrupt the OBD processing in order to send a new command. Normally high, the line is brought low for attention, and should remain so until the Busy line (pin 16) indicates that the ELM327 ELM327 is no longer busy. This input has Schmitt trigger waveshaping. Busy (pin 16) This active high output shows the current state of the ELM327 ELM327. If it is at a low level, the processor is ready to receive ASCII commands and characters, but if it is at a high level, commands are being processed. RS232Tx (pin 17) This is the RS232 RS232 data transmit output. The signal level is compatible with most interface ICs (output is normally high), and there is sufficient current drive to allow interfacing using only a PNP transistor, if desired. RS232Rx (pin 18) This is the RS232 RS232 receive data input. The signal level is compatible with most interface ICs (when at idle, the level is normally high), but can be used with other interfaces as well, since the input has Schmitt trigger waveshaping. VDD (pin 20) This pin is the positive supply pin, and should always be the most positive point in the circuit. Internal circuitry connected to this pin is used to provide power on reset of the microprocessor, so an external reset signal is not required. Refer to the Electrical Characteristics section for further information. ISO K (pin 21) and ISO L (pin 22) These are the active high output signals which are used to drive the ISO 9141 and ISO 14230 buses to an active (dominant) level. Many new vehicles do not require the L Line if yours does not, you can simply leave pin 22 open-circuited. CAN Tx (pin 23) and CAN Rx (pin 24) These are the two CAN interface signals that must be connected to a CAN transeiver IC (see the Example Applications section for more information). If unused, pin 24 should be connected to a logic high (VDD) level. RS232 RS232 Rx LED (pin 25), RS232 RS232 Tx LED (pin 26), OBD Rx LED (pin 27) and OBD Tx LED (pin 28) These four output pins are normally high, and are driven to low levels when the ELM327 ELM327 is transmitting or receiving data. These outputs are suitable for directly driving most LEDs through current limiting resistors, or interfacing to other logic circuits. If unused, these pins may be left open-circuited. Note that pin 28 can also be used to turn off all of the Programmable Parameters - see page 45 for details. Ordering Information These integrated circuits are 28 pin devices, available in either a 300 mil wide plastic (`skinny') DIP format or in a 300 mil SOIC surface mount type of package. To order, add the appropriate suffix to the part number: 300 mil 28 pin Plastic DIP.ELM327P ELM327P ELM327DSF ELM327DSF 300 mil 28 pin SOIC.ELM327SM ELM327SM Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 3 of 59 ELM327 ELM327 Absolute Maximum Ratings Storage Temperature. -65°C to +150°C Ambient Temperature with Power Applied.-40°C to +85°C Voltage on VDD with respect to VSS. -0.3V to +7.5V Note: These values are given as a design guideline only. The ability to operate to these levels is neither inferred nor recommended, and stresses beyond those listed here will likely damage the device. Voltage on any other pin with respect to VSS. -0.3V to (VDD + 0.3V) Electrical Characteristics All values are for operation at 25°C and a 5V supply, unless otherwise noted. For further information, refer to note 1 below. Characteristic Minimum Typical Supply voltage, VDD 4.5 5.0 VDD rate of rise 0.05 Average supply current, IDD 5.5 falling 2.9 see note 2 mA see note 3 V all except Schmitt inputs 4.0 V see note 4 1.5 V Output low voltage 0.3 V current (sink) = 10 mA Output high voltage 4.6 V current (source) = 10 mA Brown-out reset voltage A/D conversion time 1.0 V 1.3 1.0 rising Conditions V/ms 9 Input threshold voltage Schmitt trigger input thresholds Maximum Units 4.11 4.33 7 4.55 V msec see note 5 Notes: 1. This integrated circuit is produced with one of Microchip Technology Inc.'s PIC18F2x8x family of devices as the core embedded microcontroller. For further device specifications, and possibly clarification of those given, please refer to the appropriate Microchip documentation (available at http://www.microchip.com/). 2. This spec must be met in order to ensure that a correct power on reset occurs. It is quite easily achieved using most common types of supplies, but may be violated if one uses a slowly varying supply voltage, as may be obtained through direct connection to solar cells or some charge pump circuits. 3. Device only. Does not include any load currents. 4. Pins 1, 11, 12, 13, 15 and 18 (only) have internal Schmitt trigger waveshaping circuitry. All other inputs use standard CMOS (TTL compatible) circuitry. 5. The typical width of the Busy output pulse while the ELM327 ELM327 interprets the command, measures the voltage, scales it and then transmits the result of a mid-range measurement, with the RS232 RS232 rate at 38400 baud. ELM327DSF ELM327DSF Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 4 of 59 ELM327 ELM327 Overview The following describes how to use the ELM327 ELM327 to obtain information from your vehicle. We begin by discussing just how to "talk" to the IC using a PC, then explain how to change options using `AT' commands, and finally we show how to use the ELM327 ELM327 to obtain trouble codes (and reset them). For the more advanced experimenters, there are also sections on how to use some of the programmable features of this product as well. Using the ELM327 ELM327 is not as daunting as it first seems. Many users will never need to issue an `AT' command, adjust timeouts, or change the headers. For most, all that is required is a PC or a PDA with a terminal program (such as HyperTerminal or ZTerm), and knowledge of one or two OBD commands, which we will provide in the following sections. Communicating with the ELM327 ELM327 The ELM327 ELM327 expects to communicate with a PC through an RS232 RS232 serial connection. Although modern computers do not usually provide a serial connection such as this, there are several ways in which a `virtual serial port' can be created. The most common devices are USB to RS232 RS232 adapters, but there are several others such as PC cards, ethernet devices, or Bluetooth to serial adapters. No matter how you physically connect to the ELM327 ELM327, you will need a way to send and receive data. The simplest method is to use one of the many `terminal' programs that are available (HyperTerminal, ZTerm, etc.), to allow typing the characters directly from your keyboard. To use a terminal program, you will need to make several settings. First, ensure that your software is set to use the proper `COM' port, and that you have chosen the proper data rate - this will be either 9600 baud (if pin 6=0V at power up), or 38400 baud (if PP 0C has not been changed). If you select the wrong "COM" port, you will not be able to send or receive any data. If you select the wrong data rate, the information that you send and receive will be all garbled, and unreadable by you or the ELM327 ELM327. Don't forget to also set your connection for 8 data bits, no parity bits, and 1 stop bit, and to set it for the proper "line end" mode. All of the responses from the ELM327 ELM327 are terminated with a single carriage return character and, optionally, a linefeed character (depending on your settings). Properly connected and powered, the ELM327 ELM327 will energize the four LED outputs in sequence (as a lamp test) and will then send the message: ELM327 ELM327 v1.3a > In addition to identifying the version of this IC, receiving this string is a good way to confirm that the computer connections and terminal software settings ELM327DSF ELM327DSF are correct (however, at this point no communications have taken place with the vehicle, so the state of that connection is still unknown). The `>' character that is shown on the second line is the ELM327 ELM327's prompt character. It indicates that the device is in the idle state, ready to receive characters on the RS232 RS232 port. If you did not see the identification string, you might try resetting the IC again with the AT Z (reset) command. Simply type the letters A T and Z (spaces are optional), then press the return key: >AT Z That should cause the leds to flash again, and the identification string to be printed. If you see strange looking characters, then check your baud rate - you have likely set it incorrectly. Characters sent from the computer can either be intended for the ELM327 ELM327's internal use, or for reformatting and passing on to the vehicle. The ELM327 ELM327 can quickly determine where the received characters are to be directed by monitoring the contents of the message. Commands that are intended for the ELM327 ELM327's internal use will begin with the characters `AT', while OBD commands for the vehicle are only allowed to contain the ASCII codes for hexadecimal digits (0 to 9 and A to F). Whether it is an `AT' type internal command or a hex string for the OBD bus, all messages to the ELM327 ELM327 must be terminated with a carriage return character (hex `0D') before it will be acted upon. The one exception is when an incomplete string is sent and no carriage return appears. In this case, an internal timer will automatically abort the incomplete message after about 20 seconds, and the ELM327 ELM327 will print a single question mark (`?') to show that the input was not understood (and was not acted upon). Messages that are not understood by the ELM327 ELM327 (syntax errors) will always be signalled by a single Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 5 of 59 ELM327 ELM327 Communicating with the ELM327 ELM327 (continued) question mark. These include incomplete messages, incorrect AT commands, or invalid hexadecimal digit strings, but are not an indication of whether or not the message was understood by the vehicle. One must keep in mind that the ELM327 ELM327 is a protocol interpreter that makes no attempt to assess the OBD messages for validity it only ensures that hexadecimal digits were received, combined into bytes, then sent out the OBD port, and it does not know if a message sent to the vehicle was in error. While processing OBD commands, the ELM327 ELM327 will continually monitor for either an active RTS input, or an RS232 RS232 character received. Either one will interrupt the IC, quickly returning control to the user, while possibly aborting any initiation, etc. that was in progress. After generating a signal to interrupt the ELM327 ELM327, software should always wait for either the prompt character (`>' or hex 3E), or a low level on the Busy output before beginning to send the next command. Finally, it should be noted that the ELM327 ELM327 is not case-sensitive, so the commands `ATZ', `atz', and `AtZ' are all exactly the same to the ELM327 ELM327. All commands may be entered as you prefer, as no one method is faster or better. The ELM327 ELM327 also ignores space characters and all control characters (tab, etc.) in the input, so they can be inserted anywhere in the input if that improves readability. One other feature of the ELM327 ELM327 is the ability to repeat any command (AT or OBD) when only a single carriage return character is received. If you have sent a command (for example, 01 0C to obtain the rpm), you do not have to resend the entire command in order to resend it to the vehicle - simply send a carriage return character, and the ELM327 ELM327 will repeat the command for you. The memory buffer only remembers the one last command - there is no provision in the current ELM327 ELM327 to provide storage for any more. Please Note: There is a very small chance that NULL characters (byte value 00) may occasionally be inserted into the RS232 RS232 data that is transmitted by the ELM327 ELM327. Microchip Technology has reported that some ICs which use the same EUSART as in the ELM327 ELM327 may, under very specific (and rare) conditions, insert an extra byte (always of value 00) into the transmitted data. If you are using a terminal program to view the data, you should select the `hide control characters' option if it is available, and if you are writing software for the ELM327 ELM327, then monitor incoming bytes, and ignore any that are of value 00 (ie. remove NULLs). ELM327DSF ELM327DSF Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 6 of 59 ELM327 ELM327 AT Commands Several parameters within the ELM327 ELM327 can be adjusted in order to modify its behaviour. These do not normally have to be changed before attempting to talk to the vehicle, but occasionally the user may wish to customize these settings for example by turning the character echo off, adjusting a timeout value, or changing the header bytes. In order to do this, internal `AT' commands must be used. Those familiar with PC modems will immediately recognize AT commands as a standard way in which modems are internally configured. The ELM327 ELM327 uses essentially the same method, always watching the data sent by the PC, looking for messages that begin with the character `A' followed by the character `T'. If found, the next characters will be interpreted as an internal configuration or `AT' command, and will be executed upon receipt of a terminating carriage return character. If the command is just a setting change, the ELM327 ELM327 will reply with the characters `OK', to say that it was successfully completed. Some of the following commands allow passing numbers as arguments in order to set the internal values. These will always be hexadecimal numbers which must generally be provided in pairs. The hexadecimal conversion chart in the OBD Commands section (page 23) may prove useful if you wish to interpret the values. Also, one should be aware that for the on/off types of commands, the second character is the number 1 or the number 0, the universal terms for on and off. The remainder of this page, and the page following provide a summary of all of the commands that the current version of the ELM327 ELM327 recognizes. A more complete description of each command is provided on the pages following. AT Command Summary General Commands Programmable Parameter Commands repeat the last command BRD hh try Baud Rate Divisor hh BRT hh set Baud Rate Timeout D set all to Defaults E0, E1 Echo Off, or On* FE Forget Events I print the version ID L0, L1 Linefeeds Off, or On M0, M1 Memory Off, or On WS Warm Start (quick software reset) Z reset all @1 display the device description @2 display the device identifier @3 cccccccccccc store the device identifier PP xx OFF PP FF OFF PP xx ON PP FF ON PP xx SV yy PPS disable Prog Parameter xx all Prog Parameters Off enable Prog Parameter xx all Prog Parameters On for PP xx, Set the Value to yy print a PP Summary Voltage Reading Commands CV dddd RV Calibrate the Voltage to dd.dd volts Read the Voltage the Commands continue on the following page. * = default setting ELM327DSF ELM327DSF Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 7 of 59 ELM327 ELM327 AT Command Summary (continued) OBD Commands AL AR AT0, 1, 2 BD BI DP DPN H0, H1 MA MR hh MT hh NL PC R0, R1 RA hh S0, S1 SH xyz SH xxyyzz SP h SP Ah SR hh ST hh TP h TP Ah CAN Specific Commands (protocols 6 to C) Allow Long (>7 byte) messages Automatically Receive Adaptive Timing Off, Auto1*, Auto2 perform a Buffer Dump Bypass the Initialization sequence Describe the current Protocol Describe the Protocol by Number Headers Off*, or On Monitor All Monitor for Receiver = hh Monitor for Transmitter = hh Normal Length messages* Protocol Close Responses Off, or On* set the Receive Address to hh printing of Spaces Off, or On* Set Header to xyz Set Header to xxyyzz Set Protocol to h and save it Set Protocol to Auto, h and save it Set the Receive address to hh Set Timeout to hh x 4 msec Try Protocol h Try Protocol h with Auto search CAF0, CAF1 Automatic Formatting Off, or On* CF hhh set the ID Filter to hhh CF hhhhhhhh set the ID Filter to hhhhhhhh CFC0, CFC1 Flow Controls Off, or On* CM hhh set the ID Mask to hhh CM hhhhhhhh set the ID Mask to hhhhhhhh CP hh set CAN Priority to hh (29 bit) CRA hhh set CAN Receive Address to hhh CRA hhhhhhhh set the Rx Address to hhhhhhhh CS show the CAN Status counts D0, D1 display of the DLC Off*, or On FC SM h Flow Control, Set the Mode to h FC SH hhh FC, Set the Header to hhh FC SH hhhhhhhh FC, Set the Header to hhhhhhhh FC SD [1 - 5 bytes] FC, Set Data to [.] RTR send an RTR message V0, V1 use of Variable DLC Off*, or On J1939 J1939 CAN Specific Commands (protocols A to C) DM1 JE JS MP hhhh MP hhhhhh Monitor for DM1 messages use J1939 J1939 Elm data format* use J1939 J1939 SAE data format Monitor for PGN 0hhhh Monitor for PGN hhhhhh J1850 J1850 Specific Commands (protocols 1 and 2) IFR0, 1, 2 IFR H, S IFRs Off, Auto*, or On IFR value from Header* or Source * = default setting ISO Specific Commands (protocols 3 to 5) IB 10 Set the ISO Baud rate to 10400* IB 96 Set the ISO Baud rate to 9600 IIA hh Set the ISO (slow) Init Address to hh KW display the Key Words KW0, KW1 Key Word checking Off, or On* SW hh Set Wakeup interval to hh x 20 msec WM [1 - 6 bytes] Set the Wakeup Message ELM327DSF ELM327DSF Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 8 of 59 ELM327 ELM327 AT Command Descriptions The following describes each AT Command that the current version of the ELM327 ELM327 supports: AL [ Allow Long messages ] The standard OBDII protocols restrict the number of data bytes in a message to seven, which the ELM327 ELM327 normally does as well (for both send and receive). If AL is selected, the ELM327 ELM327 will allow long sends (eight data bytes) and long receives (unlimited in number). The default is AL off (and NL selected). AR [ Automatically set the Receive address ] Responses from the vehicle will be acknowledged and displayed by the ELM327 ELM327, if its internally stored receive address matches the address that the message is being sent to. With the auto receive mode in effect, the value used for the receive address will be chosen based on the current header bytes, and will automatically be updated whenever the header bytes are changed. The value that is used for the receive address is determined based on such things as the contents of the first header byte, and whether the message uses physical addressing, functional addressing, or if the user has set a value with the SR or RA commands. Auto Receive is turned on by default, and is not used by the J1939 J1939 formatting. AT0, AT1 and AT2 [ Adaptive Timing control ] When receiving responses from a vehicle, the ELM327 ELM327 has traditionally waited the time set by the AT ST hh setting for a response. To ensure that the IC would work with a wide variety of vehicles, the default value was set to a conservative (slow) value. Although it was adjustable, many people did not have the equipment or experience to determine a better value. The Adaptive Timing feature will automatically set the timeout value for you, to a value that is based on the actual response times that your vehicle is responding in. As conditions such as bus loading, etc. change, the algorithm learns from them, and makes appropriate adjustments. Note that it always uses your AT ST hh setting as the maximum setting, and will never choose one which is longer. There are three adaptive timing settings that are available for use. By default, Adaptive Timing option 1 (AT1) is enabled, and is the recommended setting. AT0 is used to disable Adaptive timing (usually used ELM327DSF ELM327DSF when experimenting), while AT2 is a more agressive version of AT1 (the effect is more noticeable for very slow connections you may not see much difference with faster OBD systems). The J1939 J1939 protocol does not support Adaptive Timing responses for J1939 J1939 use fixed timeouts as set in the standard. BD [ perform an OBD Buffer Dump ] All messages sent and received by the ELM327 ELM327 are stored temporarily in a set of twelve memory storage locations called the OBD Buffer. Occasionally, it may be of use to view the contents of this buffer, perhaps to see why an initiation failed, to see the header bytes in the last message, or just to learn more of the structure of OBD messages. You can ask at any time for the contents of this buffer to be `dumped' (printed) when you do, the ELM327 ELM327 sends a length byte (representing the length of the message in the buffer) followed by the contents of all twelve OBD buffer locations. The length byte represents the actual number of bytes received, whether they fit into the OBD buffer or not. This may be useful when viewing long data streams (with AT AL), as the number accurately represents the number of bytes received, mod 256. Note that only the first twelve bytes received are stored in the buffer. BI [ Bypass the Initialization sequence ] This command should be used with caution. It allows an OBD protocol to be made active without requiring any sort of initiation or handshaking to occur. The initiation process is normally used to validate the protocol, and without it, results may be difficult to predict. It should not be used for routine OBD use, and has only been provided to allow the construction of ECU simulators and training demonstrators. BRD hh [ try Baud Rate Divisor hh ] This command is used to change the RS232 RS232 baud rate divisor to the hex value provided by hh. The actual baud rate (in kbps) will be 4000 divided by this divisor. For example, a setting of 115.2kbps would require a divisor of 4000/115.2 or 35. In hexadecimal notation, Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 9 of 59 ELM327 ELM327 AT Command Descriptions (continued) 35 is written as 23, so the actual command that needs to be sent would be AT BRD 23. Since the ELM327 ELM327 may be able to operate at much higher rates than some interfaces can support, the BRD command allows requested rates to be tested before they are committed to (with automatic fall-back to the previous baud rate if there are problems). In use, the command is sent as a request to change the baud rate, and the ELM327 ELM327 responds with the familiar "OK". After that, an internal timer begins waiting, to ensure that the controlling computer has sufficient time to change their baud rate to the same rate. The ELM327 ELM327 then sends the poweron message at the new baud rate, and begins waiting while the controlling computer assesses what has been received. If the AT I message was received without errors, the controlling computer sends a carriage return character, to test the transmit circuitry. If received correctly by the ELM327 ELM327, the new rate is retained. If the controlling computer should see errors, however, it simply sends no response, the ELM327 ELM327 waits the time set by AT BRT, and when no response is detected, reverts back to the former baud rate. A more detailed discussion of this entire process is provided in the `Using Higher RS232 RS232 Baud Rates' section, on pages 48 and 49. Any new baud rate that is set in this manner is retained across calls to set defaults (AT D), and for warm starts (AT WS), but will not survive a hardware reset (a power off/on or a call to AT Z). If you are in the habit of calling AT Z in your code, we advise using AT WS instead. BRT hh [ set Baud Rate Timeout to hh ] This command allows the timeout used for the Baud Rate handshake (ie. AT BRD) to be varied. The time delay is given by hh x 5.0 msec, where hh is a hexadecimal value. The default value for this setting is 0F, providing 75msec. Note that a value of 00 does not result in 0 msec - it provides the maximum time of 256 x 5.0 msec, or 1.28 seconds. CAF0 and CAF1 [ CAN Auto Formatting off or on ] These commands determine whether the ELM327 ELM327 assists you with the formatting of the CAN data that is sent and received. With CAN Automatic Formatting enabled (CAF1), the IC will automatically generate formatting (PCI) bytes for you when sending, and will remove them when receiving. This means that you can continue to issue OBD requests (01 00, etc.) as usual, ELM327DSF ELM327DSF without regard to the extra bytes that CAN diagnostics systems require. Also, with formatting on, any extra (unused) data bytes that are received in the frame will be removed, and any messages with invalid PCI bytes will be ignored. When monitoring, however, messages with invalid PCI bytes will be shown with a `AT IIA 7A and the ELM327 ELM327 will use that address when called to do so (protocols 3 or 4). The full eight bit value is used exactly as provided no changes are made to it (ie no adding of parity bits, etc.) Note that setting this value does not affect any ELM327DSF ELM327DSF address values used in the header bytes. The ISO init address is restored to $33 whenever the defaults, or the ELM327 ELM327, are reset. JE [ enables the J1939 J1939 ELM data format ] The J1939 J1939 standard requires that PGN requests be sent with the byte order reversed from the standard `left-to-right' order, which many of us would expect. For example, to send a request for the engine temperature (PGN 00FEEE 00FEEE), the data bytes are actually sent in the reverse order (ie EE FE 00), and the ELM327 ELM327 would normally expect to receive the data in that order for passing on to the vehicle. When experimenting, this constant need for byte reversals can be quite confusing, so we have defined an ELM format that reverses the bytes for you. When the J1939 J1939 ELM (JE) format is enabled, and you have a J1939 J1939 protocol selected, and you provide three data bytes to the ELM327 ELM327, it will reverse the order for you before sending them to the ECU. To request the engine temperature PGN, you would send 00 FE EE (and not EE FE 00). The `JE' type of automatic formatting is enabled by default. JS [ enables the J1939 J1939 SAE data format ] The AT JS command disables the automatic byte reordering that the JE command performs for you. If you wish to send data bytes to the J1939 J1939 vehicle without any manipulation of the byte order, then select JS formatting. Using the above example for engine temperature (PGN 00FEEE 00FEEE) with the data format set to JS, you must send the bytes to the ELM327 ELM327 as EE FE 00 (this is also known as little-endian byte ordering). The JS type of data formatting is off by default, but was the only type of data formatting provided by the ELM327 ELM327 v1.2. If you are switching from version 1.2 of the IC, take note of this difference. KW [ display the Key Words ] When the ISO 9141-2 and ISO 14230-4 protocols are initialized, two special bytes (key words) are passed to the ELM327 ELM327 (the values are used internally to determine whether a particular protocol variation can be supported by the ELM327 ELM327). If you wish to see what the value of these bytes were, simply send the AT KW command. Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 14 of 59 ELM327 ELM327 AT Command Descriptions (continued) KW0 and KW1 [ Key Word checks off (0) or on (1) ] The ELM327 ELM327 looks for specific bytes (called Key Words) to be sent to it during the ISO 9141-2 and ISO14230-4 ISO14230-4 initiation sequences. If those bytes are not found, the initiation is said to have failed (you might see "UNABLE TO CONNECT" or perhaps "BUS INIT: .ERROR"). This may be because you are trying to connect to a non-OBD compliant ECU, or perhaps to an older one. If you wish to experiment, but do not want the ELM327 ELM327 to check the values contained in the key words, you can turn the checking off with: >AT KW0 after which the IC will look for Key Word bytes in the response, but will not look at the actual values of the bytes. This may allow a connection in an otherwise `impossible' situation. Normal behaviour can be returned with AT KW1, which is the default setting. Caution should be used with this command, as you are bypassing the checks that are normally performed on the keyword bytes. The ELM327 ELM327 sends an acknowledgement to the ECU for these bytes, but that is without considering what the bytes actually are. You could be incorrectly activating an ISO 9141, or KWP 2000 protocol, so should be very careful. default power on mode (by connecting pin 5 of the ELM327 ELM327 to a high logic level). When the memory function is enabled, each time that the ELM327 ELM327 finds a valid OBD protocol, that protocol will be memorized (stored) and will become the new default. If the memory function is not enabled, protocols found during a session will not be memorized, and the ELM327 ELM327 will always start at power up using the same (last saved) protocol. If the ELM327 ELM327 is to be used in an environment where the protocol is constantly changing, it would likely be best to turn the memory function off, and issue an AT SP 0 command once. The SP 0 command tells the ELM327 ELM327 to start in an 'Automatic' protocol search mode, which is the most useful for an unknown environment. ICs come from the factory set to this mode. If, however, you have only one vehicle that you regularly connect to, storing that vehicle's protocol as the default would make the most sense. As mentioned, the default setting for the memory function is determined by the voltage level at pin 5 at power up (or system reset). If it is connected to a high level (VDD), then the memory function will be on by default. If pin 5 is connected to a low level, the memory saving will be off by default. MA L0 and L1 [ Linefeeds off (0) or on (1) ] This option controls the sending of linefeed characters after each carriage return character. For AT L1, linefeeds will be generated after every carriage return character, and for AT L0, they will be off. Users will generally wish to have this option on if using a terminal program, but off if using a custom computer interface (as the extra characters transmitted will only serve to slow the communications down). The default setting is determined by the voltage at pin 7 during power on (or reset). If the level is high, then linefeeds on will be the default; otherwise it will be linefeeds off. M0 and M1 [ Memory off (0) or on (1) ] The ELM327 ELM327 has internal `non-volatile' memory that is capable of remembering the last protocol used, even after the power is turned off. This can be convenient if the IC is often used for one particular protocol, as that will be the first one attempted when next powered on. To enable this memory function, it is necessary to either use an AT command to select the M1 option, or to have chosen "memory on" as the ELM327DSF ELM327DSF [ Monitor All messages ] This command places the ELM327 ELM327 into a bus monitoring mode, in which it continually monitors for (and displays) all messages that it sees on the OBD bus. It is a quiet monitor, not sending In Frame Responses for J1850 J1850 systems, Acknowledges for CAN systems, or Wakeup (`keep-alive') messages for the ISO 9141 and ISO 14230 protocols. Monitoring will continue until it is stopped by activity on the RS232 RS232 input, or the RTS pin. To stop the monitoring, simply send any single character to the ELM327 ELM327, then wait for it to respond with a prompt character (`>'), or a low level output on the Busy pin. (Setting the RTS input to a low level will interrupt the device as well.) Waiting for the prompt is necessary as the response time varies depending on what the IC was doing when it was interrupted. If for instance it is in the middle of printing a line, it will first complete that line then return to the command state, issuing the prompt character. If it were simply waiting for input, it would return immediately. Note that the character which stops the monitoring will always be discarded, and will not affect subsequent commands. Beginning with v1.3 of this IC, all messages will be Elm Electronics Circuits for the Hobbyist www.elmelectronics.com 15 of 59 ELM327 ELM327 AT Command Descriptions (continued) printed as found, even if the CAN auto formatting is on (CAF1). The previous version of this IC (v1.2) did not display some illegal CAN messages if the automatic formatting was on, but now all messages received are displayed, and if the data format does not appear to be correct, then "