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
Is it sufficient. Above needs to be called two times to transfer 16-bits and then again check /INT has become high or not? Not sure how to keep watch on the high, low, high transition of /INT.
--Sarvanan.
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:
uint8_t exchange8bit(int data){
SSPBUF = data;
while(/INT ==1){
while(SSPSTATAbits.BF == 0x00)
{
}
return SSPBUF;
}
return error;
}
--Sarvanan.