GCBASIC doesn't have support for 9-bit SPI, but you could open the ssp.h file (in the include\lowlevel directory of the GCBASIC install directory), make a copy, and then have a go at altering it to support 9 bit SPI based on the datasheet for your PIC.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i didnt get any replies in my last post, is it even possible to send 9 bit spi?
maybe even 8 bit spi
Look in the contributors forum,
Multi_Char LED Display using MC14489B
This contains a sub ShiftOut(DataByte)#NR
This only wrote out to the display but should be a good start.
The commented 'set PORTD.X were only used for trouble shooting and are not necessary.
I know that the chip has a built in port to do SPI but have never tried that yet.
Mike
For 8 bit SPI with the hardware SPI module, use the SPITransfer sub:
http://gcbasic.sourceforge.net/help/spitransfer.htm
GCBASIC doesn't have support for 9-bit SPI, but you could open the ssp.h file (in the include\lowlevel directory of the GCBASIC install directory), make a copy, and then have a go at altering it to support 9 bit SPI based on the datasheet for your PIC.
thanks everyone
by the way, whats the '#NR' mean
#NR stops the value of the variable being copied back out of the subroutine. It's explained in more detail at http://gcbasic.sourceforge.net/help/subroutines.htm
ok