I'm making this project to validate the messages a vehicle's subsystems messages are being sent and received as expected but sometimes I'm going to need to test SPI, sometimes I2C, sometimes UART and... sometimes CAN. I know I can put SPI, I2C and UART together but CAN(MCP2515 module) uses the same pins as SPI and I'm not sure about how can I deal with this problem...
Your MCP2515 module uses SPI for communication.
Multiple devices can share an SPI bus, however only one device can be active at a time. This is controlled via the 'slave select' SS , (or 'chip select' CS) line for each device.
Awesome! Thank you a lot for the help, I'll proceed to testing next monday. I have another question... I've been reading the files regarding the mcp_can library and I haven't been able to understand the parameters very well, maybe someone knows how to explain the parameters for this function:
CAN.sendMsgBuf(txID,1, 5, var);
What the use of the second parameter? I haven't been able to figure out what that 1 is doing there. Thanks again and I hope someone can help me again.