![]() ![]() If you need a refresher, feel free to pop on over to these links. You should be familiar with these topics before diving into this tutorial. In this tutorial we will discuss what a terminal is, which terminal programs are best suited for certain situations and operating systems, and how to configure and use each program. There are lots of different terminal programs out there, and they all have their pros and cons. Once you have learned the ins and outs of a terminal application, it can be a very powerful tool in your electronics and programming arsenal. They allow you to see data sent to and from your microcontroller, and that data can be used for a number of reasons including troubleshooting/debugging, communication testing, calibrating sensors, configuring modules, and data monitoring. In short, serial terminal programs make working with microcontrollers that much simpler. ![]() ![]() This tutorial is here to help you understand what these terms mean and how they form the larger picture that is serial communication over a terminal. For someone who isn't familiar with these terms and the context in which they are used, they can be confusing at times. These are all words that get thrown around a lot when working with electronics, especially microcontrollers. Some of the PIDs may also be found on Wikipedia.COM ports. The SAE J1979 document describes the generic OBD-II modes and PIDs. (127 / 255) * 100 = 50% Get Coolant TemperatureĬoolant temperature (PID 05) is reported in degrees, and is obtained by subtracting 40 from the value: >0105 To get the speed, simply convert the value to decimal: 0xFF = 255 km/h Get Engine LoadĮngine load is PID 04, and we need to first divide the response by 255, and multiply it by one hundred percent: >0104 To get the actual RPM value, convert the hex number to decimal, and divide it by four: 0x0FA0 = 4000 The reply contains two bytes that identify it as a response to Mode 1, PID 0C request (41 0C), and two more bytes with the encoded RPM value (1/4 RPM per bit). RPM’s PID is 0C, so we must tell the interface to send “010C”: >010C ![]() Real-time parameters are accessed through Mode 1 (also called “Service $01”), and each parameter has a Parameter ID, or PID for short. Now it is time to send our first OBD request. To verify the protocol, enter the AT DP command (“Display Protocol”): >AT DP To do this, enter the “AT SP 0” command: >AT SP 0 Let’s set the protocol to “AUTO”, which means that you want the interface to automatically detect the protocol when you send the first OBD request. If you did the steps in this order, you will see the device identify itself and print the command prompt: ELM327 v1.3a If you use a newer version of Windows (Vista or 7), you can use TeraTerm, RealTerm, or any other terminal emulation software.Ĭonfigure the COM port for 115.2kbps, and connect the interface to your computer and the vehicle’s diagnostic port. In this example, we will be using HyperTerminal - a terminal emulation program included with Windows XP and earlier versions of Windows. To get started, you need to connect the OBD interface to the diagnostic connector and the host. In fact, under normal circumstances, the tester must request the data it wants, from the Electronic Control Module (ECU). There is a common misconception that a tester “reads” data that is “broadcast” on the OBD bus. The OBD interface (“tester”) used in this example is an OBDLink S, but since it emulates the ELM327, you can use any interface that supports the ELM327 AT command set. To follow along, you will need an OBD interface, a computer, and access to an OBD-II compliant vehicle. In this tutorial, you will learn how to connect to OBD-II and read RPM, speed, engine load, and coolant temperature. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |