Re: [bascom] INT0 causes RESET ?


From Michael Wieser <m.k.w@nextra.at>
Date Sun, 17 Dec 2000 01:32:23 +0100

Hi 

Interrupts are always around.... so disable them asap when an interrupt
happens (at least this is how I do with Bascom51 in interrupt driven code)
One Bascomstatement doesn`t mean that there is only one assemblerstatmant
doing this, so
things like fast interrupts make it easy loosing control very fast.

Your results (**ready) maybe shows that the stack is max. used twice, so
it`s coming back to normal operation (luck?). What makes me wondering a
little bit is that the READY doesn`t look like REA*D*Y, seems like that
Bascom disables the interupts during this time?

Anyway,
Good night, I`m closing for today.


>----- Original Message -----
>From: "Michael Wieser" <m.k.w@nextra.at>
>To: <bascom@grote.net>
>Sent: Saturday, December 16, 2000 12:46 PM
>Subject: Re: [bascom] INT0 causes RESET ?
>
>
>> >Apparently this got lost the first time I sent it. Apologies if it's a
>dupe.
>>
>> Apologied,  (at least from my point of view)
>> but no apologies for no info which bascom (avr, 51) or compilerrelease nor
>> info about the CPU, Spped of the CPU and other stuff..... (discussed only
>> some days ago here on the list !! )
>
>True. I forgot this is a BASCOM list, and not a BASCOM-AVR list. So:
>
>AT90S2313-10PI (i.e. AVR) clocked at 4 MHz
>
>BASCOM-AVR IDE Version : 1.11.0.0
>Compiler: Version 1.11a
>Serial : Serial  DEMO
>
>> anyway, it seems that your push button does bounce(?) and the cpu is very
>> fast, so it "sees" this bouncing as 2 independent keystrokes, try  to
>> debounce the keys.
>
>Sounds feasible, except:
>I'm not using the DEBOUNCE instruction.
>When in the interrupt service routine (ISR) there are two possible
>scenarios. If another interrupt is ignored while in the ISR, it would not
>cause the problem. Another possibility is an interrupt causing another jump
>to the ISR while already in the ISR. This could in theory blow the stack if
>too many interrupts occured. I don't believe this to be the case since the
>problem occurs with an IR sensor connected to the pin (which doesn't
>bounce). Should I explicity turn off interrupts (or this interrupt) at the
>start of the ISR, then re-enable at the end? Think I'll try that.
>
>Thanks for the reply and the reminder.
>
>Regards,
>  JJ
>
>
>
>

Michael Wieser
m.k.w@nextra.at

Service and Audiodesign