Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | Basic interrupt behaviour.

Discussion forum for the BasicX family of microcontroller chips.

Basic interrupt behaviour. - Alex Chaihorsky - Oct 11 12:18:00 2002

Dear guys,

I never worked with BX-24 HW interrupts before and have not found a
clear explanation in BX docs of how it work. The "Counting pulses
with hw interrupt" example is unfortunately single-task and it is not
clear how that will affect the multi-task setup.

My two questions are:
1. If I have two tasks - one is a PID temperature controller that has
to run all the time and another task runs rarely and should only
start if I press a button momentarily.

If I issue a WaitForInterrupt command from the second task, will it
stop the first one and just sit and wait for the interrupt (pin 11,
right?) or will it allow the first task to run while waiting for an
interrupt?

2. Is it really worth it to play with interrupts as opposed to just
having a small task that polls the pin?

Thanks a million.

Alex.





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Basic interrupt behaviour. - Tony Brenke - Oct 11 12:48:00 2002

the whait for interupt wil only stop the task that it is in.
it will not delay the others.

I do use it.

--- Alex Chaihorsky <> wrote:
> Dear guys,
>
> I never worked with BX-24 HW interrupts before and have not found a
> clear explanation in BX docs of how it work. The "Counting pulses
> with hw interrupt" example is unfortunately single-task and it is not
> clear how that will affect the multi-task setup.
>
> My two questions are:
> 1. If I have two tasks - one is a PID temperature controller that has
> to run all the time and another task runs rarely and should only
> start if I press a button momentarily.
>
> If I issue a WaitForInterrupt command from the second task, will it
> stop the first one and just sit and wait for the interrupt (pin 11,
> right?) or will it allow the first task to run while waiting for an
> interrupt?
>
> 2. Is it really worth it to play with interrupts as opposed to just
> having a small task that polls the pin?
>
> Thanks a million.
>
> Alex. >
>

__________________________________________________






(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Basic interrupt behaviour. - Alex Chaihorsky - Oct 11 13:15:00 2002

Thanks, Tony -

Do I have to worry about any interference between the interrupt stuff
with say PWM or Com1 stuff?

Thanks a lot.

AC. --- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> the whait for interupt wil only stop the task that it is in.
> it will not delay the others.
>
> I do use it.
>
> --- Alex Chaihorsky <alex_chaihorsky@h...> wrote:
> > Dear guys,
> >
> > I never worked with BX-24 HW interrupts before and have not found
a
> > clear explanation in BX docs of how it work. The "Counting pulses
> > with hw interrupt" example is unfortunately single-task and it is
not
> > clear how that will affect the multi-task setup.
> >
> > My two questions are:
> > 1. If I have two tasks - one is a PID temperature controller that
has
> > to run all the time and another task runs rarely and should only
> > start if I press a button momentarily.
> >
> > If I issue a WaitForInterrupt command from the second task, will
it
> > stop the first one and just sit and wait for the interrupt (pin
11,
> > right?) or will it allow the first task to run while waiting for
an
> > interrupt?
> >
> > 2. Is it really worth it to play with interrupts as opposed to
just
> > having a small task that polls the pin?
> >
> > Thanks a million.
> >
> > Alex.
> >
> >
> >
> >
> >
> >
> >
> >
> > __________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Re: Basic interrupt behaviour. - Tony Brenke - Oct 11 19:17:00 2002

no worry if those are on another task.

--- Alex Chaihorsky <> wrote:
> Thanks, Tony -
>
> Do I have to worry about any interference between the interrupt stuff
> with say PWM or Com1 stuff?
>
> Thanks a lot.
>
> AC. > --- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> > the whait for interupt wil only stop the task that it is in.
> > it will not delay the others.
> >
> > I do use it.
> >
> > --- Alex Chaihorsky <alex_chaihorsky@h...> wrote:
> > > Dear guys,
> > >
> > > I never worked with BX-24 HW interrupts before and have not found
> a
> > > clear explanation in BX docs of how it work. The "Counting pulses
> > > with hw interrupt" example is unfortunately single-task and it is
> not
> > > clear how that will affect the multi-task setup.
> > >
> > > My two questions are:
> > > 1. If I have two tasks - one is a PID temperature controller that
> has
> > > to run all the time and another task runs rarely and should only
> > > start if I press a button momentarily.
> > >
> > > If I issue a WaitForInterrupt command from the second task, will
> it
> > > stop the first one and just sit and wait for the interrupt (pin
> 11,
> > > right?) or will it allow the first task to run while waiting for
> an
> > > interrupt?
> > >
> > > 2. Is it really worth it to play with interrupts as opposed to
> just
> > > having a small task that polls the pin?
> > >
> > > Thanks a million.
> > >
> > > Alex.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> >
>
>

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Basic interrupt behaviour. - Stan Cossette - Oct 14 12:13:00 2002

--- In basicx@y..., "Alex Chaihorsky" <alex_chaihorsky@h...> wrote:

> I never worked with BX-24 HW interrupts before and have not found a
> clear explanation in BX docs of how it work.

You might try a search on "interrupt" in this group. I asked similar
questions a while back and got some more useful info. > 2. Is it really worth it to play with interrupts as opposed to just
> having a small task that polls the pin?

I generally use tasks to poll the pin with good sucess. Unless the
2ms per task wait is too much for you.

Stan




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )