Differences
This shows you the differences between two versions of the page.
| projects:pic32mx_obd_evaluation_board [2017/01/25 17:23] – [Commands] admin | projects:pic32mx_obd_evaluation_board [2026/10/25 19:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== PIC32MX OBD Evaluation Board ====== | ====== PIC32MX OBD Evaluation Board ====== | ||
| - | {{: | + | {{: |
| ===== Requirements ===== | ===== Requirements ===== | ||
| ===== Basics of communication protocol ===== | ===== Basics of communication protocol ===== | ||
| Line 101: | Line 101: | ||
| ^ i | read data from I²C device | | ^ i | read data from I²C device | | ||
| ^ I | write data to I²C device | | ^ I | write data to I²C device | | ||
| + | ==== Calculating CRC checksum ==== | ||
| + | < | ||
| + | Query | ||
| + | ---------------------------------------------- | ||
| + | | SOF | P | c | TYPE | P1..P4 | D1..DN | EOF | | ||
| + | ---------------------------------------------- | ||
| + | </ | ||
| + | where | ||
| + | ^ TYPE | 1b | s - 16-bit CRC-CCITT calculated by software (only P4 used); d - CRC calculated by DMA module | | ||
| + | ^ P1 | 1b | 0 - input data not reflected (MSB first); ≠0 - input data reflected (LSB first) | | ||
| + | ^ P2 | 1b | length of CRC polynom (1..32) | | ||
| + | ^ P3 | 4b | CRC polynom | | ||
| + | ^ P4 | 4b | CRC seed | | ||
| + | ^ D1..DN | Nb | data in form of ASCII HEX | | ||
| + | < | ||
| + | Response | ||
| + | ------------------------------------------- | ||
| + | | SOF | P | 00 | CRC | TIME | CHSUM | EOF | | ||
| + | ------------------------------------------- | ||
| + | </ | ||
| + | where | ||
| + | ^ CRC | 4b | calculated CRC | | ||
| + | ^ TIME | 2b | time in μs the calculation process took | | ||
| + | Error codes | ||
| + | ^ N02 | Invalid parameters provided | | ||
| ==== Configuring communication parameters ==== | ==== Configuring communication parameters ==== | ||
| < | < | ||
