Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

Wait untill interrupt value changes

$
0
0
Hi,

I am working on 8-bit microcontroller. I have to do data transfer when /INT value is high. After transfer of 16-bit , /INT will change high to low and then again high. Next 16-bit will be transferred only when /INT is high. My PIC is master and slave is handling the /INT. PIC has to watch this /INT to initiate data transfer. How to implement this ? My idea is
Code (Text):
  1.  
  2. uint8_t exchange8bit(int data){
  3.             SSPBUF = data;
  4.             while(/INT ==1){
  5.             while(SSPSTATAbits.BF...
Wait untill interrupt value changes

Viewing all articles
Browse latest Browse all 4923

Trending Articles