SPI with PIC 18F458

Hello

Does anybody know how I can apply the data at the MOSI befor the positive edge from the clock? If I scale the MOSI and the Clock I see that the data on MOSI apply a little bit after the positive edge of Clock. But I have to apply the data on MOSI at min. 2ns befor the pos. edge of the Clock?

Does anybody know how I can set any settings on the 18F458 for this?

Thank you!

If the data needs to be stable during the positive edge of the clock, then you want it to change at the preceeding negative edge. Either CKP=1/CKE=0 or CKP=0/CKE=1 will accomplish this, differing only in the idle state of the clock line (which may or may not matter, depending on the device you’re talking to).

Yes that was the problem. Thank you very much!!! It works now!

Best

Joni