Menu

SPI

Help
2008-09-16
2013-05-30
  • Nobody/Anonymous

    i didnt get any replies in my last post, is it even possible to send 9 bit spi?
    maybe even 8 bit spi

     
    • Nobody/Anonymous

      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

       
    • Hugh Considine

      Hugh Considine - 2008-09-17

      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.

       
    • Nobody/Anonymous

      thanks everyone

       
    • Nobody/Anonymous

      by the way, whats the '#NR' mean

       
    • Hugh Considine

      Hugh Considine - 2008-09-17

      #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

       
    • Nobody/Anonymous

      ok

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.