Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing registers/interrupts
01-04-2015, 10:03 PM,
#10
RE: Accessing registers/interrupts
(01-04-2015, 06:54 PM)joel Wrote: There is bugs in the preprocessor of the V11 beta3.
try to update library and ide with the latest library and ide zip file avail on github. it may fix your problem (or not...)

Joël

Perfect, this tutorial works (compiles) now, the code looks also much simpler:


Code:
// define here the code to execute when an interrupt occure
void Timer1Interrupt(void)
{
   // Check Timer1 Interrupt flag
   if (Int.getFlag(INT_TIMER1))
   {
       // Clear the timer interrupt flag
       Int.clearFlag(INT_TIMER1);
       TMR1=0;        // reset the timer register
       counter++;        // increment the counter
   }
}

If I understand this correctly:
"Int" is the library, "getFlag" is a new function, but it is clear what it does and INT_TIMER1 is the flag itself. I also saw several other interrupt flags.
Reply


Messages In This Thread
Accessing registers/interrupts - by Dobby_ - 29-03-2015, 04:10 PM
RE: Accessing registers/interrupts - by pingotg - 29-03-2015, 09:20 PM
RE: Accessing registers/interrupts - by Dobby_ - 30-03-2015, 07:44 PM
RE: Accessing registers/interrupts - by pingotg - 31-03-2015, 05:03 PM
RE: Accessing registers/interrupts - by moreno - 31-03-2015, 06:11 PM
RE: Accessing registers/interrupts - by Dobby_ - 31-03-2015, 08:15 PM
RE: Accessing registers/interrupts - by moreno - 31-03-2015, 09:33 PM
RE: Accessing registers/interrupts - by joel - 01-04-2015, 06:54 PM
RE: Accessing registers/interrupts - by Dobby_ - 01-04-2015, 10:03 PM
RE: Accessing registers/interrupts - by Dobby_ - 01-04-2015, 08:57 PM
RE: Accessing registers/interrupts - by joel - 02-04-2015, 10:42 AM
RE: Accessing registers/interrupts - by Dobby_ - 02-04-2015, 09:22 PM
RE: Accessing registers/interrupts - by pingotg - 02-04-2015, 10:15 PM
RE: Accessing registers/interrupts - by Dobby_ - 07-04-2015, 10:09 PM
RE: Accessing registers/interrupts - by Dobby_ - 25-05-2015, 11:38 AM
RE: Accessing registers/interrupts - by regis - 28-05-2015, 09:42 AM
RE: Accessing registers/interrupts - by Dobby_ - 30-05-2015, 12:31 PM
RE: Accessing registers/interrupts - by regis - 01-06-2015, 12:40 PM
RE: Accessing registers/interrupts - by Dobby_ - 04-06-2015, 08:42 AM
RE: Accessing registers/interrupts - by regis - 04-06-2015, 11:30 AM
RE: Accessing registers/interrupts - by Dobby_ - 04-06-2015, 06:09 PM
RE: Accessing registers/interrupts - by regis - 08-06-2015, 12:31 PM
RE: Accessing registers/interrupts - by Dobby_ - 13-06-2015, 05:55 PM
RE: Accessing registers/interrupts - by regis - 13-06-2015, 06:15 PM
RE: Accessing registers/interrupts - by Dobby_ - 13-06-2015, 09:59 PM
RE: Accessing registers/interrupts - by fpeixeiro - 29-09-2016, 04:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)