Buenas tardes compañeros.
tengo una duda ya que no he podido dar solucion al siguiente problema.
Lo que quiero es hacer la funcion de interrupcion con el compilador XC8 que se active cuando se desborde el Timer 0 del uC, estoy usando un PIC18F2550 y tengo el siguietne codigo: (solo es una practica del TIMER0)
********************************************
#include <xc.h>
#include <stdio.h>
#include "config.h"
void interrupt interrupcion(void){
LATAbits.LA0=!PORTAbits.RA0;
INTCONbits.T0IF=0;
return 0;
}
void main(void) {
//OSCILADOR
OSCCONbits.IDLEN=0; //modo IDLE
OSCCONbits.IRCF=0b111; //freq 8MHz
OSCCONbits.SCS=0b10; //oscilador interno
//I/O
ADCON1bits.PCFG=0b1111; //todos los pines digitales
TRISAbits.TRISA0=0; //RA0 out
LATAbits.LA0=1; //LED apagado
//INTERRUPCIONES
RCONbits.IPEN=0; //sin prioridad de interrupcion
INTCONbits.GIE=1; //habilita interrupciones no mascarables
INTCONbits.T0IF=0;
INTCONbits.T0IE=1; //habilita int TMR0
//TIMER 0
T0CONbits.T08BIT=0; //16bit
T0CONbits.T0CS=0; //fuente del oscilador interno
T0CONbits.PSA=0; //prescaler asignado
T0CONbits.T0PS=0b100; //1:32
T0CONbits.TMR0ON=1; //encendido de es
while(1){
}
return;
}
********************************************
El problema es que al copilar me sale error y me dice esto:
main.c:5:6: error: variable has incomplete type 'void'
void interrupt interrupcion(void){
^
main.c:5:15: error: expected ';' after top level declarator
void interrupt interrupcion(void){
^
;
pero no he podido corregir el error

y la verdad no lo encuentro, agradeceria mucho la ayuda para solucionar este problema
De ante mano muchas gracias.
Saludos
