J1850 Protocal Summary Attributes include: * low cost * open architecture * master-less, single level bus topology The standard supports two alternatives: * PWM (Pulse Width Modulation) - 41.6 Kb/s - 2 wire differential approach * VPW (Variable Pulse Width Modulation) - 10.6 Kb/s - single wire approach - supports both General Motors (GM) and Chrysler version of J1850 Can be found in engine, transmission, ABS, and instrumentation applications. SAE has defined three distinct protocol Classifications: * Class A - lowest data rate, a rate that peaks as high as 10Kb/s - typically support convenience operations like actuators and "smart" sensors - significantly reduced the bulk of automotive wiring harnesses - approximate cost of $4.00 per node. * Class B - data rates as high as 100Kb/s - typically supports intermodule, non-real time control and communications - can eliminate redundant sensors and other system elements by providing a means to transfer data (e.g. parametric data values) between nodes - about $5.00 per node, but may be as low as $2.00 * Class C - as high as 1Mb/s - typically used for critical, real-time control - facilitates distributed control via high data rate signals typically associated with real-time control systems - about $10.00 per node - the upper end utilization can be expensive like fiber optics, that can push node costs much higher than estimated - most predominant in-vehicle networking standard is CAN, (Controller Area Network). J1850 is an intermodule data communication network for the sharing of parametric information passed in frames (messages) between all vehicle electronic modules connected to the Class B bus. Digital signals can be communicated utilizing one of two multiplexing methods: * Frequency division multiplexing simultaneously transmits two or more messages on a single channel. * Time division multiplexing interleaves two or more signals on the same channel for either a fixed or a variable length of time. VPW Overview: * encoding scheme of choice for all 10.4Kb/s J1850 implementations * one of the lowest radiated emissions encoding schemes possible due to the minimization of bus transitions per data bit * ability to compensate for clock mismatch and ground offsets, fixed transition and sample points * low number of transitions per bit * well suited for arbitration * VPW does not offer fixed data rates and initially can be a bit confusing VPW Uses Time Dependent Symbols: * a "one" bit is a symbol denoted by a transition on the bus that lasts for some fixed amount of time, say 64ms * it is the amount of time that the bus stays in its high or low potential that determines what a particular bus symbol is * For example, a "one" bit is not necessarily a high potential on the bus. In this case, if the bus remains in its high potential for 64ms, then we would consider the symbol to be a "one" bit. * 64ms is considered to be the "dominant one" bit The VPW bus is weakly pulled low: * driven high by a strong pull-up transistor at each node * weakly drawn to ground when there is no input signal * when a node wants to talk on the J1850 bus either: - let the weakly drawn bus settle to its low potential at ground - drive the bus to a high potential of approximately 7.5 Volts * a high potential can be anything from 4.25 Volts to 20 Volts * a low potential can be anything from a noisy ground to 3.5 Volts * any node driving the bus to a high potential will over-drive any other node * symbols in the low potential state are considered passive * symbols in the high potential state are considered dominant J1850 Bus: * asynchronous, master-less, peer-to-peer protocol that offers equal network access for every node * diagram: ----------------------------------------- | SOF | Header Field | Data Field | CRC | EOF ---------------------------------------------------------- |<------------- Message Frame -------------->| CSMA/CR Arbitration: * a process of determining which of two or more nodes can continue to transmit when both or all network nodes begin transmission simultaneously * a transmitting node broadcasts its message - all other nodes receive the transmitted message - the transmitting node sees its own message echoed back as well - asynchronous > forces devices to determine when a message transmission can begin > no pre-defined timing between messages. * "non-colliding" scheme with master-less links - first "listens" to the J1850 bus for a pre-set amount of time - if the bus is busy, then wait until the current message is complete before trying again (Carrier Sense) * "Multiple Access" (MA) capability is supported - more than one node may begin transmission at the same time - "Collision Resolution" (CR) > allows multiple transmitting nodes to all talk at the same time > resolves the bus issues through message prioritization = message prioritization is accomplished by allowing an active symbol to win over a passive symbol * loss of arbitration: - loser is any node transmiting a passive symbol but sees an active symbol - once lost, the losing node(s) then stops transmitting and receives - the winner continues to transmit checking each bit of the current message and dropping out when necessary until just one node is left > Checking is done for every bit (bit-by-bit arbitration) = diagram of bit by bit arbitration: _______ ____ ___ _____ ___ Node A ____| |___| |____| |___| |___| |________________ _______ ____ ___ _____ _____ _____ Node B ____| |___| |____| |___| |___| |_____| |_|__ _______ ____ ___ ___ Node C ____| |___| |____| |___| |__________________________ _______ ____ ___ _____ _____ _____ J1850 Bus ____| |___| |____| |___| |___| |_____| |_|____ | SOF | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | - the lone surviving node has always overdriven the bus helping message integrity - losing nodes can try transmission again after the current message is done - higher priority messages are those messages with more active symbols in the beginning of their message * it is not possible to have fixed latencies between differing message frames BUS Description: NB|<- Optional Section ->| ----------------------------------------- -------------------------- | SOF | Header Field | Data Field | CRC | EOD | | IFR Data Field | CRC | EOF -------------------------------------------------------------------------------- |IFS|<---------------------------- Message Frame ----------------------------->| * Start of Frame (SOF) - pre-defined period - crucial for carrier sense and arbitration purposes - "high potential" for a nominal period of 200ms - after the SOF symbol, bit symbols representing data bytes are transmitted - anywhere from one byte to eleven bytes can be transmitted. * the message frame can contain one to eleven bytes of data containing: - Header Field > first byte (can be 1 or 3 bytes in length) > contains crucial information about what to expect in the message frame > Header Make-up: -------------------------------------------------- Bit Num | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -------------------------------------------------- | P2 | P1 | P0 | H-Bit | K-Bit | Y-Bit | Z1 | Z0 | -------------------------------------------------- ---------------------------------------------------------------------- | Bit | Meaning | Value | Meaning | ---------------------------------------------------------------------- | PPP | Message Priority | 000 | Highest Priority | | | | 111 | Lowest Priority | ---------------------------------------------------------------------- | H | Header Type | 0 | Three Byte Header | | | | 1 | Single Byte Header | ---------------------------------------------------------------------- | K | In-Frame Response (IFR) | 0 | IFR Required | | | | 1 | IFR Not Required | ---------------------------------------------------------------------- | Y | Addressing Mode | 0 | Functional Addressing | | | | 1 | Physical Addresing | ---------------------------------------------------------------------- | ZZ | Specific Message Type | 00 | These values are dependent | | | | 01 | on the K and Y values. | | | | 10 | Refer to the SAE J2178/1 | | | | 11 | document for details. | ---------------------------------------------------------------------- > functional addressing - labels messages based upon their operation code or content > physical addressing - labels messages based upon the physical address location of their source and/or destination(s) - Data Field > passive one bit - 128ms long low potential > dominant one bit - 64ms long high potential > passive zero bit - 64ms long low potential > dominant zero bit - 128ms long high potential * Cyclical Redundancy Check (CRC) - error handling byte - the sceme: > The entire message frame, not including the SOF symbol, is treated like "one big word". > This "one big word" is divided by a special "polynomial". > The 1's complement of the "polynomial" calculation is appended to the end of the associated message as a byte, and transmitted out. > All receiving nodes do a similar "polynomial" calculation to received message frames, including the inverted CRC. > If no errors have occurred, then the receivers resultant CRC calculation will always equate to a certain value, (C4 hex). - Details of the CRC process can be found in the SAE J1850 REV. MAY94 document, starting on page 15. * End of Data (EOD) - 200ms long low potential - after, if an IFR exists the receiving node(s) can immediately respond - if no IFR then the EOD symbol elapses into an End Of Frame (EOF) symbol * In-Frame Response (IFR) - allows remote receiving nodes to actively acknowledge a transmission - receiving node(s) append a reply to the end of the transmitting nodes original message frame - increased efficiency since a receiving node may respond within the same message frame that the request originated - denoted by the K-bit in the transmitting nodes header field > all receiving nodes are required to check the K-bit and respond - response must come within time between an EOD symbol and an EOF symbol > approximately 80ms. - Normalization Bit (NB) > provides a separation between the EOD symbol and the first data bit > one of two forms: = for GM compliance + a "dominant zero" denotes that the IFR does not include a CRC + a "dominant one" denotes that the IFR includes a CRC + it is believed GM will not require IFRs for any implementations = for Chrysler compliance + a "dominant zero" denotes that the IFR includes a CRC + a "dominant one" denotes that the IFR does not include a CRC - take on one of four distinct forms > Type 0 = defined as requiring no response at all > Type 1 = single byte response from a single responder > Type 2 = single byte responses from multiple responders = each responder's arbitrating for its chance to respond = not completed until all applicable responders have had a chance > Type 3 = multiple bytes from a single responder, and a CRC is appended - after the EOF symbol, idle bus time is given before other nodes can begin new transmissions > Inter Frame Separation (IFS) > denoted as a "low potential" time of 300ms following an EOF symbol * End of Frame (EOF) - EOD symbol that has elapsed from 200ms to 280ms in length - denotes the end of this particular message frame. * Break (BRK) symbol - denoted by a "high potential" lasting at least 768ms in length - maximum length of approximately 5ms - can be immediately transmitted at any time - causes any or all others to loose arbitration and cease transmission - completion leaves all other nodes in a "ready-to-receive" state - reserved for diagnostic and scan tools * goal is fault tolerance - any glitch or disturbance less than 8ms is digitally filtered out Physical Layer: * a single, voltage driven wire randomly laid with no routing restrictions * on-vehicle network length is 35 meters * off-vehicle network length can only be 5 meters long * total vehicle network length is 40 meters * maximum number of standard unit loads is 32 nodes - assuming that a node averages out to be one unit load - unit load consists of 10.6 KWs and 470 pF - minimum off-vehicle load resistance is 10.6 KWs - maximum off-vehicle capacitance is 500 pF * robust enough to survive several catastrophic system faults - damage free with the ability to recover to normal operation automatically - fault tolerance for > open circuits > direct shorts to ground > direct shorts to power > direct shorts to any other voltage between ground and power * interference to communication is not hindered if any one node fails * all pulses are wave shaped - rounds off the sharp corners of bus transitions - removes unwanted high frequency signal components Consideratons: * transmitted pulse widths are affected by node oscillator tolerances * variations in the transmission delay through a nodes source driver and the bus medium.