Introduction to SAE J1708 |
|||||||||||||
| [You are here: Home > CAN Index > J1708] | |||||||||||||
BackgroundJ1708 is an SAE specification developed especially for heavy duty vehicles (trucks and busses). The intention is that the protocol will promote a standard for serial communication between modules with microcontrollers. The standard means that data can be transferred between devices in a more cost-effective way. Further advantages are -
Areas of useSince J1708 protocol only describes the lower layers of the OSI model it is always used with an overlaying application layer. An example of such a layer is J1587 which is used for data exchange between microcontrollers in heavy duty vehicles.
Quick facts
The protocol in detailThe protocol describes both physical properties like how the voltage level on the bus should be interpreted, and how messages are constructed. Physical PropertiesJ1708 protocol uses the same transceiver as RS-485. The bus network supports at least 20 nodes with these transceivers. J1708 does not use the bus termination resistors used by RS-485.
An RS-485 transceiver. (Picture borrowed from the J1708 spec) Note that this transceiver is, basically, the same as is used for the CAN bus. The J1708 bus consists of two wires (A and B) with at least one twist (360°) per inch (2.54 cm) and a total length of up to 40 m. The voltage level on the bus is determined by the difference in voltage potential between wires “A” and “B”. A logical high level (1) is achieved when point A is at least 200 mV more positive than point B. A logical low level (0) means that point A is at least 200 mV more negative than point B (See the following figure). The transceiver should be fed with +6V to (-6V) in relation to common ground (common for all devices).
Determination of the logic bus-level. The bus is in a logical high level when it is in idle mode, if all transmitters are deactivated or when all transmitters is sending a logical high bit (1). To place the bus in a logical low state only one transmitter has to send a logical low bit (0), which makes the logical low bit dominant.
Communication on bit-levelA J1708 network uses a bus topology with “random” access to the bus. Random access means that any node can transmit when it desires, unless the bus is not already busy. The bus must have been in idle mode (logical high level) for at least a bus access time before a node may access it. The time counting is based on the bit time which, at 9600 bps, is about 104.2 milliseconds. Every message has a priority between 1 and 8, where 1 has highest priority. A bus access time is determined as the shortest idle time (at least 10 bit times) plus two times the priority of the message. If two messages is sent at exactly the same time a collision occurs on the bus. When this happens both sending nodes have to release control of the bus, i.e. deactivate their transmitters. Both nodes then have to wait for a bus access time before they can start sending again. Consequently the node with highest priority will gain access to the bus first and can start to transmit its message.
The anatomy of a J1708 messageThe messages are byte-oriented, that is to say constructed of a number of bytes. Every byte consists of a start bit eight data bits and a stop bit. The start bit is of logical low level and the stop bit is a logical high level. The eight data bits are sent with the least significant bit first. This follows a standard serial UART (Universal Asynchronous Receiver/Transmitter) communication. A message consists of a MID (Message Identification Character), data bytes, and finally a one byte long checksum. The content of the data part is not described in J1708 specification but in an overlaying protocol, for example J1587. A message is always preceded by an idle time which is at least the shortest bus access time. The time between two bytes in a message is not allowed to be more than two bit times.
The first byte in every message must always be a MID. Valid values of the MID is 0-255.
It is every manufacturers responsibility that each MID is used only by one device in every network system. The J1708 standard lists all MIDs and their areas of use. Calculation of checksumThe last byte of a message contains a checksum. This checksum consist of the 8-bit two's complement of the sum of the MID and all data bytes in the message. A simple way to decide if a message has been correctly transmitted is to add the checksum to the 8-bit sum of all data bytes plus the MID of a received message. The 8-bit sum should be zero (0) if the message was transmitted correctly. As an example (using the sample message in the figure above),
|