Hi,
i need to have communication via RF with two other controllers. my problem is while transmitting data to other two controllers, the controller who transmit signals also triggered by usart interrupt receive signal .
can someone please share how to write code to disable the serial receive interrupt while transmitting and enable back after transmitting. i still need to use it with interrupt.
Many thanks
enable disable usart interrupt
Re: enable disable usart interrupt
Depending on the type of microcontroller used:
RC1IE_bit = 0; // Disable Rx1 interrupts
// Send your data
RC1IE_bit = 1; // Enable Rx1 interrupts
RC1IE_bit = 0; // Disable Rx1 interrupts
// Send your data
RC1IE_bit = 1; // Enable Rx1 interrupts
Free Microcontroller Tutorials & Projects for Hobbyists and students from beginners to advanced.
Website: https://www.studentcompanion.co.za/cate ... o-for-pic/
Youtube Tutorials: https://www.youtube.com/user/StudentCompanionSA
Website: https://www.studentcompanion.co.za/cate ... o-for-pic/
Youtube Tutorials: https://www.youtube.com/user/StudentCompanionSA
Re: enable disable usart interrupt
Thanks Keshena
but i got error message "undeclare identifier.
i use PIC16F877A.
but i got error message "undeclare identifier.
i use PIC16F877A.
Re: enable disable usart interrupt
Hi,
Try using :
Regards,
Filip.
Try using :
Code: Select all
RCIE_bit = 0; // Disable Rx1 interrupts
// Send your data
RCIE_bit = 1; // Enable Rx1 interrupts
Filip.