CAN bus communication between three PIC18F4580 ECU nodes, simulating an automotive dashboard network.
A car dashboard built from three ECUs (Electronic Control Units) that talk over a CAN bus, similar to how real vehicles connect their internal systems. Each ECU handles one job, and together they show speed, gear, RPM and indicator status on a dashboard display.
| Node | Role |
|---|---|
| ECU1 | Reads speed (ADC) and gear position (matrix keypad), transmits over CAN |
| ECU2 | Reads RPM (ADC) and processes indicator status (digital keypad) |
| ECU3 | Receives all CAN messages, displays data on LCD, controls indicator LEDs |
- Microcontroller: PIC18F4580 (with built-in CAN module)
- Display: 16x2 character LCD
- Inputs: Matrix / digital keypad, ADC
- Tools: MPLAB X v6.25, XC8 v3.10
| ID | Parameter | Sent From |
|---|---|---|
| 0x10 | Speed | ECU1 |
| 0x20 | Gear | ECU1 |
| 0x30 | RPM | ECU2 |
| 0x40 | Engine Temp | ECU2 |
| 0x50 | Indicator | ECU2 |
- Multi-ECU communication over the CAN bus
- Real-time display of speed, gear, RPM and indicator status
- Collision alert when the gear is set to the collision gear
- Indicator control with blinking arrows
- Modular code, with each ECU in its own project
Open each .X folder in MPLAB X and build it separately, then flash each board.
ECU1.X: sensor node (speed and gear)ECU2.X: sensor node (RPM and indicators)ECU3.X: dashboard node (display)