Gooood Day
I was connect Buzzer to B7 (pic16f877a )
so
I was connect pushbutton to D1 (as normal open pointes in sensor )
when
pushbutton is on -----> feed D1 with 0 ------> Buzzer Run
so
{ I using int B0 for Mute Buzzer(INT-interruption ) };
so
{ I was use Delay(10s )-----> for test the Mute Buzzer by interruption };
how
{ can I stop the interruption at once When removing the BUZZER cause
How STOP int- interruption At some point
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: How STOP int- interruption At some point
Hello,
If your using a fixed delay then you can't really stop half way through even using an interrupt, unless you reset the chip or midify the program counter you will still be inside the delay when you leave the interrupt.
Instead of using a 10 second delay why not loop 100 times using a while icon and a 100ms delay. This way you can do additional checks in the loop to allow you to bail out early if needed.
If your using a fixed delay then you can't really stop half way through even using an interrupt, unless you reset the chip or midify the program counter you will still be inside the delay when you leave the interrupt.
Instead of using a 10 second delay why not loop 100 times using a while icon and a 100ms delay. This way you can do additional checks in the loop to allow you to bail out early if needed.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel