As far as I know there is no PBP command to do it. You could, depending on the speed of your external device clock, roll your own or perhaps you could use a PIC with a SSP module capable of operating in slave mode.
Since, if I understad correctly, YOU initiate the read by pulling the CS\ low (ie you know exactly when the data is starting to come in) it should be quite possible to roll your own routine if the speed is fairly low. It's nothing I've done personally though but off the top of my head something like:
Code:
InputData Var WORD
InputPin VAR PortB.0
ClockInput VAR PortB.1
CSOutput VAR PortB.2
i var BYTE
InputData = 0 ' Initialize
CSOutput = 0 ' Pull CS line low to initiate transfer
For i = 1 to 12 ' Get 12 bits
While ClockInput = 0 ' Wait for clock going high
Wend
InputData = InputData << 1 + InputPin
While ClockInput = 1 ' Wait for clock going low
Wend
Next ' Do next bit until we have 12
CSOutput = 1
/Henrik.
Bookmarks