I’ve read that, bun I cannot see how you can hold the SCLK open and invert the MOSI.
I’ve got the SPI working but on the scope I cannot recreate what the pcf7991 document says or indeed what I can see what I hook the scope up to a pic controlled version of the circuit
“Any communication between the PCF7991AT and the
microcontroller begins with an initialization of the serial
interface before the desired command can be issued. The
interface initialization condition is a low-to-high transition
of the signal DIN while SCLK is high (see Fig.4).”
Is there any way of hold the SCLK open before it starts sending the clock?
When I look at the way the Pic chip is implement it, its holding the clock on the SCLK live for around 5 cycles and the MOSI goes low during the period and then the data is sent.
Maybe I’m being thick, but I just cannot see what I need to do.
From what I can see, the PCF7991 is a very old IC. I can only find a 1 page PDF for it dated 1998. The NXP website doesn’t even find it in a search.
Most likely you are going to have to use BIT BANGING to talk to the device. This way you can control the SCK and MOSI lines in code as I am not sure you can do this from NETMF if you have already configured the SPI in hardware.
EDIT: I have found the HTRC110 which seems to be similar. Doesn’t look like to follows conventional SPI modes so bit banging may be your best solution.