Pinout & Interfaces
The RS485 CAN HAT connects to the Raspberry Pi through the standard 40-pin GPIO header, using SPI for CAN bus communication and UART for RS-485. This page documents every signal the HAT uses and the terminal block pinout for field wiring.
CAN Bus Pins
Section titled “CAN Bus Pins”The CAN interface is driven by the MCP2515 controller over SPI, with an interrupt line on GPIO 25.
| Function | Raspberry Pi (BCM) | Description |
|---|---|---|
| 3V3 | 3V3 | 3.3V Power Input |
| GND | GND | Ground |
| SCK | SCK | SPI Clock Input |
| MOSI | MOSI | SPI Data Input |
| MISO | MISO | SPI Data Output |
| CS | CE0 | Chip Select |
| INT | GPIO 25 | Interrupt Output |
RS-485 Pins
Section titled “RS-485 Pins”The RS-485 interface uses the Pi’s UART and, optionally, a direction-control GPIO.
| Function | Raspberry Pi (BCM) | Description |
|---|---|---|
| 3V3 | 3V3 | 3.3V Power Input |
| GND | GND | Ground |
| RXD | RXD | UART Receive |
| TXD | TXD | UART Transmit |
| RSE | GPIO 4 | TX/RX Direction Control |
Terminal Blocks
Section titled “Terminal Blocks”The board exposes two screw-terminal blocks on the edge for field wiring.
CAN Terminal
Section titled “CAN Terminal”| Terminal | Signal |
|---|---|
| H | CAN High |
| L | CAN Low |
RS-485 Terminal
Section titled “RS-485 Terminal”| Terminal | Signal |
|---|---|
| A | Non-inverting (D+) |
| B | Inverting (D-) |