[bascom] INT0 causes RESET ?
Apparently this got lost the first time I sent it. Apologies if it's a dupe.
> I'm having trouble understanding interrupts. It appears that when the
> interrupt service routine for INT0 is called, the whole program is started
> over at the beginning.
>
> For example, this program:
>
> Config Pind.2 = Input
> Portd.2 = 1
>
> Config Int0 = Falling
> On Int0 Int0_isr
>
> Print "Ready"
>
> Do
> ' wait
> Loop
>
> Int0_isr:
> Print "*";
> Return
>
> with a pushbutton connected to pind.2 produces this output (sporadically):
> Ready
> **Ready
> *Ready
> *Ready
>
> *Ready
> *Ready
> *Ready
>
> My thinking is it should sit in the DO...LOOP until INT0 falls, jump to
> Int0_isr, then return back into the DO...LOOP.
> Obviously I must be missing something. Can anyone help?
>
> Thanks,
> JJ
> Be Kind, Be Careful, Be Yourself
> --
> Solid, reliable software at reasonable prices
> http://www.johnjohnsonsoftware.com
>
>