enable disable usart interrupt

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
saharul
Posts: 489
Joined: 08 Jul 2010 08:11

enable disable usart interrupt

#1 Post by saharul » 24 Oct 2014 03:00

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 :D

keshena
Posts: 68
Joined: 07 Dec 2013 09:37
Location: South Africa
Contact:

Re: enable disable usart interrupt

#2 Post by keshena » 24 Oct 2014 07:38

Depending on the type of microcontroller used:

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

saharul
Posts: 489
Joined: 08 Jul 2010 08:11

Re: enable disable usart interrupt

#3 Post by saharul » 24 Oct 2014 08:18

Thanks Keshena :D :D

but i got error message "undeclare identifier.

i use PIC16F877A.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: enable disable usart interrupt

#4 Post by filip » 24 Oct 2014 13:24

Hi,

Try using :

Code: Select all

RCIE_bit = 0; // Disable Rx1 interrupts

// Send your data

RCIE_bit = 1; // Enable Rx1 interrupts
Regards,
Filip.

saharul
Posts: 489
Joined: 08 Jul 2010 08:11

Re: enable disable usart interrupt

#5 Post by saharul » 25 Oct 2014 23:34

Thanks filip.

Post Reply

Return to “mikroC PRO for PIC General”