Hi,
I have 2x PICs 'talking' to one another via SPI
Here is one section of CODE that is blockig the program.
Is there an alternative to WAIT/WHILE?
Camerart
I have 2x PICs 'talking' to one another via SPI
Here is one section of CODE that is blockig the program.
Is there an alternative to WAIT/WHILE?
Camerart
Code:
While slave4431_cs = 1 'If 1 then it waits till the CS makes it 0 then it LOOPs
For spipsn = 0 To 33 'GPS=0to29-$toW INC, QEI=30,31 BATVOLT=32 SPARE DATA=33 'QEI?@
SSPBUF = s2m(spipsn) 'Transfer S2M(spipsn) into SSPBUF
While SSPSTAT.BF = 0
Wend
m2s(spipsn) = SSPBUF 'Transfer M2S(spipsn) BYTE from SSPBUF into M2S(spipsn)
Next spipsn
spi_pin_rdy = 0
Wend
spipsn = 0
yled = 0
RCSTA.CREN = 1
PIE1.RCIE = 1