66 | | 01:04:76:80:01:00 |
| 66 | |
| 67 | {{{ |
| 68 | ------------------------------------------------- |
| 69 | Standard CAN message example: ID=76h |
| 70 | byte0 - 07h (incoming CAN MESSAGE) |
| 71 | byte1 - 00h (00h=b00000000 bit.7=0 standard message) (this is byte.1 of std.ID excluding high 5 bits in this byte) |
| 72 | //if byte1 bit7=0 expect 1 more byte for ID |
| 73 | |
| 74 | byte2 - 76h (this is byte.0 of std.ID) |
| 75 | byte3 - DLC (message data length code. also the payload. 8 in this example) |
| 76 | byte4 - 01h (byte.0 of data) |
| 77 | byte5 - 02h (byte.1 of data) |
| 78 | byte6 - 03h (byte.2 of data) |
| 79 | byte7 - 04h (byte.3 of data) |
| 80 | byte8 - 05h (byte.4 of data) |
| 81 | byte9 - 06h (byte.5 of data) |
| 82 | byte10 - 07h (byte.6 of data) |
| 83 | byte11 - 08h (byte.7 of data) |
| 84 | |
| 85 | std.ID example 1 (ID=76h) |
| 86 | 07h, 00h,76h, 01h,02h,03h,04h,05h,06h,07h |
| 87 | |
| 88 | std.ID example 2 (ID=5DFh) |
| 89 | 07h, 05h,DFh, 01h,02h,03h,04h,05h,06h,07h |
| 90 | ------------------------------------------------- |
| 91 | |
| 92 | ------------------------------------------------- |
| 93 | Extended CAN message example: ID=76h |
| 94 | byte0 - 07h (incoming CAN MESSAGE) |
| 95 | byte1 - 80h (80h=b10000000 bit.7=1 extended message ) (this is byte.3 of ext.ID excluding high 3 bits in this byte) |
| 96 | //if byte1 bit7=1 expect 3 more bytes for ID |
| 97 | byte2 - 00h (this is byte.2 of ext.ID) |
| 98 | byte3 - 00h (this is byte.1 of ext.ID) |
| 99 | byte4 - 76h (this is byte.0 of ext.ID) |
| 100 | byte5 - DLC (message data length code. also the payload. 8 in this example) |
| 101 | byte6 - 01h (byte.0 of data) |
| 102 | byte7 - 02h (byte.1 of data) |
| 103 | byte8 - 03h (byte.2 of data) |
| 104 | byte9 - 04h (byte.3 of data) |
| 105 | byte10 - 05h (byte.4 of data) |
| 106 | byte11 - 06h (byte.5 of data) |
| 107 | byte12 - 07h (byte.6 of data) |
| 108 | byte13 - 08h (byte.7 of data) |
| 109 | |
| 110 | ext.ID example 1 (ID=76h ( b00000000000000000000000001110110 )) |
| 111 | 07h, 80h,00h,00h,76h, 01h,02h,03h,04h,05h,06h,07h |
| 112 | |
| 113 | ext.ID example 2 (ID=12345678h ( b00010010001101000101011001111000 )) |
| 114 | 07h, 92h,34h,56h,78h, 01h,02h,03h,04h,05h,06h,07h |
| 115 | |
| 116 | ext.ID example 3 (ID=1FFFFFFFh ( b00011111111111111111111111111111 29 bits, max value of ext.ID)) |
| 117 | 07h, 9Fh,FFh,FFh,FFh, 01h,02h,03h,04h,05h,06h,07h |
| 118 | -------------------------------------------------- |
| 119 | }}} |