next up previous contents index
Next: 4.5.4 Linking and assembling Up: 4.5 The PIC14 port Previous: 4.5.2 Creating a device   Contents   Index

4.5.3 Interrupt code

For the interrupt function, use the keyword 'interrupt' with level number of 0 (PIC14 only has 1 interrupt so this number is only there to avoid a syntax error - it ought to be fixed). E.g.:

void Intr(void) interrupt 0 
{ 
  T0IF = 0; /* Clear timer interrupt */ 
}



2007-09-27