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

saving the SPI data

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



Joined: 31 Mar 2011
Posts: 4

View user's profile Send private message

saving the SPI data
PostPosted: Mon Apr 11, 2011 5:51 pm     Reply with quote

I tried to save a series of data that I read in the buffer register of the SPI in an array. but failed to do so. Is it possible to store data that is read from the SPI in an array? If not, what are the possible way of saving it? thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 11, 2011 6:19 pm     Reply with quote

This thread shows how to receive SPI data in an interrupt and save it
in a circular buffer. It's similar to ex_sisr.c, except it's for SPI:
http://www.ccsinfo.com/forum/viewtopic.php?t=26888

This code is for an SPI slave. You didn't say if your PIC will be an SPI
master, or a slave.

The PIC is the SPI master if it controls some other chip which is an SPI
slave, such as an eeprom, A/D chip, etc.
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