NinJA999
04-02-2008, 19:34
Our team is working on using the geartooth sensors integrated with the AndyMark 2-speed transmissions. We are going to go with an interrupt-driven system using the code from http://www.chiefdelphi.com/forums/showthread.php?t=61242 . Unfortunately, as soon as we type in:
/* Initialize INT2 for pulse counting. INT2 is rc_dig_in01 */
INTCON3bits.INT2IE = 1; //enable INT2
INTCON3bits.INT2IP = 0; //set INT2 to low priority
INTCON2bits.INTEDG2 = 1; //rising edge
/* Initialize INT3 for pulse counting INT3 is rc_dig_in02*/
INTCON3bits.INT3IE = 1; //enable INT3
INTCON2bits.INT3IP = 0; //set INT3 to low priority
INTCON2bits.INTEDG3 = 1; //rising edge
INTCONbits.GIEL = 1; /* Enable Global Low Priority Interrupts */
into the user_routines_fast.c, MPLAB tells us that the first line (after the comment) is a syntax error. Nobody else seems to be having this problem. Is there something we may be doing wrong?
/* Initialize INT2 for pulse counting. INT2 is rc_dig_in01 */
INTCON3bits.INT2IE = 1; //enable INT2
INTCON3bits.INT2IP = 0; //set INT2 to low priority
INTCON2bits.INTEDG2 = 1; //rising edge
/* Initialize INT3 for pulse counting INT3 is rc_dig_in02*/
INTCON3bits.INT3IE = 1; //enable INT3
INTCON2bits.INT3IP = 0; //set INT3 to low priority
INTCON2bits.INTEDG3 = 1; //rising edge
INTCONbits.GIEL = 1; /* Enable Global Low Priority Interrupts */
into the user_routines_fast.c, MPLAB tells us that the first line (after the comment) is a syntax error. Nobody else seems to be having this problem. Is there something we may be doing wrong?