I have been working on connecting the ISD4004 chip to the Arduino for a while now and am still not sure which SPI mode to use to communicate with the ISD4004. Would you please clarify this. I have linked the datasheet below.
1. Meaning of SPI Mode (Fig-1) of ISD4004.
Figure-1:
(1) Clock Phase (CPHA) : Rising Edge
Data sent by Master will be clocked into Slave at the rising edge of SCK.
(2) Clock Polarity (CPOL): LOW
The idle state of SCK is LOW.
2. Meaning of SPI Mode (Fig-2, 3) of ATmega328P MCU of Arduino UNO Board.
Figure-2: SPI Mode 1&3
(1) CPHA:
(2) CPOL:
Figure-3: SPI Mode 0&2
Mode-0:
(1) CPHA: 0
Data will be clocked out from Master at the rising edge of SCK.
(2) CPOL: 0
The idle state of SCK is LOW.
3. Fig-1 matches with Fig-3 (Mode-0: CPHA=0, CPOL=0); so, select Mode-0 operation for Master.
Thank you so much for the diagrams comparing Arduino SPI modes to the ISD4004 SPI modes. Reading the ISD4004 timing diagram by itself was somewhat confusing but seeing everything next to each other made it much clearer.