반응형
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
'IoT > 아두이노' 카테고리의 다른 글
PlatformIO 라이브러리 추가 (0) | 2022.02.09 |
---|---|
ESP8266에 MCP2515 CAN 통신 모듈 연결하기 (0) | 2022.02.06 |
PlatformIO Serial Monitor 사용법 (0) | 2022.01.26 |
ESP8266 PlatformIO 프로젝트 설정하기 (0) | 2022.01.26 |
PlatformIO Library 추가하기 (0) | 2022.01.19 |
댓글