Hello Darrel
my board work correct with this instruction
Shiftout sdata , sclk ,MSBFIRST, [var_out]
Do You know the correct SPI setup to use the hardware SPI to do that?
I try with this and have no function
'spi setup
SSPEN VAR SSPCON1.5 'SSP Enable bit
CKP VAR SSPCON1.4 'Clock Polarity Select
SMP VAR SSPSTAT.7 'Data input sample phase
CKE VAR SSPSTAT.6 'Clock Edge Select bit
TRISC = 0
CKP = 0 'clock idle low 'have changed to 1 for testing but no ok
CKE = 0 'transmit on idle to active transition 'have changed to 1 for testing
'but no ok
SSPIF = 0 'clear SPI interrupt
SMP = 0
main:
SSPEN = 1 'enable SPI pins
SSPBUF = var_out 'send array variable
Return
Have a idea how to fix that?
Thank You
Regards
Pedro




Bookmarks