docs: update Canbus_Support2

This commit is contained in:
dazq 2020-12-16 22:54:57 +00:00 committed by Josh Stewart
parent f6a91766cb
commit d4cffde1da
1 changed files with 13 additions and 16 deletions

View File

@ -2,13 +2,13 @@
title: CanBus Support
description:
published: true
date: 2020-12-16T22:48:07.420Z
date: 2020-12-16T22:54:50.845Z
tags:
editor: markdown
dateCreated: 2020-12-15T21:58:51.731Z
---
Overview
# Overview
--------
Speeduino is able to support Canbus in two ways.
@ -16,23 +16,20 @@ Speeduino is able to support Canbus in two ways.
1. Use a Mega2560 MCU with a coprocessor board
2. Use a Teensy or STM32 (with internal can module) MCU.
##### About the CanBus Interface
### About the CanBus Interface
The Canbus Interface offers ,
1. OBD2 formatted data of current realtime data .
2. Broadcast selected current realtime data and function status .(coming soon)
3. Read in Analog and Digital data values from other devices on the BUS including those from OEM devices/ECU.(coming soon)
Settings
# Settings
--------
### Enable CanBus interface
## Enable CanBus interface
To enable use of the Canbus interface it must be enabled in TunerStudio.
## OBD2 Data Support
When used with an MCU that has an Internal canbus interface Speeduino firmware is able to output data using the OBD2 std
@ -56,7 +53,7 @@ The OBD2 port Interface offers support for ,
2. Output the Analog/Digital data values from the 16 Aux inputs ([see here for info on aux data input configuration](/en/configuration/Auxillary_IO_Configuration))
3. Activate External Outputs(coming soon!)
### Modes Supported
## Modes Supported
There are 10 diagnostic services described in the latest OBD-II standard SAE J1979. Before 2002, J1979 referred to these services as "modes".
Speeduino supports only a selected number of these modes. These are:
@ -67,7 +64,7 @@ Mode (hex) Description
Mode 22 is a custom PID mode that is defined by the manufacturer.It is used to define additional services.
### PID supported
## PID supported
The following PIDs are supports by by the OBD port
@ -75,13 +72,13 @@ When using Bit-Encoded-Notation, quantities like C4 means bit 4 from data byte C
![bit_notation1.png](/bit_notation1.png)
#### MODE 01
### MODE 01
The table below shows the current list of PIDs supported by the firmware (as of 16/12/2020).
![pid_support_list.png](/pid_support_list.png)
#### Bitwise encoded PIDs
### Bitwise encoded PIDs
Some of the PIDs in the above table cannot be explained with a simple formula. A more elaborate explanation of these data is provided here:
Example MODE 01 PID 00
@ -94,13 +91,13 @@ For example, if the car response is BE1FA813, it can be decoded like this:
So, supported PIDs are: 01, 03, 04, 05, 06, 07, 0C, 0D, 0E, 0F, 10, 11, 13, 15, 1C, 1F and 20
#### MODE 22
### MODE 22
Speeduino responds to the Mode 22 request for the following PID:
![mode22_pid_support.png](/mode22_pid_support.png)
### CAN (11-bit) bus format
## CAN (11-bit) bus format
The PID query and response occurs on the vehicle's CAN bus. Standard OBD requests and responses use functional addresses. The diagnostic reader initiates a query using CAN ID 7DFh, which acts as a broadcast address, and accepts responses from any ID in the range 7E8h to 7EFh. ECUs that can respond to OBD queries listen both to the functional broadcast ID of 7DFh and one assigned ID in the range 7E0h to 7E7h. Their response has an ID of their assigned ID plus 8 e.g. 7E8h through 7EFh.
@ -108,13 +105,13 @@ This approach allows up to eight ECUs, each independently responding to OBD quer
CAN bus may also be used for communication beyond the standard OBD messages. Physical addressing uses particular CAN IDs for specific modules (e.g., 720h for the instrument cluster in Fords) with proprietary frame payloads.
##### Query
#### Query
The functional PID query is sent to the vehicle on the CAN bus at ID 7DFh, using 8 data bytes. The bytes are:
![11bit_query.png](/11bit_query.png)
##### Response
#### Response
The vehicle responds to the PID query on the CAN bus with message IDs that depend on which module responded. Typically the engine or main ECU responds at ID 7E8h. Other modules, like the hybrid controller or battery controller in a Prius, respond at 07E9h, 07EAh, 07EBh, etc. These are 8h higher than the physical address the module responds to. Even though the number of bytes in the returned value is variable, the message uses 8 data bytes regardless (CAN bus protocol form Frameformat with 8 data bytes). The bytes are: