Vizier87
Active Member
Hi guys,
I've started with configuring a lot of functions with my newly built remote which consists of keypads and an Xbee module with a 877A.
My transmitter goes on like this:
I've successfully received data at my receiver, a 18F4620, in which I only did it like this:
And portd lights up accordingly.
However, if I try to perform more actions within a certain value of the rcreg, like this:
So basically, I'd like to make the receiver blink as long as it's receiving data. Now, that didn't work smoothly. Always I get it without getting out of the loop when my transmitter is not transmitting anything.
So my friend told me I need to use interrupt on this one. The thing is, I just don't know how to use it for this purpose. I still don't understand interrupts on this case.
Hope anyone can give me an example.
Thanks.
Vizier87
I've started with configuring a lot of functions with my newly built remote which consists of keypads and an Xbee module with a 877A.
My transmitter goes on like this:
C:
if (plus==1){
txreg=0xbf;
}
if (Enter==1){
txreg=0xca;
}
else txreg=0;
I've successfully received data at my receiver, a 18F4620, in which I only did it like this:
C:
if (rcif==1){
portd=rcreg;
}
And portd lights up accordingly.
However, if I try to perform more actions within a certain value of the rcreg, like this:
C:
if (rcreg==0xAA){
portd=~portd;
Delay_ms(1000);
}
So basically, I'd like to make the receiver blink as long as it's receiving data. Now, that didn't work smoothly. Always I get it without getting out of the loop when my transmitter is not transmitting anything.
So my friend told me I need to use interrupt on this one. The thing is, I just don't know how to use it for this purpose. I still don't understand interrupts on this case.
Hope anyone can give me an example.
Thanks.
Vizier87