9 of 51
ELM327DSC Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
CFC0 and CFC1 [ CAN Flow Control off or on ]
The ISO 15765-4 protocol expects a “Flow
Control” message to always be sent in response to a
“First Frame” message. The ELM327 automatically
sends these, without any intervention by the user. If
experimenting with a non-OBD system, it may be
desirable to turn this automatic response off, and the
AT CFC0 command has been provided for that
purpose. The default setting is CFC1 - Flow Controls
on.
Note that during monitoring (AT MA, MR, or MT),
there are never any Flow Controls sent no matter what
the CFC option is set to.
CM hhh [ set the CAN ID Mask to hhh ]
There can be a great many messages being
transmitted in a CAN system at any one time. In order
to limit what the ELM327 views, there needs to be a
system of filtering out the relevant ones from all the
others. This is accomplished by the filter, which works
in conjunction with the mask. A mask is a group of bits
that show the ELM327 which bits in the filter are
relevant, and which ones can be ignored. A ‘must
match’ condition is signaled by setting a mask bit to '1',
while a 'don't care' is signaled by setting a bit to '0'.
This three digit variation of the CM command is used
to provide mask values for 11 bit ID systems (the most
significant bit is always ignored).
Note that a common storage location is used
internally for the 29 bit and 11 bit masks, so an 11 bit
mask could conceivably be assigned with the next
command (CM hh hh hh hh), should you wish to do the
extra typing. The values are right justified, so you
would need to provide five leading zeros followed by
the three mask bytes.
CM hh hh hh hh [ set the CAN ID Mask to hhhhhhhh ]
This command is used to assign mask values for
29 bit ID systems. See the discussion under the
CM hhh command – it is essentially identical, except
for the length. Note that the three most significant bits
that you provide in the first digit will be ignored.
CP hh [ set CAN Priority bits to hh ]
This command is used to set the five most
significant bits in a 29 bit CAN ID word (the other 24
bits are set with the AT SH command). Some systems
use several of these bits to assign a priority value to
messages, which is how the command was named.
Any bits provided in excess of the five required will be
ignored, and not stored by the ELM327 (it only uses
the five least significant bits of this byte). The default
value for these priority bits is hex 18.
CS [ show the CAN Status ]
The CAN protocol requires that statistics be kept
regarding the number of transmit and receive errors
detected. If there should be a significant number of
them, the device can even go off-line in order not to
affect other data on the bus, should there be a
hardware or software fault. The AT CS command lets
you see both the Tx and the Rx error counts. If the
transmitter should be off (count >FF), you will see
‘OFF’ rather than a specific count.
CV dddd [ Calibrate the Voltage to dd.dd volts ]
The voltage reading that the ELM327 presents for
an AT RV reading can be calibrated with this
command. The argument (‘dddd’) must always be
provided as 4 digits, with no decimal point (it assumes
that a decimal place is between the second and the
third digits).
To use this calibration feature, simply use a meter
with sufficient accuracy to read the actual input
voltage. If, for example, the ELM327 consistently says
the voltage is 12.2V when you measure 11.99 volts,
simply issue AT CV 1199, and the device will
recalibrate itself for the provided voltage (it should then
read 12.0V due to roundoff). If you use a test voltage
that is less than 10 volts, don’t forget to add a leading
zero (that is, 9.02 volts should be entered as AT CV
0902).
D [ set all to Defaults ]
This command is used to set the options to their
default (or factory) settings, as when power is first
applied. The last stored protocol will be retrieved from
memory, and will become the current setting (possibly
closing other protocols that are active). Any settings
that the user had made for custom headers, filters, or
masks will be restored to their default values, and all
timer settings will also be restored to their defaults.
AT Commands (continued)