View previous topic :: View next topic |
Author |
Message |
bright
Joined: 24 Apr 2011 Posts: 14
|
problem with the SPI_write() |
Posted: Tue May 03, 2011 5:10 am |
|
|
I am using spi to interface my nRF905 with the PIC16f690 microcontoller, I am using MPLAB SIM to see what is happening inside my code. Now my problem is that when I reach the line: spi_write(0xFF); it does not continue to the next line, it is if the spi_write() is an infinite loop. Please help. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9226 Location: Greensville,Ontario
|
|
Posted: Tue May 03, 2011 5:25 am |
|
|
You'll have to post a small, complete program with PIC type and compiler version to get any help here. the old crystal ball can't see the whole picture ! As well what is an 'nRF905' ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue May 03, 2011 11:01 am |
|
|
Quote: | When I reach the line: spi_write(0xFF); it does not continue to the
next line, it is if the spi_write() is an infinite loop.
|
Go to MPLAB Help / Topics / MPSIM.
Then look in this section: Limitations / General Limitations
It says:
Quote: |
For devices with the listed peripherals, these peripherals are NOT supported:
Serial I/O (i.e., SSP including I2C and SPI). As a result, the SSPSTAT register has been made readable and writable.
Note: You can use stimulus to emulate many of the signals of SPI and have firmware read data as if it was SPI.
|
|
|
|
|