Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how can we use serial interrupts in Mikroc PRO????

Status
Not open for further replies.

m.waqas

Junior Member level 1
Joined
Dec 1, 2009
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
pakistan
Activity points
1,404
Mikroc Interrupts

Hi

how can we use serial interrupts in Mikroc PRO????

i want to send and receive data using interrupts but don't know how to use them
in mikroc.
i need ur help to solve this problem.

Thanx
 

Re: Mikroc Interrupts

You just need to write a function called interrupt. If you are going to use priority levels on interrupts, high priority interrupt service routines are described in void interrupts(void) function, and low level interrupts are described in void interrupts_low(void) function. To check for the correct interrupts, use if checking statement for set interrupt flags.

Example of Timer0 interrupt for PIC mcu:

Code:
void interrupt()
{
     if(TMR0IF_bit)               // TIMER0 interrupt
     {
      TMR0IF_bit   = 0;           // clear TIMER0 overflow interrupt flag bit

      // interrupts service routine's for TIMER0 interrupt functions go here 

     }
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top