Cars · Diagnostics

OBD0 Stock Datalogging

The serial interrupt code in the stock ECU is very simple. A 1 byte hex address is sent to the ECU, and the ECU responds with the contents of RAM memory at that address.

Intermediate

Adapted from pgmfi.org wiki

The serial interrupt code in the stock ECU is very simple. A 1 byte hex address is sent to the ECU, and the ECU responds with the contents of RAM memory at that address. The reason that the stock ECU code is not suitable for datalogging under most circumstances is that the serial port is initialized to a very high baud rate. It runs at (CLK / 64 baud), or 12Mhz / 64 (187,500 baud), which is not terribly serial-port friendly. See Intel8051 tutorials for information about this. In order to do datalogging currently, Timer2, which is unused elsewhere in the code, is used to initialize the serial port to a speed that is close to 9600 baud, which PC serial ports can communicate at.

Credits and source

Source Adapted from OBD0 Stock Datalogging on pgmfi.org wiki. Licensed under CC BY-NC-SA 1.0.