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

question regarding spi

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



Joined: 13 Dec 2004
Posts: 7

View user's profile Send private message Yahoo Messenger MSN Messenger

question regarding spi
PostPosted: Mon Dec 13, 2004 9:36 pm     Reply with quote

Hello

I had a question regarding the #int_ssp directive used by the ccs compiler ...
(there was no section in the help section of the ccs software)

I was looking over the data sheet of 16f877A and it indicated that an interrupt happens when the serial buffer copies the data into the the serial T/R buffer ... (in other words, when a byte of data is recieved)

is this interrupt used for only recievign data ?

Thank you very much in advance
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Dec 14, 2004 2:31 am     Reply with quote

Receiving and transmitting data on the SPI bus happens synchronously, i.e. at the same time you are transmitting data, the same clock pulses are used for clocking in data from the receive line. Even when you only want to receive data, you will be transmitting data as well. That explains why the spi_read() function has a parameter.

Similary #int_ssp is signalling both a byte being transmitted as received.
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