using to CanBus on on pi (SPI0 and SPI1)
Posted: Tue Nov 19, 2019 4:01 pm
Hello ,
wanted to know how can I read data from 2 canbus interfaces at the same time.
Right now I'm using this configuration for 1 canbus :
/boot/config.txt
and this connections
and it's working without any problems
I want to use another one (at the same time) and I saw there is a SPI1 interface on th PI.
If I do the following , will it work?
Or do I need to configurate something else elsewhere?
Thanks ,
wanted to know how can I read data from 2 canbus interfaces at the same time.
Right now I'm using this configuration for 1 canbus :
/boot/config.txt
Code: Select all
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=12
dtoverlay=spi-bcm2835-overlay
Code: Select all
GPIO CAN
HEADR SIGNAL MODULE
PIN NAME --- SIGNAL
#02 5V --- VCC
#06 GND --- GND
#19 MOSI --- SI
#21 MISO --- SO
#23 SCLK --- SCK/CLK
#24 SPI0.CE0 --- CS
#32 GPIO12 --- INT
I want to use another one (at the same time) and I saw there is a SPI1 interface on th PI.
If I do the following , will it work?
Code: Select all
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=12
dtoverlay=mcp2515-can1,oscillator=8000000,interrupt=16 ///adding only this line
dtoverlay=spi-bcm2835-overlay
Code: Select all
GPIO CAN
HEADR SIGNAL MODULE
PIN NAME --- SIGNAL
#02 5V --- VCC
#06 GND --- GND
#38 MOSI --- SI
#35 MISO --- SO
#40 SCLK --- SCK/CLK
#26 SPI0.CE0 --- CS
#36 GPIO16 --- INT
Thanks ,