I'm interfacing a 23LC1024 SPI Serial SRAM with a PIC18, using the C18 compiler and the built-in functions from <spi.h>
as described in the Compiler Libraries, section 2.8:
OpenSPI1 - Initialize the SSPx module.
void OpenSPI1(
unsigned char sync_mode,
unsigned char bus_mode,
unsigned char smp_phase);
For bus_mode
, I can choose one of the following modes:
MODE_00
- data is read on the clock's rising edge (idle to active clock state)MODE_01
- data is read on the clock's falling edge (active to idle clock state)MODE_10
- data is read on the clock's falling edge (idle to active clock state)MODE_11
- data is read on the clock's rising edge (active to idle clock state)
I can't find in the datasheet of the 23LC1024 what mode I should use. Doesn't it matter? Or is there a standard assumed?