CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

problem with the SPI_write()

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bright



Joined: 24 Apr 2011
Posts: 14

View user's profile Send private message

problem with the SPI_write()
PostPosted: Tue May 03, 2011 5:10 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 03, 2011 5:25 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 03, 2011 11:01 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group