Okay, I've been looking at Daryl Taylors interrupt programs as recommended by Steve. I downloaded everything and tested the blinky blinky to make sure it worked. I changed the toggle pin to one on my board with an LED and it worked.
Now I'm trying to figure out how to incorporate this into my program and what terms I can change and what I can't and where it needs to be placed in the program. I don't have anything called a "main" loop for example.
So for example with this sample code:
I understand that the "include" statements go at the top when declaring stuff but I'm not sure where to put the "ASM" sectionCode:LED1 VAR PORTB.1 INCLUDE "DT_INTS-18.bas" ; Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler INT_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM @ INT_ENABLE INT_INT ; enable external (INT) interrupts Main: PAUSE 1 GOTO Main '---[INT - interrupt handler]--------------------------------------------------- ToggleLED1: TOGGLE LED1 @ INT_RETURN
and the "INT" Interrupt handler commands
I tried a couple things and the blinky blinky always worked but I never got my part of the program to run so it seemed to only stay in the above portion.
Getting closer, I can smell it, but I can't quite see it or taste it.
Thank you,
Hylan




Bookmarks