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

SPI pin configure as an interrupt in pic24fj1024

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



Joined: 01 Oct 2022
Posts: 1

View user's profile Send private message

SPI pin configure as an interrupt in pic24fj1024
PostPosted: Sat Oct 01, 2022 6:11 am     Reply with quote

I have used SPI in bit-bang mode but now suppose I want to do it as an interrupt configuration then can anyone assist me to get an example code for read and write operation...
Ttelmah



Joined: 11 Mar 2010
Posts: 19477

View user's profile Send private message

PostPosted: Sat Oct 01, 2022 10:50 am     Reply with quote

What you are asking does not make sense.

SPI is a master slave bus. For bit banged, the PIC will always be the master,
so initiates and generates the clock for all transactions. There is nothing
for an interrupt to do. Unless the slave is sending a trigger to say 'I want
you to talk to me', in which case, just have an interrupt handler for the
signal that is connected to this trigger, that then just does the bit banged
SPI. Nothing changes about the SPI transaction itself.
If you want to implement a slave, then this can't (normally) be bit banged.
The hardware really needs to be used, otherwise you cannot guarantee the
timings (except at slow rates).
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