Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
interfaces:pican [2022/12/06 18:57]
darron
interfaces:pican [2022/12/07 17:39] (current)
darron [Termination]
Line 2: Line 2:
 <wrap right> <wrap right>
 {{:interfaces:pican.jpg?100}} {{:interfaces:pican.jpg?100}}
 +\\ \\
 +{{:interfaces:candev.jpg?100}}
 \\ \\ \\ \\
 {{:interfaces:pican_rev_b.jpg?100}} {{:interfaces:pican_rev_b.jpg?100}}
Line 17: Line 19:
  
  
-=== Boot ===+=== Install ===
  
 Append the following to boot/config.txt and reboot. Append the following to boot/config.txt and reboot.
Line 25: Line 27:
 dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
 dtoverlay=spi-bcm2835 dtoverlay=spi-bcm2835
 +</code>
 +
 +
 +dmesg
 +
 +<code>
 +CAN device driver interface
 +mcp251x spi0.0 can0: MCP2515 successfully initialized.
 </code> </code>
 === Configure === === Configure ===
Line 33: Line 43:
 </code> </code>
  
 +===Termination===
 +
 +There is a termination resistor closed with JP3.
 +
 +=== Test ===
 +
 +<code>
 +apt install can-utils
 +</code>
 +
 +Host 1
 +
 +<code>
 +candump can0
 +</code>
 +
 +Host 2
 +
 +<code>
 +cansend can0 123#DEADBEEF
 +cangen can0
 +</code>
 +
 +=== Pinout ===
 +<wrap right>
 +{{:interfaces:pican_std.jpg?100}}
 +\\ \\
 +{{:interfaces:pican_odb2.jpg?100}}
 +</wrap>
 +
 +DB9 male socket
 +
 +<code>
 +1 2 3 4 5
 + 6 7 8 9
 +
 +STANDARD        OBDII
 +2 CAN L         2 GND          SJ1
 +3 GND           3 CAN H        SJ2
 +7 CAN H         5 CAN L        SJ3
 +
 +Solder bridges must be created to select the function of the socket.
 +</code>
 === Resources === === Resources ===
 +
 +[[https://web.archive.org/web/20160104025419/http://www.skpang.co.uk/catalog/pican-canbus-board-for-raspberry-pi-p-1196.html|Product page]]
  
 [[https://wiki.kewl.org/downloads/pican_rev_B.pdf|Schematic]] [[https://wiki.kewl.org/downloads/pican_rev_B.pdf|Schematic]]