Shop OBEX P1 Docs P2 Docs Learn Events
Can a single stamp BS2 module perform muliple tasks? — Parallax Forums

Can a single stamp BS2 module perform muliple tasks?

ArchiverArchiver Posts: 46,084
edited 2002-10-18 20:05 in General Discussion
Greetings,

I'm new to the group and have read about the Stamp modules but never
used them. I've got an application that requires a controller that
can perform several tasks (measure temp and pressure, perform some
calculations on the data, feed the results to a display, save the
data and recall the data). I realize that I/O could be a limiting
factor but don't know if the Stamp can multitask. Does anyone have an
answer?

William

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-10-14 13:12
    Hello,
    Multitasking is not a matter of the processor (in this case the PIC
    microcontroller that the BS2 has inside). In fact, it's a matter of
    software, all depends on your hability to program. Your desktop computer
    processor (perhaps a P4 2GHz) it's not prepared to execute multiple tasks at
    the same time. But your Operating System (i.e. Windows 2000) can do
    something similar to a "multitask". How? For example:
    You have three applications (Explorer, Word and Winamp), so the OS
    execute a bit of code of the first app. then a bit of code of the second
    app. and the a bit of code of the third app. then repeat this rutine, up to
    one app doesn't something to do, so the SO doesn't use cycles of the CPU to
    this app.
    The key is time. It's like the cinema, if you see 15 pictures in a
    second, you can think that what it's in the picture is moving. If you can
    execute a piece of code of one app. in a short time, then a piece of code of
    another app. in a short time, and repeat this rutine. You can think that
    your Basic Stamp is doing multitasking.
    This is just the base, then you have other modes of multitasking
    more complicated. Microchip at their web site has some app. notes on
    multitasking with PIC, take a look at that.
    And of course you can make multitasking with your stamp, as I do
    with my BS2.

    Ezequiel Aceto,
    Buenos Aires, Argentina


    Original Message
    From: "Trygve Henriksen" <trygve.henriksen@v...>
    To: <basicstamps@yahoogroups.com>
    Sent: Monday, October 14, 2002 8:12 AM
    Subject: SV: [noparse][[/noparse]basicstamps] Can a single stamp BS2 module perform muliple
    tasks?


    > Greetings!
    >
    > > I'm new to the group and have read about the Stamp modules but never
    > > used them. I've got an application that requires a controller that
    > > can perform several tasks (measure temp and pressure, perform some
    > > calculations on the data, feed the results to a display, save the
    > > data and recall the data). I realize that I/O could be a limiting
    > > factor but don't know if the Stamp can multitask. Does anyone have an
    > > answer?
    >
    > No, a BS2 can't multitask.
    > That's not to say that it can't be used for whatever you want, though.
    > You just have to be very careful about how you do it.
    > (Short loops and stuff)
    >
    > :-)
    > Trygve
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-14 14:37
    What you describe is not multi-tasking. it is just what we do all
    the time.

    measure temp for example. temp is read from a remote device of some
    sort. then fed back to the Stamp. the temp is an analogue signal so
    it comes to an analogue to digital converter (ADC)

    the ADC outputs a digital value.
    the stamp reads the ditital value.
    multipies
    divides,
    smooths
    compares
    reads another deivce, pressure ?
    displays......

    for avation, there are a few on here that take temperature and
    pressure readings to determine density altitude of the model planes.

    All you have to do is list your operations in a continuous string of
    smaller operations so that the output of one can feed the next.
    then groups of operations, say reading a pressure signal and scaling
    it for something useful, THEN reading a temperature signal and
    scaling IT to something useful, then combiing those answers to get a
    value you want.
    you can output any part to your display too, or have a button to
    select what part you want to dispaly or change the display
    periodically.

    Realize that all mircroporcessors do not multi-task, but the time
    slice between operations gets smaller with faster micros.

    The term 'Real Time' is defined something like "faster than the
    process requires" Temperature does not change fast, so reading it
    every minute or so can be 'real time' pressure changes at the speed
    of sound and electricity at the speed of light.

    Hope that helps.

    Dave
    (stealth mode re-activated)






    --- In basicstamps@y..., "Blue eyes" <wm_tell1@y...> wrote:
    > Greetings,
    >
    > I'm new to the group and have read about the Stamp modules but
    never
    > used them. I've got an application that requires a controller that
    > can perform several tasks (measure temp and pressure, perform some
    > calculations on the data, feed the results to a display, save the
    > data and recall the data). I realize that I/O could be a limiting
    > factor but don't know if the Stamp can multitask. Does anyone have
    an
    > answer?
    >
    > William
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-14 16:13
    Hello,
    I think you didn't understand me (Could it be because I don't speak
    english frecuently). For example, supouse you comunicate with two devices,
    one is serial RS232 and the other one is SPI. The SPI device send 32bits,
    and the RS232 sends 2 bytes. supouse the serial RS232 device needs more
    priority than the SPI. So you can make the communication with the SPI and
    receive bit by bit, between each bit, you need to check if the RS232 device
    needs "attention". If it needs attention, make a little stop in the SPI comm
    and receive the 2 bytes from the RS232 device, when you received this two
    bytes, you continue with you SPI communication. In a way it's multitasking
    using IRQ (Interrupt Request). What do you think of multitasking? This is
    the way your PC works, and you microcontroller is a little PC. There is no
    processor that can do two task at the "same" time. And the conpect of
    "PIPELINE" it's not true multitasking. If you want real multitasking at
    hardware level you need two CPU. Eventhough one will be Master and the other
    one Slave. But in Software, you make multitasking the way I show you. One
    thing is to start a task, finish it and start another one. Another thing is
    to start one task, start a second task and then distribute this two tasks in
    processors cycles. The second one is multitasking, the first one it's what
    you do every day. Perhaps you don't see it as multitasking because "the
    Stamp is slow", but try to do something similar with you PC.

    Ezequiel Aceto
    Buenos Aires, Argentina


    Original Message
    From: "Dave Mucha" <davemucha@j...>
    To: <basicstamps@yahoogroups.com>
    Sent: Monday, October 14, 2002 10:37 AM
    Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform muliple
    tasks?


    > What you describe is not multi-tasking. it is just what we do all
    > the time.
    >
    > measure temp for example. temp is read from a remote device of some
    > sort. then fed back to the Stamp. the temp is an analogue signal so
    > it comes to an analogue to digital converter (ADC)
    >
    > the ADC outputs a digital value.
    > the stamp reads the ditital value.
    > multipies
    > divides,
    > smooths
    > compares
    > reads another deivce, pressure ?
    > displays......
    >
    > for avation, there are a few on here that take temperature and
    > pressure readings to determine density altitude of the model planes.
    >
    > All you have to do is list your operations in a continuous string of
    > smaller operations so that the output of one can feed the next.
    > then groups of operations, say reading a pressure signal and scaling
    > it for something useful, THEN reading a temperature signal and
    > scaling IT to something useful, then combiing those answers to get a
    > value you want.
    > you can output any part to your display too, or have a button to
    > select what part you want to dispaly or change the display
    > periodically.
    >
    > Realize that all mircroporcessors do not multi-task, but the time
    > slice between operations gets smaller with faster micros.
    >
    > The term 'Real Time' is defined something like "faster than the
    > process requires" Temperature does not change fast, so reading it
    > every minute or so can be 'real time' pressure changes at the speed
    > of sound and electricity at the speed of light.
    >
    > Hope that helps.
    >
    > Dave
    > (stealth mode re-activated)
    >
    >
    >
    >
    >
    >
    > --- In basicstamps@y..., "Blue eyes" <wm_tell1@y...> wrote:
    > > Greetings,
    > >
    > > I'm new to the group and have read about the Stamp modules but
    > never
    > > used them. I've got an application that requires a controller that
    > > can perform several tasks (measure temp and pressure, perform some
    > > calculations on the data, feed the results to a display, save the
    > > data and recall the data). I realize that I/O could be a limiting
    > > factor but don't know if the Stamp can multitask. Does anyone have
    > an
    > > answer?
    > >
    > > William
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-16 13:54
    Hi Ezequiel,

    You are correct that a pipeline is a better term for how a processor
    works, and that you need two processors to do real multi-tasking.

    regarding the Stamp, there are no interupts on a Stamp. you might
    need to find a different processor for that.

    I would think that the SPI communication for a single task would only
    take a few clock cycles and before and after a connection, you could
    test to see if there is a serial request.

    As you mentioned my desktop does only one process at a time, although
    it does them really fast (compared to my old computer) that
    it 'seems' like it is multi-tasking. Actually since I use Win-Doz it
    doesn't seem like multi-tasking, but more like multi-waiting.

    regarding speed, it is obvious that the faster the chip speed, the
    less impact or slow down the wait would be between tasks.

    If you attempted to add software interupts in a task, the speed would
    drop considderably. I would think that there would be a better way
    to do that.

    Dave







    --- In basicstamps@y..., "Ezequiel Leonardo Aceto" <Nik@i...> wrote:
    > Hello,
    > I think you didn't understand me (Could it be because I
    don't speak
    > english frecuently). For example, supouse you comunicate with two
    devices,
    > one is serial RS232 and the other one is SPI. The SPI device send
    32bits,
    > and the RS232 sends 2 bytes. supouse the serial RS232 device needs
    more
    > priority than the SPI. So you can make the communication with the
    SPI and
    > receive bit by bit, between each bit, you need to check if the
    RS232 device
    > needs "attention". If it needs attention, make a little stop in the
    SPI comm
    > and receive the 2 bytes from the RS232 device, when you received
    this two
    > bytes, you continue with you SPI communication. In a way it's
    multitasking
    > using IRQ (Interrupt Request). What do you think of multitasking?
    This is
    > the way your PC works, and you microcontroller is a little PC.
    There is no
    > processor that can do two task at the "same" time. And the conpect
    of
    > "PIPELINE" it's not true multitasking. If you want real
    multitasking at
    > hardware level you need two CPU. Eventhough one will be Master and
    the other
    > one Slave. But in Software, you make multitasking the way I show
    you. One
    > thing is to start a task, finish it and start another one. Another
    thing is
    > to start one task, start a second task and then distribute this two
    tasks in
    > processors cycles. The second one is multitasking, the first one
    it's what
    > you do every day. Perhaps you don't see it as multitasking
    because "the
    > Stamp is slow", but try to do something similar with you PC.
    >
    > Ezequiel Aceto
    > Buenos Aires, Argentina
    >
    >
    >
    Original Message
    > From: "Dave Mucha" <davemucha@j...>
    > To: <basicstamps@y...>
    > Sent: Monday, October 14, 2002 10:37 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform
    muliple
    > tasks?
    >
    >
    > > What you describe is not multi-tasking. it is just what we do all
    > > the time.
    > >
    > > measure temp for example. temp is read from a remote device of
    some
    > > sort. then fed back to the Stamp. the temp is an analogue
    signal so
    > > it comes to an analogue to digital converter (ADC)
    > >
    > > the ADC outputs a digital value.
    > > the stamp reads the ditital value.
    > > multipies
    > > divides,
    > > smooths
    > > compares
    > > reads another deivce, pressure ?
    > > displays......
    > >
    > > for avation, there are a few on here that take temperature and
    > > pressure readings to determine density altitude of the model
    planes.
    > >
    > > All you have to do is list your operations in a continuous string
    of
    > > smaller operations so that the output of one can feed the next.
    > > then groups of operations, say reading a pressure signal and
    scaling
    > > it for something useful, THEN reading a temperature signal and
    > > scaling IT to something useful, then combiing those answers to
    get a
    > > value you want.
    > > you can output any part to your display too, or have a button to
    > > select what part you want to dispaly or change the display
    > > periodically.
    > >
    > > Realize that all mircroporcessors do not multi-task, but the time
    > > slice between operations gets smaller with faster micros.
    > >
    > > The term 'Real Time' is defined something like "faster than the
    > > process requires" Temperature does not change fast, so reading it
    > > every minute or so can be 'real time' pressure changes at the
    speed
    > > of sound and electricity at the speed of light.
    > >
    > > Hope that helps.
    > >
    > > Dave
    > > (stealth mode re-activated)
    > >
    > >
    > >
    > >
    > >
    > >
    > > --- In basicstamps@y..., "Blue eyes" <wm_tell1@y...> wrote:
    > > > Greetings,
    > > >
    > > > I'm new to the group and have read about the Stamp modules but
    > > never
    > > > used them. I've got an application that requires a controller
    that
    > > > can perform several tasks (measure temp and pressure, perform
    some
    > > > calculations on the data, feed the results to a display, save
    the
    > > > data and recall the data). I realize that I/O could be a
    limiting
    > > > factor but don't know if the Stamp can multitask. Does anyone
    have
    > > an
    > > > answer?
    > > >
    > > > William
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@y...
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-16 17:38
    Hello Dave,
    Eventhough the Stamp doesn't have an interrupt, you can
    "simulate" one. Just include between each line of your code and IF..Then
    structure asking for the state of a pin. It'll consume code, but you have a
    kind of interrupt.

    Ezequiel
    Original Message
    From: "Dave Mucha" <davemucha@j...>
    To: <basicstamps@yahoogroups.com>
    Sent: Wednesday, October 16, 2002 9:54 AM
    Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform muliple
    tasks?


    > Hi Ezequiel,
    >
    > You are correct that a pipeline is a better term for how a processor
    > works, and that you need two processors to do real multi-tasking.
    >
    > regarding the Stamp, there are no interupts on a Stamp. you might
    > need to find a different processor for that.
    >
    > I would think that the SPI communication for a single task would only
    > take a few clock cycles and before and after a connection, you could
    > test to see if there is a serial request.
    >
    > As you mentioned my desktop does only one process at a time, although
    > it does them really fast (compared to my old computer) that
    > it 'seems' like it is multi-tasking. Actually since I use Win-Doz it
    > doesn't seem like multi-tasking, but more like multi-waiting.
    >
    > regarding speed, it is obvious that the faster the chip speed, the
    > less impact or slow down the wait would be between tasks.
    >
    > If you attempted to add software interupts in a task, the speed would
    > drop considderably. I would think that there would be a better way
    > to do that.
    >
    > Dave
    >
    >
    >
    >
    >
    >
    >
    > --- In basicstamps@y..., "Ezequiel Leonardo Aceto" <Nik@i...> wrote:
    > > Hello,
    > > I think you didn't understand me (Could it be because I
    > don't speak
    > > english frecuently). For example, supouse you comunicate with two
    > devices,
    > > one is serial RS232 and the other one is SPI. The SPI device send
    > 32bits,
    > > and the RS232 sends 2 bytes. supouse the serial RS232 device needs
    > more
    > > priority than the SPI. So you can make the communication with the
    > SPI and
    > > receive bit by bit, between each bit, you need to check if the
    > RS232 device
    > > needs "attention". If it needs attention, make a little stop in the
    > SPI comm
    > > and receive the 2 bytes from the RS232 device, when you received
    > this two
    > > bytes, you continue with you SPI communication. In a way it's
    > multitasking
    > > using IRQ (Interrupt Request). What do you think of multitasking?
    > This is
    > > the way your PC works, and you microcontroller is a little PC.
    > There is no
    > > processor that can do two task at the "same" time. And the conpect
    > of
    > > "PIPELINE" it's not true multitasking. If you want real
    > multitasking at
    > > hardware level you need two CPU. Eventhough one will be Master and
    > the other
    > > one Slave. But in Software, you make multitasking the way I show
    > you. One
    > > thing is to start a task, finish it and start another one. Another
    > thing is
    > > to start one task, start a second task and then distribute this two
    > tasks in
    > > processors cycles. The second one is multitasking, the first one
    > it's what
    > > you do every day. Perhaps you don't see it as multitasking
    > because "the
    > > Stamp is slow", but try to do something similar with you PC.
    > >
    > > Ezequiel Aceto
    > > Buenos Aires, Argentina
    > >
    > >
    > >
    Original Message
    > > From: "Dave Mucha" <davemucha@j...>
    > > To: <basicstamps@y...>
    > > Sent: Monday, October 14, 2002 10:37 AM
    > > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform
    > muliple
    > > tasks?
    > >
    > >
    > > > What you describe is not multi-tasking. it is just what we do all
    > > > the time.
    > > >
    > > > measure temp for example. temp is read from a remote device of
    > some
    > > > sort. then fed back to the Stamp. the temp is an analogue
    > signal so
    > > > it comes to an analogue to digital converter (ADC)
    > > >
    > > > the ADC outputs a digital value.
    > > > the stamp reads the ditital value.
    > > > multipies
    > > > divides,
    > > > smooths
    > > > compares
    > > > reads another deivce, pressure ?
    > > > displays......
    > > >
    > > > for avation, there are a few on here that take temperature and
    > > > pressure readings to determine density altitude of the model
    > planes.
    > > >
    > > > All you have to do is list your operations in a continuous string
    > of
    > > > smaller operations so that the output of one can feed the next.
    > > > then groups of operations, say reading a pressure signal and
    > scaling
    > > > it for something useful, THEN reading a temperature signal and
    > > > scaling IT to something useful, then combiing those answers to
    > get a
    > > > value you want.
    > > > you can output any part to your display too, or have a button to
    > > > select what part you want to dispaly or change the display
    > > > periodically.
    > > >
    > > > Realize that all mircroporcessors do not multi-task, but the time
    > > > slice between operations gets smaller with faster micros.
    > > >
    > > > The term 'Real Time' is defined something like "faster than the
    > > > process requires" Temperature does not change fast, so reading it
    > > > every minute or so can be 'real time' pressure changes at the
    > speed
    > > > of sound and electricity at the speed of light.
    > > >
    > > > Hope that helps.
    > > >
    > > > Dave
    > > > (stealth mode re-activated)
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > --- In basicstamps@y..., "Blue eyes" <wm_tell1@y...> wrote:
    > > > > Greetings,
    > > > >
    > > > > I'm new to the group and have read about the Stamp modules but
    > > > never
    > > > > used them. I've got an application that requires a controller
    > that
    > > > > can perform several tasks (measure temp and pressure, perform
    > some
    > > > > calculations on the data, feed the results to a display, save
    > the
    > > > > data and recall the data). I realize that I/O could be a
    > limiting
    > > > > factor but don't know if the Stamp can multitask. Does anyone
    > have
    > > > an
    > > > > answer?
    > > > >
    > > > > William
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@y...
    > > > from the same email address that you subscribed. Text in the
    > Subject and
    > > Body of the message will be ignored.
    > > >
    > > >
    > > > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    > > >
    > > >
    > > >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-16 18:38
    I dont remember offhand which one it is, but doesn't the 2p or the sx
    support interrupts?

    --- In basicstamps@y..., "Ezequiel Leonardo Aceto" <Nik@i...> wrote:
    > Hello Dave,
    > Eventhough the Stamp doesn't have an interrupt, you can
    > "simulate" one. Just include between each line of your code and
    IF..Then
    > structure asking for the state of a pin. It'll consume code, but
    you have a
    > kind of interrupt.
    >
    > Ezequiel
    >
    Original Message
    > From: "Dave Mucha" <davemucha@j...>
    > To: <basicstamps@y...>
    > Sent: Wednesday, October 16, 2002 9:54 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform
    muliple
    > tasks?
    >
    >
    > > Hi Ezequiel,
    > >
    > > You are correct that a pipeline is a better term for how a
    processor
    > > works, and that you need two processors to do real multi-tasking.
    > >
    > > regarding the Stamp, there are no interupts on a Stamp. you might
    > > need to find a different processor for that.
    > >
    > > I would think that the SPI communication for a single task would
    only
    > > take a few clock cycles and before and after a connection, you
    could
    > > test to see if there is a serial request.
    > >
    > > As you mentioned my desktop does only one process at a time,
    although
    > > it does them really fast (compared to my old computer) that
    > > it 'seems' like it is multi-tasking. Actually since I use Win-
    Doz it
    > > doesn't seem like multi-tasking, but more like multi-waiting.
    > >
    > > regarding speed, it is obvious that the faster the chip speed, the
    > > less impact or slow down the wait would be between tasks.
    > >
    > > If you attempted to add software interupts in a task, the speed
    would
    > > drop considderably. I would think that there would be a better
    way
    > > to do that.
    > >
    > > Dave
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > --- In basicstamps@y..., "Ezequiel Leonardo Aceto" <Nik@i...>
    wrote:
    > > > Hello,
    > > > I think you didn't understand me (Could it be because I
    > > don't speak
    > > > english frecuently). For example, supouse you comunicate with
    two
    > > devices,
    > > > one is serial RS232 and the other one is SPI. The SPI device
    send
    > > 32bits,
    > > > and the RS232 sends 2 bytes. supouse the serial RS232 device
    needs
    > > more
    > > > priority than the SPI. So you can make the communication with
    the
    > > SPI and
    > > > receive bit by bit, between each bit, you need to check if the
    > > RS232 device
    > > > needs "attention". If it needs attention, make a little stop in
    the
    > > SPI comm
    > > > and receive the 2 bytes from the RS232 device, when you received
    > > this two
    > > > bytes, you continue with you SPI communication. In a way it's
    > > multitasking
    > > > using IRQ (Interrupt Request). What do you think of
    multitasking?
    > > This is
    > > > the way your PC works, and you microcontroller is a little PC.
    > > There is no
    > > > processor that can do two task at the "same" time. And the
    conpect
    > > of
    > > > "PIPELINE" it's not true multitasking. If you want real
    > > multitasking at
    > > > hardware level you need two CPU. Eventhough one will be Master
    and
    > > the other
    > > > one Slave. But in Software, you make multitasking the way I show
    > > you. One
    > > > thing is to start a task, finish it and start another one.
    Another
    > > thing is
    > > > to start one task, start a second task and then distribute this
    two
    > > tasks in
    > > > processors cycles. The second one is multitasking, the first one
    > > it's what
    > > > you do every day. Perhaps you don't see it as multitasking
    > > because "the
    > > > Stamp is slow", but try to do something similar with you PC.
    > > >
    > > > Ezequiel Aceto
    > > > Buenos Aires, Argentina
    > > >
    > > >
    > > >
    Original Message
    > > > From: "Dave Mucha" <davemucha@j...>
    > > > To: <basicstamps@y...>
    > > > Sent: Monday, October 14, 2002 10:37 AM
    > > > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform
    > > muliple
    > > > tasks?
    > > >
    > > >
    > > > > What you describe is not multi-tasking. it is just what we
    do all
    > > > > the time.
    > > > >
    > > > > measure temp for example. temp is read from a remote device
    of
    > > some
    > > > > sort. then fed back to the Stamp. the temp is an analogue
    > > signal so
    > > > > it comes to an analogue to digital converter (ADC)
    > > > >
    > > > > the ADC outputs a digital value.
    > > > > the stamp reads the ditital value.
    > > > > multipies
    > > > > divides,
    > > > > smooths
    > > > > compares
    > > > > reads another deivce, pressure ?
    > > > > displays......
    > > > >
    > > > > for avation, there are a few on here that take temperature and
    > > > > pressure readings to determine density altitude of the model
    > > planes.
    > > > >
    > > > > All you have to do is list your operations in a continuous
    string
    > > of
    > > > > smaller operations so that the output of one can feed the
    next.
    > > > > then groups of operations, say reading a pressure signal and
    > > scaling
    > > > > it for something useful, THEN reading a temperature signal and
    > > > > scaling IT to something useful, then combiing those answers to
    > > get a
    > > > > value you want.
    > > > > you can output any part to your display too, or have a button
    to
    > > > > select what part you want to dispaly or change the display
    > > > > periodically.
    > > > >
    > > > > Realize that all mircroporcessors do not multi-task, but the
    time
    > > > > slice between operations gets smaller with faster micros.
    > > > >
    > > > > The term 'Real Time' is defined something like "faster than
    the
    > > > > process requires" Temperature does not change fast, so
    reading it
    > > > > every minute or so can be 'real time' pressure changes at the
    > > speed
    > > > > of sound and electricity at the speed of light.
    > > > >
    > > > > Hope that helps.
    > > > >
    > > > > Dave
    > > > > (stealth mode re-activated)
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > --- In basicstamps@y..., "Blue eyes" <wm_tell1@y...> wrote:
    > > > > > Greetings,
    > > > > >
    > > > > > I'm new to the group and have read about the Stamp modules
    but
    > > > > never
    > > > > > used them. I've got an application that requires a
    controller
    > > that
    > > > > > can perform several tasks (measure temp and pressure,
    perform
    > > some
    > > > > > calculations on the data, feed the results to a display,
    save
    > > the
    > > > > > data and recall the data). I realize that I/O could be a
    > > limiting
    > > > > > factor but don't know if the Stamp can multitask. Does
    anyone
    > > have
    > > > > an
    > > > > > answer?
    > > > > >
    > > > > > William
    > > > >
    > > > >
    > > > > To UNSUBSCRIBE, just send mail to:
    > > > > basicstamps-unsubscribe@y...
    > > > > from the same email address that you subscribed. Text in the
    > > Subject and
    > > > Body of the message will be ignored.
    > > > >
    > > > >
    > > > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > > > >
    > > > >
    > > > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@y...
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-16 19:06
    The BS2p supports pin-polling between PBASIC statements. Not true
    interrupts, yet can be very useful if applied properly.

    -- Jon Williams
    -- Parallax

    In a message dated 10/16/02 12:51:52 PM Central Daylight Time,
    ghidera2000@y... writes:


    > I dont remember offhand which one it is, but doesn't the 2p or the sx
    >




    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-17 20:21
    It sort of has one interrupt ; you can trip the reset line. That's an
    interrupt, of sorts, that you can use sort of creatively.

    On Wed, 16 Oct 2002, Ezequiel Leonardo Aceto wrote:

    > Hello Dave,
    > Eventhough the Stamp doesn't have an interrupt, you can
    > "simulate" one. Just include between each line of your code and IF..Then
    > structure asking for the state of a pin. It'll consume code, but you have a
    > kind of interrupt.
    >
    > Ezequiel
    >
    Original Message
    > From: "Dave Mucha" <davemucha@j...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Wednesday, October 16, 2002 9:54 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform muliple
    > tasks?
    >
    >
    > > Hi Ezequiel,
    > >
    > > You are correct that a pipeline is a better term for how a processor
    > > works, and that you need two processors to do real multi-tasking.
    > >
    > > regarding the Stamp, there are no interupts on a Stamp. you might
    > > need to find a different processor for that.
    > >
    > > I would think that the SPI communication for a single task would only
    > > take a few clock cycles and before and after a connection, you could
    > > test to see if there is a serial request.
    > >
    > > As you mentioned my desktop does only one process at a time, although
    > > it does them really fast (compared to my old computer) that
    > > it 'seems' like it is multi-tasking. Actually since I use Win-Doz it
    > > doesn't seem like multi-tasking, but more like multi-waiting.
    > >
    > > regarding speed, it is obvious that the faster the chip speed, the
    > > less impact or slow down the wait would be between tasks.
    > >
    > > If you attempted to add software interupts in a task, the speed would
    > > drop considderably. I would think that there would be a better way
    > > to do that.
    > >
    > > Dave
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > --- In basicstamps@y..., "Ezequiel Leonardo Aceto" <Nik@i...> wrote:
    > > > Hello,
    > > > I think you didn't understand me (Could it be because I
    > > don't speak
    > > > english frecuently). For example, supouse you comunicate with two
    > > devices,
    > > > one is serial RS232 and the other one is SPI. The SPI device send
    > > 32bits,
    > > > and the RS232 sends 2 bytes. supouse the serial RS232 device needs
    > > more
    > > > priority than the SPI. So you can make the communication with the
    > > SPI and
    > > > receive bit by bit, between each bit, you need to check if the
    > > RS232 device
    > > > needs "attention". If it needs attention, make a little stop in the
    > > SPI comm
    > > > and receive the 2 bytes from the RS232 device, when you received
    > > this two
    > > > bytes, you continue with you SPI communication. In a way it's
    > > multitasking
    > > > using IRQ (Interrupt Request). What do you think of multitasking?
    > > This is
    > > > the way your PC works, and you microcontroller is a little PC.
    > > There is no
    > > > processor that can do two task at the "same" time. And the conpect
    > > of
    > > > "PIPELINE" it's not true multitasking. If you want real
    > > multitasking at
    > > > hardware level you need two CPU. Eventhough one will be Master and
    > > the other
    > > > one Slave. But in Software, you make multitasking the way I show
    > > you. One
    > > > thing is to start a task, finish it and start another one. Another
    > > thing is
    > > > to start one task, start a second task and then distribute this two
    > > tasks in
    > > > processors cycles. The second one is multitasking, the first one
    > > it's what
    > > > you do every day. Perhaps you don't see it as multitasking
    > > because "the
    > > > Stamp is slow", but try to do something similar with you PC.
    > > >
    > > > Ezequiel Aceto
    > > > Buenos Aires, Argentina
    > > >
    > > >
    > > >
    Original Message
    > > > From: "Dave Mucha" <davemucha@j...>
    > > > To: <basicstamps@y...>
    > > > Sent: Monday, October 14, 2002 10:37 AM
    > > > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp BS2 module perform
    > > muliple
    > > > tasks?
    > > >
    > > >
    > > > > What you describe is not multi-tasking. it is just what we do all
    > > > > the time.
    > > > >
    > > > > measure temp for example. temp is read from a remote device of
    > > some
    > > > > sort. then fed back to the Stamp. the temp is an analogue
    > > signal so
    > > > > it comes to an analogue to digital converter (ADC)
    > > > >
    > > > > the ADC outputs a digital value.
    > > > > the stamp reads the ditital value.
    > > > > multipies
    > > > > divides,
    > > > > smooths
    > > > > compares
    > > > > reads another deivce, pressure ?
    > > > > displays......
    > > > >
    > > > > for avation, there are a few on here that take temperature and
    > > > > pressure readings to determine density altitude of the model
    > > planes.
    > > > >
    > > > > All you have to do is list your operations in a continuous string
    > > of
    > > > > smaller operations so that the output of one can feed the next.
    > > > > then groups of operations, say reading a pressure signal and
    > > scaling
    > > > > it for something useful, THEN reading a temperature signal and
    > > > > scaling IT to something useful, then combiing those answers to
    > > get a
    > > > > value you want.
    > > > > you can output any part to your display too, or have a button to
    > > > > select what part you want to dispaly or change the display
    > > > > periodically.
    > > > >
    > > > > Realize that all mircroporcessors do not multi-task, but the time
    > > > > slice between operations gets smaller with faster micros.
    > > > >
    > > > > The term 'Real Time' is defined something like "faster than the
    > > > > process requires" Temperature does not change fast, so reading it
    > > > > every minute or so can be 'real time' pressure changes at the
    > > speed
    > > > > of sound and electricity at the speed of light.
    > > > >
    > > > > Hope that helps.
    > > > >
    > > > > Dave
    > > > > (stealth mode re-activated)
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > --- In basicstamps@y..., "Blue eyes" <wm_tell1@y...> wrote:
    > > > > > Greetings,
    > > > > >
    > > > > > I'm new to the group and have read about the Stamp modules but
    > > > > never
    > > > > > used them. I've got an application that requires a controller
    > > that
    > > > > > can perform several tasks (measure temp and pressure, perform
    > > some
    > > > > > calculations on the data, feed the results to a display, save
    > > the
    > > > > > data and recall the data). I realize that I/O could be a
    > > limiting
    > > > > > factor but don't know if the Stamp can multitask. Does anyone
    > > have
    > > > > an
    > > > > > answer?
    > > > > >
    > > > > > William
    > > > >
    > > > >
    > > > > To UNSUBSCRIBE, just send mail to:
    > > > > basicstamps-unsubscribe@y...
    > > > > from the same email address that you subscribed. Text in the
    > > Subject and
    > > > Body of the message will be ignored.
    > > > >
    > > > >
    > > > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > > > >
    > > > >
    > > > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >

    Sean T. Lamont, CTO / Chief NetNerd, Abstract Software, Inc. (ServNet)
    Seattle - Bellingham - Vancouver - Portland - Everett - Tacoma - Bremerton
    email: lamont@a... WWW: http://www.serv.net
    "Do not fear mistakes, There Are None" - Miles Davis
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-18 17:30
    Along this line, what is the best way to programmatically trip a Stamp reset?

    ... And would that be used in conjunction with a startup routine??

    I dont suppose that a startup routine would realize the different reasons a
    reset had occurred, would it?

    James


    On Thu, 17 Oct 2002 12:21:24 -0700 (PDT) "Sean T. Lamont .lost."
    <lamont@a...> wrote:

    >
    > It sort of has one interrupt ; you can trip the
    > reset line. That's an
    > interrupt, of sorts, that you can use sort of
    > creatively.
    >
    > On Wed, 16 Oct 2002, Ezequiel Leonardo Aceto
    > wrote:
    >
    > > Hello Dave,
    > > Eventhough the Stamp doesn't have
    > an interrupt, you can
    > > "simulate" one. Just include between each
    > line of your code and IF..Then
    > > structure asking for the state of a pin.
    > It'll consume code, but you have a
    > > kind of interrupt.
    > >
    > > Ezequiel
    > >
    Original Message
    > > From: "Dave Mucha"
    > > To:
    > > Sent: Wednesday, October 16, 2002 9:54 AM
    > > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp
    > BS2 module perform muliple
    > > tasks?
    > >
    > >
    > > > Hi Ezequiel,
    > > >
    > > > You are correct that a pipeline is a better
    > term for how a processor
    > > > works, and that you need two processors to
    > do real multi-tasking.
    > > >
    > > > regarding the Stamp, there are no interupts
    > on a Stamp. you might
    > > > need to find a different processor for
    > that.
    > > >
    > > > I would think that the SPI communication
    > for a single task would only
    > > > take a few clock cycles and before and
    > after a connection, you could
    > > > test to see if there is a serial request.
    > > >
    > > > As you mentioned my desktop does only one
    > process at a time, although
    > > > it does them really fast (compared to my
    > old computer) that
    > > > it 'seems' like it is multi-tasking.
    > Actually since I use Win-Doz it
    > > > doesn't seem like multi-tasking, but more
    > like multi-waiting.
    > > >
    > > > regarding speed, it is obvious that the
    > faster the chip speed, the
    > > > less impact or slow down the wait would be
    > between tasks.
    > > >
    > > > If you attempted to add software interupts
    > in a task, the speed would
    > > > drop considderably. I would think that
    > there would be a better way
    > > > to do that.
    > > >
    > > > Dave
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > --- In basicstamps@y..., "Ezequiel Leonardo
    > Aceto" wrote:
    > > > > Hello,
    > > > > I think you didn't understand me
    > (Could it be because I
    > > > don't speak
    > > > > english frecuently). For example, supouse
    > you comunicate with two
    > > > devices,
    > > > > one is serial RS232 and the other one is
    > SPI. The SPI device send
    > > > 32bits,
    > > > > and the RS232 sends 2 bytes. supouse the
    > serial RS232 device needs
    > > > more
    > > > > priority than the SPI. So you can make
    > the communication with the
    > > > SPI and
    > > > > receive bit by bit, between each bit, you
    > need to check if the
    > > > RS232 device
    > > > > needs "attention". If it needs attention,
    > make a little stop in the
    > > > SPI comm
    > > > > and receive the 2 bytes from the RS232
    > device, when you received
    > > > this two
    > > > > bytes, you continue with you SPI
    > communication. In a way it's
    > > > multitasking
    > > > > using IRQ (Interrupt Request). What do
    > you think of multitasking?
    > > > This is
    > > > > the way your PC works, and you
    > microcontroller is a little PC.
    > > > There is no
    > > > > processor that can do two task at the
    > "same" time. And the conpect
    > > > of
    > > > > "PIPELINE" it's not true multitasking. If
    > you want real
    > > > multitasking at
    > > > > hardware level you need two CPU.
    > Eventhough one will be Master and
    > > > the other
    > > > > one Slave. But in Software, you make
    > multitasking the way I show
    > > > you. One
    > > > > thing is to start a task, finish it and
    > start another one. Another
    > > > thing is
    > > > > to start one task, start a second task
    > and then distribute this two
    > > > tasks in
    > > > > processors cycles. The second one is
    > multitasking, the first one
    > > > it's what
    > > > > you do every day. Perhaps you don't see
    > it as multitasking
    > > > because "the
    > > > > Stamp is slow", but try to do something
    > similar with you PC.
    > > > >
    > > > > Ezequiel Aceto
    > > > > Buenos Aires, Argentina
    > > > >
    > > > >
    > > > >
    Original Message
    > > > > From: "Dave Mucha"
    > > > > To:
    > > > > Sent: Monday, October 14, 2002 10:37 AM
    > > > > Subject: [noparse][[/noparse]basicstamps] Re: Can a single
    > stamp BS2 module perform
    > > > muliple
    > > > > tasks?
    > > > >
    > > > >
    > > > > > What you describe is not multi-tasking.
    > it is just what we do all
    > > > > > the time.
    > > > > >
    > > > > > measure temp for example. temp is read
    > from a remote device of
    > > > some
    > > > > > sort. then fed back to the Stamp. the
    > temp is an analogue
    > > > signal so
    > > > > > it comes to an analogue to digital
    > converter (ADC)
    > > > > >
    > > > > > the ADC outputs a digital value.
    > > > > > the stamp reads the ditital value.
    > > > > > multipies
    > > > > > divides,
    > > > > > smooths
    > > > > > compares
    > > > > > reads another deivce, pressure ?
    > > > > > displays......
    > > > > >
    > > > > > for avation, there are a few on here
    > that take temperature and
    > > > > > pressure readings to determine density
    > altitude of the model
    > > > planes.
    > > > > >
    > > > > > All you have to do is list your
    > operations in a continuous string
    > > > of
    > > > > > smaller operations so that the output
    > of one can feed the next.
    > > > > > then groups of operations, say reading
    > a pressure signal and
    > > > scaling
    > > > > > it for something useful, THEN reading a
    > temperature signal and
    > > > > > scaling IT to something useful, then
    > combiing those answers to
    > > > get a
    > > > > > value you want.
    > > > > > you can output any part to your display
    > too, or have a button to
    > > > > > select what part you want to dispaly or
    > change the display
    > > > > > periodically.
    > > > > >
    > > > > > Realize that all mircroporcessors do
    > not multi-task, but the time
    > > > > > slice between operations gets smaller
    > with faster micros.
    > > > > >
    > > > > > The term 'Real Time' is defined
    > something like "faster than the
    > > > > > process requires" Temperature does not
    > change fast, so reading it
    > > > > > every minute or so can be 'real time'
    > pressure changes at the
    > > > speed
    > > > > > of sound and electricity at the speed
    > of light.
    > > > > >
    > > > > > Hope that helps.
    > > > > >
    > > > > > Dave
    > > > > > (stealth mode re-activated)
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > > --- In basicstamps@y..., "Blue eyes"
    > wrote:
    > > > > > > Greetings,
    > > > > > >
    > > > > > > I'm new to the group and have read
    > about the Stamp modules but
    > > > > > never
    > > > > > > used them. I've got an application
    > that requires a controller
    > > > that
    > > > > > > can perform several tasks (measure
    > temp and pressure, perform
    > > > some
    > > > > > > calculations on the data, feed the
    > results to a display, save
    > > > the
    > > > > > > data and recall the data). I realize
    > that I/O could be a
    > > > limiting
    > > > > > > factor but don't know if the Stamp
    > can multitask. Does anyone
    > > > have
    > > > > > an
    > > > > > > answer?
    > > > > > >
    > > > > > > William
    > > > > >
    > > > > >
    > > > > > To UNSUBSCRIBE, just send mail to:
    > > > > > basicstamps-unsubscribe@y...
    > > > > > from the same email address that you
    > subscribed. Text in the
    > > > Subject and
    > > > > Body of the message will be ignored.
    > > > > >
    > > > > >
    > > > > > Your use of Yahoo! Groups is subject to
    > > > http://docs.yahoo.com/info/terms/
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@yahoogroups.com
    > > > from the same email address that you
    > subscribed. Text in the Subject and
    > > Body of the message will be ignored.
    > > >
    > > >
    > > > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    > > >
    > > >
    > > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you
    > subscribed. Text in the Subject and Body of
    > the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
    >
    > Sean T. Lamont, CTO / Chief NetNerd, Abstract
    > Software, Inc. (ServNet)
    > Seattle - Bellingham - Vancouver - Portland -
    > Everett - Tacoma - Bremerton
    > email: lamont@a...
    > WWW: http://www.serv.net
    > "Do not fear mistakes, There Are None"
    > - Miles Davis
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you
    > subscribed. Text in the Subject and Body of
    > the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-18 17:37
    You would have to pull the reset line low with an unused pin. This would
    cause a "hard" reset and the Stamp would completely reinitialize. As soon as
    the Stamp went into Reset, the pin would release and the initialization
    process would take place.

    -- Jon Williams
    -- Parallax

    In a message dated 10/18/02 11:32:59 AM Central Daylight Time,
    jamesrwaldron@e... writes:


    > Along this line, what is the best way to programmatically trip a Stamp reset?
    >
    > ... And would that be used in conjunction with a startup routine??
    >
    > I dont suppose that a startup routine would realize the different reasons a
    > reset had occurred, would it?
    >
    >




    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-18 18:40
    --- James Waldron <jamesrwaldron@e...>
    wrote:
    > Along this line, what is the best way to
    > programmatically trip a Stamp reset?
    > ... And would that be used in conjunction with a
    > startup routine??
    > I dont suppose that a startup routine would realize
    > the different reasons a
    > reset had occurred, would it?

    Let's not forget that when you perform a RESET, you
    lose your variables and I/O pin configuration/states.




    =====
    Chris Savage
    Knight Designs
    324 West Main Street
    Montour Falls, NY 14865
    (607) 535-6777

    http://www.knightdesigns.com

    __________________________________________________
    Do you Yahoo!?
    Faith Hill - Exclusive Performances, Videos & More
    http://faith.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-18 19:59
    I'm not sure there's a good reason to programmatically trip a stamp reset,
    but you could tie it to an external event, like a button press or
    something. If you tied the button to both reset and p0, you'd know on
    startup whether to process button-related code.

    On Fri, 18 Oct 2002, James Waldron wrote:

    > Along this line, what is the best way to programmatically trip a Stamp reset?
    >
    > ... And would that be used in conjunction with a startup routine??
    >
    > I dont suppose that a startup routine would realize the different reasons a
    > reset had occurred, would it?
    >
    > James
    >
    >
    > On Thu, 17 Oct 2002 12:21:24 -0700 (PDT) "Sean T. Lamont .lost."
    > <lamont@a...> wrote:
    >
    > >
    > > It sort of has one interrupt ; you can trip the
    > > reset line. That's an
    > > interrupt, of sorts, that you can use sort of
    > > creatively.
    > >
    > > On Wed, 16 Oct 2002, Ezequiel Leonardo Aceto
    > > wrote:
    > >
    > > > Hello Dave,
    > > > Eventhough the Stamp doesn't have
    > > an interrupt, you can
    > > > "simulate" one. Just include between each
    > > line of your code and IF..Then
    > > > structure asking for the state of a pin.
    > > It'll consume code, but you have a
    > > > kind of interrupt.
    > > >
    > > > Ezequiel
    > > >
    Original Message
    > > > From: "Dave Mucha"
    > > > To:
    > > > Sent: Wednesday, October 16, 2002 9:54 AM
    > > > Subject: [noparse][[/noparse]basicstamps] Re: Can a single stamp
    > > BS2 module perform muliple
    > > > tasks?
    > > >
    > > >
    > > > > Hi Ezequiel,
    > > > >
    > > > > You are correct that a pipeline is a better
    > > term for how a processor
    > > > > works, and that you need two processors to
    > > do real multi-tasking.
    > > > >
    > > > > regarding the Stamp, there are no interupts
    > > on a Stamp. you might
    > > > > need to find a different processor for
    > > that.
    > > > >
    > > > > I would think that the SPI communication
    > > for a single task would only
    > > > > take a few clock cycles and before and
    > > after a connection, you could
    > > > > test to see if there is a serial request.
    > > > >
    > > > > As you mentioned my desktop does only one
    > > process at a time, although
    > > > > it does them really fast (compared to my
    > > old computer) that
    > > > > it 'seems' like it is multi-tasking.
    > > Actually since I use Win-Doz it
    > > > > doesn't seem like multi-tasking, but more
    > > like multi-waiting.
    > > > >
    > > > > regarding speed, it is obvious that the
    > > faster the chip speed, the
    > > > > less impact or slow down the wait would be
    > > between tasks.
    > > > >
    > > > > If you attempted to add software interupts
    > > in a task, the speed would
    > > > > drop considderably. I would think that
    > > there would be a better way
    > > > > to do that.
    > > > >
    > > > > Dave
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > --- In basicstamps@y..., "Ezequiel Leonardo
    > > Aceto" wrote:
    > > > > > Hello,
    > > > > > I think you didn't understand me
    > > (Could it be because I
    > > > > don't speak
    > > > > > english frecuently). For example, supouse
    > > you comunicate with two
    > > > > devices,
    > > > > > one is serial RS232 and the other one is
    > > SPI. The SPI device send
    > > > > 32bits,
    > > > > > and the RS232 sends 2 bytes. supouse the
    > > serial RS232 device needs
    > > > > more
    > > > > > priority than the SPI. So you can make
    > > the communication with the
    > > > > SPI and
    > > > > > receive bit by bit, between each bit, you
    > > need to check if the
    > > > > RS232 device
    > > > > > needs "attention". If it needs attention,
    > > make a little stop in the
    > > > > SPI comm
    > > > > > and receive the 2 bytes from the RS232
    > > device, when you received
    > > > > this two
    > > > > > bytes, you continue with you SPI
    > > communication. In a way it's
    > > > > multitasking
    > > > > > using IRQ (Interrupt Request). What do
    > > you think of multitasking?
    > > > > This is
    > > > > > the way your PC works, and you
    > > microcontroller is a little PC.
    > > > > There is no
    > > > > > processor that can do two task at the
    > > "same" time. And the conpect
    > > > > of
    > > > > > "PIPELINE" it's not true multitasking. If
    > > you want real
    > > > > multitasking at
    > > > > > hardware level you need two CPU.
    > > Eventhough one will be Master and
    > > > > the other
    > > > > > one Slave. But in Software, you make
    > > multitasking the way I show
    > > > > you. One
    > > > > > thing is to start a task, finish it and
    > > start another one. Another
    > > > > thing is
    > > > > > to start one task, start a second task
    > > and then distribute this two
    > > > > tasks in
    > > > > > processors cycles. The second one is
    > > multitasking, the first one
    > > > > it's what
    > > > > > you do every day. Perhaps you don't see
    > > it as multitasking
    > > > > because "the
    > > > > > Stamp is slow", but try to do something
    > > similar with you PC.
    > > > > >
    > > > > > Ezequiel Aceto
    > > > > > Buenos Aires, Argentina
    > > > > >
    > > > > >
    > > > > >
    Original Message
    > > > > > From: "Dave Mucha"
    > > > > > To:
    > > > > > Sent: Monday, October 14, 2002 10:37 AM
    > > > > > Subject: [noparse][[/noparse]basicstamps] Re: Can a single
    > > stamp BS2 module perform
    > > > > muliple
    > > > > > tasks?
    > > > > >
    > > > > >
    > > > > > > What you describe is not multi-tasking.
    > > it is just what we do all
    > > > > > > the time.
    > > > > > >
    > > > > > > measure temp for example. temp is read
    > > from a remote device of
    > > > > some
    > > > > > > sort. then fed back to the Stamp. the
    > > temp is an analogue
    > > > > signal so
    > > > > > > it comes to an analogue to digital
    > > converter (ADC)
    > > > > > >
    > > > > > > the ADC outputs a digital value.
    > > > > > > the stamp reads the ditital value.
    > > > > > > multipies
    > > > > > > divides,
    > > > > > > smooths
    > > > > > > compares
    > > > > > > reads another deivce, pressure ?
    > > > > > > displays......
    > > > > > >
    > > > > > > for avation, there are a few on here
    > > that take temperature and
    > > > > > > pressure readings to determine density
    > > altitude of the model
    > > > > planes.
    > > > > > >
    > > > > > > All you have to do is list your
    > > operations in a continuous string
    > > > > of
    > > > > > > smaller operations so that the output
    > > of one can feed the next.
    > > > > > > then groups of operations, say reading
    > > a pressure signal and
    > > > > scaling
    > > > > > > it for something useful, THEN reading a
    > > temperature signal and
    > > > > > > scaling IT to something useful, then
    > > combiing those answers to
    > > > > get a
    > > > > > > value you want.
    > > > > > > you can output any part to your display
    > > too, or have a button to
    > > > > > > select what part you want to dispaly or
    > > change the display
    > > > > > > periodically.
    > > > > > >
    > > > > > > Realize that all mircroporcessors do
    > > not multi-task, but the time
    > > > > > > slice between operations gets smaller
    > > with faster micros.
    > > > > > >
    > > > > > > The term 'Real Time' is defined
    > > something like "faster than the
    > > > > > > process requires" Temperature does not
    > > change fast, so reading it
    > > > > > > every minute or so can be 'real time'
    > > pressure changes at the
    > > > > speed
    > > > > > > of sound and electricity at the speed
    > > of light.
    > > > > > >
    > > > > > > Hope that helps.
    > > > > > >
    > > > > > > Dave
    > > > > > > (stealth mode re-activated)
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > > --- In basicstamps@y..., "Blue eyes"
    > > wrote:
    > > > > > > > Greetings,
    > > > > > > >
    > > > > > > > I'm new to the group and have read
    > > about the Stamp modules but
    > > > > > > never
    > > > > > > > used them. I've got an application
    > > that requires a controller
    > > > > that
    > > > > > > > can perform several tasks (measure
    > > temp and pressure, perform
    > > > > some
    > > > > > > > calculations on the data, feed the
    > > results to a display, save
    > > > > the
    > > > > > > > data and recall the data). I realize
    > > that I/O could be a
    > > > > limiting
    > > > > > > > factor but don't know if the Stamp
    > > can multitask. Does anyone
    > > > > have
    > > > > > > an
    > > > > > > > answer?
    > > > > > > >
    > > > > > > > William
    > > > > > >
    > > > > > >
    > > > > > > To UNSUBSCRIBE, just send mail to:
    > > > > > > basicstamps-unsubscribe@y...
    > > > > > > from the same email address that you
    > > subscribed. Text in the
    > > > > Subject and
    > > > > > Body of the message will be ignored.
    > > > > > >
    > > > > > >
    > > > > > > Your use of Yahoo! Groups is subject to
    > > > > http://docs.yahoo.com/info/terms/
    > > > > > >
    > > > > > >
    > > > > > >
    > > > >
    > > > >
    > > > > To UNSUBSCRIBE, just send mail to:
    > > > > basicstamps-unsubscribe@yahoogroups.com
    > > > > from the same email address that you
    > > subscribed. Text in the Subject and
    > > > Body of the message will be ignored.
    > > > >
    > > > >
    > > > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@yahoogroups.com
    > > > from the same email address that you
    > > subscribed. Text in the Subject and Body of
    > > the message will be ignored.
    > > >
    > > >
    > > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > > >
    > > >
    > > >
    > >
    > > Sean T. Lamont, CTO / Chief NetNerd, Abstract
    > > Software, Inc. (ServNet)
    > > Seattle - Bellingham - Vancouver - Portland -
    > > Everett - Tacoma - Bremerton
    > > email: lamont@a...
    > > WWW: http://www.serv.net
    > > "Do not fear mistakes, There Are None"
    > > - Miles Davis
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you
    > > subscribed. Text in the Subject and Body of
    > > the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >

    Sean T. Lamont, CTO / Chief NetNerd, Abstract Software, Inc. (ServNet)
    Seattle - Bellingham - Vancouver - Portland - Everett - Tacoma - Bremerton
    email: lamont@a... WWW: http://www.serv.net
    "Do not fear mistakes, There Are None" - Miles Davis
  • ArchiverArchiver Posts: 46,084
    edited 2002-10-18 20:05
    You don't lose input states, just direction.

    On Fri, 18 Oct 2002, Chris Savage wrote:

    > --- James Waldron <jamesrwaldron@e...>
    > wrote:
    > > Along this line, what is the best way to
    > > programmatically trip a Stamp reset?
    > > ... And would that be used in conjunction with a
    > > startup routine??
    > > I dont suppose that a startup routine would realize
    > > the different reasons a
    > > reset had occurred, would it?
    >
    > Let's not forget that when you perform a RESET, you
    > lose your variables and I/O pin configuration/states.
    >
    >
    >
    >
    > =====
    > Chris Savage
    > Knight Designs
    > 324 West Main Street
    > Montour Falls, NY 14865
    > (607) 535-6777
    >
    > http://www.knightdesigns.com
    >
    > __________________________________________________
    > Do you Yahoo!?
    > Faith Hill - Exclusive Performances, Videos & More
    > http://faith.yahoo.com
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >

    Sean T. Lamont, CTO / Chief NetNerd, Abstract Software, Inc. (ServNet)
    Seattle - Bellingham - Vancouver - Portland - Everett - Tacoma - Bremerton
    email: lamont@a... WWW: http://www.serv.net
    "Do not fear mistakes, There Are None" - Miles Davis
Sign In or Register to comment.