본문 바로가기
IoT/아두이노

CAN 모듈 Board별 SPI_CS_PIN 핀번호

by eeeun:) 2022. 1. 27.
반응형

CAN 모듈이 아두이노와 통신할 때 SPI 통신을 사용한다.

CAN 모듈을 아두이노에 연결해서 쓸 때 SPI_CS_PIN의 핀번호로 CAN를 초기화해줘야 한다.

 

#define SPI_CS_PIN  9

MCP_CAN CAN(SPI_CS_PIN);

 

SPI CS 관련 Reference

https://en.wikipedia.org/wiki/Chip_select

 

Chip select - Wikipedia

An example SPI with a master and three slave select lines. Note that all four chips share the SCLK, MISO, and MOSI lines but each slave has its own slave select. Chip select (CS) or slave select (SS) is the name of a control line in digital electronics use

en.wikipedia.org

 

728x90

댓글