I am trying to write to the SPI port of a PIC18F26J53.
When I call WriteSPI, WriteSPI locks up and never returns from the function.
I am running the chip at the default 4MHZ.
Here are my configuration settings.
#pragma config WDTEN = OFF
#pragma config XINST = OFF
#pragma config OSC = INTOSC
This is my first experience with a PIC18F26J53 so perhaps it is a config setting?
Here is my code:
OpenSPI1(SPI_FOSC_4, MODE_00, SMPEND);
WriteSPI1(255);
I have also tried
OpenSPI11(SPI_FOSC_4, MODE_00, SMPEND);
WriteSPI11(255);
which locks up and
OpenSPI2(SPI_FOSC_4, MODE_00, SMPEND);
WriteSPI2(255);
Which does not lock up but I have not yet figured out how to configure the SPI2 pins since they seem to be programmable.
I also have a 18F14K22 which works fine with WriteSPI.
Any idea wht WriteSPI would be locking up on the PIC18F26J53?
When I call WriteSPI, WriteSPI locks up and never returns from the function.
I am running the chip at the default 4MHZ.
Here are my configuration settings.
#pragma config WDTEN = OFF
#pragma config XINST = OFF
#pragma config OSC = INTOSC
This is my first experience with a PIC18F26J53 so perhaps it is a config setting?
Here is my code:
OpenSPI1(SPI_FOSC_4, MODE_00, SMPEND);
WriteSPI1(255);
I have also tried
OpenSPI11(SPI_FOSC_4, MODE_00, SMPEND);
WriteSPI11(255);
which locks up and
OpenSPI2(SPI_FOSC_4, MODE_00, SMPEND);
WriteSPI2(255);
Which does not lock up but I have not yet figured out how to configure the SPI2 pins since they seem to be programmable.
I also have a 18F14K22 which works fine with WriteSPI.
Any idea wht WriteSPI would be locking up on the PIC18F26J53?