Message Overview
This implementation sends 6 messages every 20 ms (50 Hz cycle). All use 29-bit extended IDs and 8 data bytes, conforming to SAE J1939.
Message table
| ID (hex) | Name | PGN | Variable | Active bytes |
|---|---|---|---|---|
0x0CF00400 |
EEC1 — Engine RPM | 61444 | rpm |
3–4 |
0x0CFE6CEE |
TCO1 — Vehicle speed | 65132 | vel |
6–7 |
0x18FEEE00 |
ET1 — Engine temperature | 65262 | temp |
0 |
0x18FEFC21 |
ZBR — Throttle | 65276 | gas |
1 |
0x18FEAE0B |
EBS — Air pressure | 65198 | aire1, aire2 |
2–3 |
0x18EEFF21 |
Heartbeat | — | — | all 0x00 |
29-bit ID structure
Every J1939 message ID encodes three fields:
| Bits | Field | Description |
|---|---|---|
| 28–26 | Priority | 0 (highest) to 7 (lowest) |
| 25–8 | PGN | Identifies the data type |
| 7–0 | SA | Source address — which ECU is sending |
Byte convention
Unused bytes are always set to 0xFF, which in J1939 means parameter not available (SNA — Specific Not Available).
Byte: 0 1 2 3 4 5 6 7
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│ FF │ FF │ FF │ Lo │ Hi │ FF │ FF │ FF │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
↑ ↑
Actual data (little-endian)
Send cycle
All 6 messages are sent sequentially every 20 ms:
void loop() {
// send all messages
// ...
delay(20); // 50 Hz
}
Source addresses in use
| SA (hex) | Decimal | ECU |
|---|---|---|
0x00 |
0 | Engine ECU (RPM, temperature) |
0xEE |
238 | Tachograph ECU (speed) |
0x21 |
33 | Simulator node (throttle, heartbeat) |
0x0B |
11 | EBS brake ECU (air pressure) |
No comments to display
No comments to display