Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:35 12 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite Plus GUI Interrupts

Author Message
carlm
Newbie

Joined: 31/05/2018
Location: Australia
Posts: 10
Posted: 11:37am 27 May 2019
Copy link to clipboard 
Print this post

Hi all,
I have Button GUI that makes a variable = 1 and then calls a Sub Routine (Collecting Pulses)
This works as expected but locks up because there is nothing to break the do while.
I wish to use a second GUI button to make my iCalibratingOccurring = 0.
The do while condition will not be true and then the SR will be exited.

sub CollectingPulses
do while iCalibratingOccurring = 1
pause (1000)
iPulses = iPulses + 1
ctrlval(dCalibratePulses) = str$(ipulses)

loop
end sub

I have found the following that when edited can use pins as an interrupt.
SETPIN pin, type, subroutine
I have tried a couple of alterations to make it work but with no such luck yet.

Thanks in advance.
Carl


 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10572
Posted: 11:54am 27 May 2019
Copy link to clipboard 
Print this post

You are sitting in an interrupt routine waiting for an interrupt. That can't work as the second interrupt can't be serviced until the first one exits. Use flags in the interrupt routines and put the wait logic in the main program
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025