Instant Interrupts Questions
Hi!!
This was a great piece of code, I tried both the elapsed timer and the multiple interrupt code, both worked perfectly!!! GREAT POST!!
But i couldnt find any info in using the other interrupts, how much do i have to configure to use them, i am trying to use USART RX_INT but it dont seems to work for me, my code (Darrel´s? :D):
Code:
LED1 VAR PORTB.1
INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler RX_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
@ INT_ENABLE RX_INT ; enable Timer 1 interrupts
Main:
PAUSE 1
GOTO Main
ToggleLED1:
TOGGLE LED1
@ INT_RETURN
Thanks for any HELP
Some more Great questions
Hi, i spent the last couple of days with a program that uses 6 interruptions, i am glad to say that everything works fine until now. I am using RX, TX, Timer0, Timer1, INT and portB interrupts. I REALLY DONT KNOW HOW I MADE IT BEFORE THIS STUFF!!.
I didn´t wanted to start a new post so i will use this conversation and all your knowledge and disposition with me to move on the questions.
1. How do you disable/reenable an interrupt? i mean in this system and to avoid using registers.
2. Is there any constrain about the handlers lenght? i am using a very large RX handler that seems to work by now, is it better to go to subroutines from the handler to come back later and make the codespace of the handler small?
3. Out of topic but really interesting to me, how can i work with an array? for example an 8 rows x 10 bytes array? is there any way in pbp (i have read the manual but there is nothing about it).
4. How can i avoid filling my memory program with LCDOUT sentences? they seem to be very consuming... :p
5. What is the difficulty about using this system in 18f452 like devices, i recall using interrupts in them and it was much more easier than in the 877.
6. To many questions? :D cause i got one more.. also offtopic
7. I am using a matrix keyboard with portbchange interruption, but i am losing time (missing the tmr1 int) while i wait for the user to release at the kb, any other great piece of code you have under your pillow to help me solve this?.
By the way i could solve the issue with the 628, you will have to make a MANUAL for this :D, maybe i can end up doing it for you
Thanks a loTTTT
You can buy a ferrari also for the looks :D !!
Hi Darrel, i certainly agree with your idea of using interrupts priority, but for the moment i would really find useful this system in 18F devices as i need for example more code (32K) or even the USB port.
My 16f877 is full even with the method of storing strings in the code space.
By the way, i am also looking to make my project to PRINT in a standard ASCII characters printer, can you give me any advice?, an easy link?. Thanks!!.
But what about code space?
That is my other problem already, i have a 16k words code already, thanks for your concern but your code is much, much, much larger!.
I will have to do it with asm although i have no idea of how to do it yet, does anyone have good and simple example ofmultiple interrupt handling?.
Waiting for 18x version of DT-INTXX.bas
Tx in ADVANCE