Is the INT_INT interupt the pin B0 interrupt? If so, does the interupt trigger on the falling or rising edge?
In the example I am working with I am using an 16F877a
Thanks
Is the INT_INT interupt the pin B0 interrupt? If so, does the interupt trigger on the falling or rising edge?
In the example I am working with I am using an 16F877a
Thanks
Yes, that's the pin.
By default, it interrupts on the Rising Edge. But it depends on the INTEDG bit in the OPTION_REG.
OPTION_REG.6 = 0 ' INT on Falling Edge
<br>
DT
So do I just put the register declaration right after the inlcude file definitions or do I need to imbed it in your files some how? I'm looking to triger based on a falling edge.
Thanks again
As long as you put it somewhere before the @ INT_ENABLE INT_INT you should be OK.
<br>
DT
So using your example I should put the option_reg declaration where I have it in your example below if I want the interupt to occur on the falling edge? I will try this tonight thanks alot!
Code:LED1 VAR PORTB.1 INCLUDE "DT_INTS-14.bas" ' Base Interrupt System INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts OPTION_REG.6 = 0 ' INT on Falling Edge ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler INT_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor INT_ENABLE INT_INT ; enable external (INT) interrupts ENDASM Main: PAUSE 1 GOTO Main '---[INT - interrupt handler]--------------------------------------------------- ToggleLED1: TOGGLE LED1 @ INT_RETURN
That should work.
Just be sure to indent the INT_CREATE and INT_ENABLE lines. You'll get an error if they are in column 1.
<br>
DT
Well it seems i got to a dead end, i have most of my work done but now i am out of RAM in my 16f877A, i now HAVE TO migrate to 18f452, so i will have to do it on assembler which i really dont now very well.
I am using portb, timer0 and RX interrupts.
I made it to work the timer int once in this device but i have never used multiple interrupts on it, what has to be done? check flags to see which was the last interrupt? (i dont know ASM), if so, should i manage the interrupt at once or send it to other independent subroutines.
I really am close to cry, all my work and happy moments with this Instant interrupt system seem to come to an end, even more all the work done seems to be useless.
Please help me.
Bookmarks