|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Interrupt Gear Tooth Sensors
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/sh...ad.php?t=61242 . Unfortunately, as soon as we type in:
Code:
/* 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 */ Last edited by NinJA999 : 04-02-2008 at 19:42. |
|
#2
|
|||||
|
|||||
|
Re: Interrupt Gear Tooth Sensors
Is that the only definition of InterruptHandlerLow() in user_routines_fast.c or is what you posted only part of it? It may be a good idea to post the code from the entire file to be safe.
|
|
#3
|
||||
|
||||
|
Re: Interrupt Gear Tooth Sensors
Are you using the default code and MPLab 7.2? There is an error that one of the variables is defined wrong in C:\MCC18\include\p18f8722.h (or whatever your directory is) I think it is one of the priority bits, look in that file for both and make sure its correct. Kevin has the corrected one in his encoder code if you take a look at that. Or you may be getting something from annother line?
|
|
#4
|
||||
|
||||
|
Re: Interrupt Gear Tooth Sensors
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| gear tooth sensors purchasing | wedellm | Motors | 5 | 07-02-2007 20:50 |
| Gear tooth sensors - Forward or backward? | Tom Line | Programming | 6 | 30-01-2007 09:19 |
| where can we buy hall effect sensors or gear tooth sensors | amirjpl | Electrical | 3 | 13-02-2006 11:02 |
| Gear Tooth Sensors | et1337 | Electrical | 7 | 28-01-2006 22:48 |
| Accelerometer vs Gear Tooth Sensors | zdeswarte | Electrical | 4 | 22-01-2005 15:35 |