This is an old revision of the document!


PiCAN

pican.jpg

pican_rev_b.jpg

The PiCAN is a reimplementation of the interface found here.

Headers

JP1-1 JP1-2 JP1-3
CANL CANH GND
JP2-1 JP2-2 JP2-3
GPIO14
TXD
GPIO15
RXD
GND
P1-3 P1-2 P1-1
GPIO14 GND 5V

Install

Append the following to boot/config.txt and reboot.

dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
dtoverlay=spi-bcm2835

dmesg

CAN device driver interface
mcp251x spi0.0 can0: MCP2515 successfully initialized.

Configure

ip link set can0 up type can bitrate 250000
ip link set can0 txqueuelen 1024
ip -s -d link show can0

Test

apt install can-utils

Host 1

candump can0

Host 2

cansend can0 123#DEADBEEF

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies