Last active
November 24, 2024 21:26
-
-
Save agmangas/4f8ef5febcb7564274f77c49ccbc0ffb to your computer and use it in GitHub Desktop.
Revisions
-
agmangas revised this gist
Oct 15, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ As the *PDU Format* is *greater or equal* than `F0` this is a **Global PGN**. In 0000 0000 1111 0000 0000 0001 ``` > The PGN is a 18 bit value. Converted to decimal: `61441`. -
agmangas revised this gist
Oct 15, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,15 +42,15 @@ Converted to decimal: `61441`. Original CAN ID: ``` 0 C 8 2 0 E 0 F 0000 1100 1000 0010 0000 1110 0000 1111 ``` Separated on each individual part: Part | Value --- | --- Priority | `011` Reserved | `0` Data Page | `0` PDU Format | `10000010` -
agmangas created this gist
Oct 15, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,71 @@ # CAN IDs & J1939 PGNs ## Global PGN Example Original CAN ID: ``` 1 8 F 0 0 1 0 B 0001 1000 1111 0000 0000 0001 0000 1011 ``` Separated on each individual part: Part | Value --- | --- Priority | `110` Reserved | `0` Data Page | `0` PDU Format | `11110000` PDU Specific | `00000001` Source Address | `00001011` > Notice that an **Extended CAN Identifier** has 29 bits, so the first three leading bits are not taken into account. As the *PDU Format* is *greater or equal* than `F0` this is a **Global PGN**. In this type of PGNs the *PDU Specific* is appended to the *PDU Format* to get the final PGN. ``` 000000 (6 bits) + Reserved (1 bit) + Data Page (1 bit) + PDU Format (8 bits) + PDU Specific (8 bits) ``` ``` 0 0 F 0 0 1 0000 0000 1111 0000 0000 0001 ``` > The PGN is a 24 bit value. Converted to decimal: `61441`. ## Specific PGN Example Original CAN ID: ``` 1 8 8 2 0 E 0 F 0001 1000 1000 0010 0000 1110 0000 1111 ``` Separated on each individual part: Part | Value --- | --- Priority | `110` Reserved | `0` Data Page | `0` PDU Format | `10000010` PDU Specific | `00001110` Source Address | `00001111` As the *PDU Format* is *lower* than `F0` this is a **Specific PGN**. These belong to messages that are directed to a specific device (peer-to-peer). ``` 000000 (6 bits) + Reserved (1 bit) + Data Page (1 bit) + PDU Format (8 bits) + 00000000 (8 bits) ``` ``` 0 0 8 2 0 0 0000 0000 1000 0010 0000 0000 ``` Converted to decimal: `33280`.