![]() |
enable interrupt
I am trying to use an encoder and want to use interrupts, but I cannot figure out how to enable them! :confused: How do you enable interrupts? I have it programmed, just not enabled! :o
|
Re: enable interrupt
You need to call "Initialize_Interrupts();"..
...which is called in user_routines.c under function "void User_Initialization (void)" (at least in my teams code it works there) |
Re: enable interrupt
Quote:
If you want to just turn on the interrupts without having to go through that, then you'll have something like this in User_Initialization() (Or somewhere are there. You just have to do this before the interrupts are on) I just copied this from the function in Watson's code which was referred to earlier, with one change (in bold) which actually enables the interrupt. Kevin's code just sets it up. Code:
TRISBbits.TRISB2 = 1; // make sure the RB2/INT2 pin is configured as an input [108] |
| All times are GMT -5. The time now is 03:55. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi