PDA

View Full Version : Need Help with PIC as SPI Slave



PICtron
- 26th July 2005, 12:06
Dear Forum,

I have got to pick up data from an instrument with an SPI interface

The trouble is the Instrument acts as master
(providing the clock @ 100kHz)

Means I will have to run the PIC as slave.

Is there an (easy) way to achieve this in picbasic?

any input is appreciated!

regards

PICtron
- 27th July 2005, 23:16
Is there really no one who can help?

I think the MSSP module is the one to use.
But I'm really struggling with it.

What registers are to be set and how do I set them?

And how do I sync to the incomming datastream?

Here some more details:

Incomming data is in bursts of two packets (four bytes each packet).
there is a delay of about 200µS between two packets of a burst
and there is a delay of about 200 ms between two bursts.
The clock idles HIGH

I'm planning to use a 16F876A @ 20MHz

Any code snippet or advise will be appreciated.

PICtron
- 1st August 2005, 01:13
Thanks for "many" replies

I have found a solution to the problem on my very own!

CocaColaKid
- 16th August 2005, 20:34
Where did you find the solution? I might be running into the same type of scenario as yourself. I however have choice of interfaces to use.