Hello,
It would seem possible to use the SPI facility for the DS1302, provided CPHA = 0 (and CPOL = 0). In the Dallas data sheet, it would appear that fig 3 for the single byte read may have an error with only 15 clock pulse shown - there would need to be a sixteenth clock for the MCU master to read the LS bit of the returned byte on its positive edge, and this would be compatible with SPI.
For the CPHA = 0 operation, the MS bit of the returned data needs to be valid on the positive edge of the ninth clock pulse, so the data becoming output on the negative edge of the eighth clock pulse is correct. To avoid the timing issues during the input-to-output transition of the data line at the DS1302 (a conflict might be present for a very short interval) I would suggest to include a series resistor in the line, say 4k7, to provide current limiting.
For MCU operation with a single data line (MOSI becomes MOMI),
SPIC2_SPCO = 1;
Prior to the command byte being sent,
SPIC2_BIDIROE = 1; // For data output from MCU
Prior to receiving the return data byte (by sending a dummy byte),
SPIC2_BIDIROE = 0; // For data input to MCU
Regards,
Mac