Ints are not needed. Here's my macro code to send/rcv SPI:
; send one byte out/in on SPI
; operates from Bank0
; value is w is sent out, contains output in w when returns
sndSPI macro
movwf sspbuf
bsf status,5
btfss sspstat,bf
goto $-1
bcf status,5
movf sspbuf,w
endm
;
--Bob
----- Original Message -----
From: "Thomas N" <spam_OUTthomasn101TakeThisOuT
HOTMAIL.COM>
To: <.....PICLISTKILLspam
@spam@MITVMA.MIT.EDU>
Sent: Wednesday, November 27, 2002 11:12 PM
Subject: Re: [PIC]: SPI protocol
{Quote hidden}> Thank you for your comments!
>
> When you write data to SSPBUF, how do you know when the data transmision
> is completed? The only way to know this is thru interrupt. If I send 2
> bytes of data, interrupt will happen 2 times. How do I know which
> interrupt is the second interrupt(when the second byte is sent)?
>
> Regards,
> Thomas
>
>
> {Original Message removed}