3.2.2 CAN Controller and Transceiver
The CAN Controller on the board is the Microchip MCP2515-I/SO, this is labelled IC4.
The CAN Controller interfaces with the Raspberry Pi over the SPI interface, this consists of 4 lines:
CS – Chip select, this is an active low digital input from GPIO_08.
•
SCK – Serial clock, this is a digital input from GPIO_11.
•
SI – Serial In (also called MOSI), this is a digital input from GPIO_10.
•
SO – Serial Output (also called MISO), this is a tristate digital output to GPIO_09.
•
There are also several other discrete digital control lines for signaling interrupt events back to the
Raspberry Pi and to allow the Raspberry Pi to start a CAN transmission:
TX0RTS – Transmit Request-to-send 0, this is a digital input from GPIO_05.
•
TX1RTS – Transmit Request-to-send 1, this is a digital input from GPIO_06.
•
TX2RTS – Transmit Request-to-send 2, this is a digital input from GPIO_13.
•
INT – Interrupt, this is an active low digital output to GPIO_17.
•
RX0BF – Interrupt, this is an active low digital output to GPIO_27.
•
RX1BF – Interrupt, this is an active low digital output to GPIO_22.
•
RESET – this is an active low digital input from GPIO_18.
•
The programming interface is described in the Microchip MCP2515 datasheet [1].
The MCP2515 is supplied from the Raspberry Pi 3.3V power rails. A local 100nF (0.1uF) power supply
de-coupling capacitor C5 is placed close to IC4, this decouples the VDD at pin 18 to ground.
The CAN Controller interfaces to the physical CAN bus signals using IC1: an ISO1050 transceiver. This
device has two functions:
It interfaces the digital TX/RX signals from the CAN controller into differential CAN signals.
•
It isolates the digital system potential from the CAN bus potential. This function is important as it
•
allows the breaking of ground loops and provides galvanic isolation between the two circuit
potentials.
Figure 4 - CAN Controller and Transceiver
When the MCP2515 is powered with 3.3V it is only specified to be used with a crystal up to a maximum
frequency 25MHz. To allow the highest CAN transmission rates of 1MBaud this design has a 20MHz
crystal Q2, this is fitted along with 18pF loading capacitors C3 & C4.
01/06/2018
Document Number
IEMAN000001
Document Title
CAN Interface pHAT User Manual
8 of 22
Document Revision
Page
R003
8 of 22