CPOL은 CLK에 연관된것으로 클럭이 없을때 high면 1, low면 0
CPHA는 데이터를 읽을때 CLK의 edge를 보는 것으로 rising edge에서 읽으면 1, falling edge에서 읽으면 0
[링크 : https://blog.naver.com/specialist0/220645228159]
cpol과 cpha가 2가지 씩 이니 총 4가지 방식이 존재하고, 그걸 설정해서 통신하면 된다.
Most microcontroller SPI peripherals can operate with the ADS1118. The interface operates in SPI mode 1 where CPOL = 0 and CPHA = 1. In SPI mode 1, SCLK idles low and data are launched or changed only on SCLK rising edges; data are latched or read by the master and slave on SCLK falling edges. Details of the SPI communication protocol employed by the ADS1118 can be found in the Timing Requirements: Serial Interface section. |
[링크 : https://www.ti.com/lit/ds/symlink/ads1118.pdf]