Shop OBEX P1 Docs P2 Docs Learn Events
Output pin glitches — Parallax Forums

Output pin glitches

ArchiverArchiver Posts: 46,084
edited 2003-06-24 23:01 in General Discussion
I have noticed that the output pin of the stamp BSII
glitches to low every 2.1 Seconds.
The setup is simple: the stamp is powered from a
stable 9 Volt power supply. code is simply :

high 7

when u monitor pin 7 using a non - triggered rolling
mode of the scope ...a high to low glitch pulse every
2.1 seconds occurs.
I have heard of someone else having the same problem.
Kindly advise..i have checked and the stamp does not
reset so the problem is surely somethings else.
what am i missing here?
thankyou




__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-06-24 00:41
    Your program is really:

    High 7
    End

    Where the End is implied. TO stop this behavior try this:

    High 7
    Endpgm:
    goto endpgm

    That should solve your problem. I think there is an article about this
    at http://www.wd5gnr.com/stampfaq.htm


    Al Williams
    AWC
    * Floating point math for the Stamp, PIC, SX, or any microcontroller
    http://www.al-williams.com/awce/pak1.htm



    >
    Original Message
    > From: harshit suri [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=460fX3TeUAJQmsqEU9SEsNgWkC9nEISE79A7_2_YmooTGDCT9upKTul99J2U7n4Py7Uo2klAX6C8FuZr]suri_list@y...[/url
    > Sent: Monday, June 23, 2003 6:37 PM
    > To: stamp
    > Subject: [noparse][[/noparse]basicstamps] Output pin glitches
    >
    >
    > I have noticed that the output pin of the stamp BSII
    > glitches to low every 2.1 Seconds.
    > The setup is simple: the stamp is powered from a
    > stable 9 Volt power supply. code is simply :
    >
    > high 7
    >
    > when u monitor pin 7 using a non - triggered rolling
    > mode of the scope ...a high to low glitch pulse every
    > 2.1 seconds occurs.
    > I have heard of someone else having the same problem.
    > Kindly advise..i have checked and the stamp does not
    > reset so the problem is surely somethings else.
    > what am i missing here?
    > thankyou
    >
    >
    >
    >
    > __________________________________
    > Do you Yahoo!?
    > SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.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/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-24 01:13
    Thanks AL .it worked but why does that glitch come in
    the first place. seems like a watchdog timer type
    behaviour ..I tried seeing the FAQ . couldnt find the
    article.
    thankyou


    --- Al Williams <alw@a...> wrote:
    > Your program is really:
    >
    > High 7
    > End
    >
    > Where the End is implied. TO stop this behavior try
    > this:
    >
    > High 7
    > Endpgm:
    > goto endpgm
    >
    > That should solve your problem. I think there is an
    > article about this
    > at http://www.wd5gnr.com/stampfaq.htm
    >
    >
    > Al Williams
    > AWC
    > * Floating point math for the Stamp, PIC, SX, or any
    > microcontroller
    > http://www.al-williams.com/awce/pak1.htm
    >
    >
    >
    > >
    Original Message
    > > From: harshit suri [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=OQn2omb7e3A3ae-1Gx7GCbIeDvcR020Z9Bn8fuV8qzq6vloqWfVs0e007surFgUyCJbfP5dE7iXSGCPQ4yM]suri_list@y...[/url
    > > Sent: Monday, June 23, 2003 6:37 PM
    > > To: stamp
    > > Subject: [noparse][[/noparse]basicstamps] Output pin glitches
    > >
    > >
    > > I have noticed that the output pin of the stamp
    > BSII
    > > glitches to low every 2.1 Seconds.
    > > The setup is simple: the stamp is powered from a
    > > stable 9 Volt power supply. code is simply :
    > >
    > > high 7
    > >
    > > when u monitor pin 7 using a non - triggered
    > rolling
    > > mode of the scope ...a high to low glitch pulse
    > every
    > > 2.1 seconds occurs.
    > > I have heard of someone else having the same
    > problem.
    > > Kindly advise..i have checked and the stamp does
    > not
    > > reset so the problem is surely somethings else.
    > > what am i missing here?
    > > thankyou
    > >
    > >
    > >
    > >
    > > __________________________________
    > > Do you Yahoo!?
    > > SBC Yahoo! DSL - Now only $29.95 per month!
    > http://sbc.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/
    > >
    > >
    > >
    >
    >
    > 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/
    >
    >


    __________________________________________________
    Do you Yahoo!?
    Yahoo! News - Today's headlines
    http://news.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-24 02:40
    Hmm... I could have sworn there was an article in there but I can't find
    it either :-)

    To save power when the Stamp stops it goes into a low power mode. This
    stops the watchdog timer which eventually times out and resets the
    Stamp. The Stamp resets, all of its pins go to outputs. Quickly, it
    realizes that it is stopped on purpose, so it resets its pins to the
    last known state and goes back to sleep.

    Regards,

    Al Williams
    AWC
    * Control 8 servos at once
    http://www.al-williams.com/awce/pak8.htm



    >
    Original Message
    > From: harshit suri [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=06ZgLYpE5US-Z1-eYrZYCZS1J4eN4cKUhzMgPM-Hk57E7NqfgXeIqpPbCmtOBDwdi0Tgdfhb89og]suri_list@y...[/url
    > Sent: Monday, June 23, 2003 7:14 PM
    > To: basicstamps@yahoogroups.com
    > Subject: RE: [noparse][[/noparse]basicstamps] Output pin glitches
    >
    >
    > Thanks AL .it worked but why does that glitch come in
    > the first place. seems like a watchdog timer type
    > behaviour ..I tried seeing the FAQ . couldnt find the article.
    > thankyou
    >
    >
    > --- Al Williams <alw@a...> wrote:
    > > Your program is really:
    > >
    > > High 7
    > > End
    > >
    > > Where the End is implied. TO stop this behavior try
    > > this:
    > >
    > > High 7
    > > Endpgm:
    > > goto endpgm
    > >
    > > That should solve your problem. I think there is an
    > > article about this
    > > at http://www.wd5gnr.com/stampfaq.htm
    > >
    > >
    > > Al Williams
    > > AWC
    > > * Floating point math for the Stamp, PIC, SX, or any microcontroller

    > > http://www.al-williams.com/awce/pak1.htm
    > >
    > >
    > >
    > > >
    Original Message
    > > > From: harshit suri [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=06ZgLYpE5US-Z1-eYrZYCZS1J4eN4cKUhzMgPM-Hk57E7NqfgXeIqpPbCmtOBDwdi0Tgdfhb89og]suri_list@y...[/url
    > > > Sent: Monday, June 23, 2003 6:37 PM
    > > > To: stamp
    > > > Subject: [noparse][[/noparse]basicstamps] Output pin glitches
    > > >
    > > >
    > > > I have noticed that the output pin of the stamp
    > > BSII
    > > > glitches to low every 2.1 Seconds.
    > > > The setup is simple: the stamp is powered from a
    > > > stable 9 Volt power supply. code is simply :
    > > >
    > > > high 7
    > > >
    > > > when u monitor pin 7 using a non - triggered
    > > rolling
    > > > mode of the scope ...a high to low glitch pulse
    > > every
    > > > 2.1 seconds occurs.
    > > > I have heard of someone else having the same
    > > problem.
    > > > Kindly advise..i have checked and the stamp does
    > > not
    > > > reset so the problem is surely somethings else.
    > > > what am i missing here?
    > > > thankyou
    > > >
    > > >
    > > >
    > > >
    > > > __________________________________
    > > > Do you Yahoo!?
    > > > SBC Yahoo! DSL - Now only $29.95 per month!
    > > http://sbc.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/
    > > >
    > > >
    > > >
    > >
    > >
    > > 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/
    > >
    > >
    >
    >
    > __________________________________________________
    > Do you Yahoo!?
    > Yahoo! News - Today's headlines
    > http://news.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/
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-24 18:11
    In 'sleep' (or 'end') mode, the BS2's watchdog times out,
    as Mr. Williams has pointed out. In 'Stop', or in
    continuous looping, this does not occur.

    BTW, you can get around this limitation by adding a
    10K or 20K ohm pull-up to +5 volts to the pin in
    question. Since the pin briefly becomes an
    input (high-impedance), an external pull-up
    will hold the value during the watchdog
    timeout period.

    --- In basicstamps@yahoogroups.com, harshit suri <suri_list@y...>
    wrote:
    > I have noticed that the output pin of the stamp BSII
    > glitches to low every 2.1 Seconds.
    > The setup is simple: the stamp is powered from a
    > stable 9 Volt power supply. code is simply :
    >
    > high 7
    >
    > when u monitor pin 7 using a non - triggered rolling
    > mode of the scope ...a high to low glitch pulse every
    > 2.1 seconds occurs.
    > I have heard of someone else having the same problem.
    > Kindly advise..i have checked and the stamp does not
    > reset so the problem is surely somethings else.
    > what am i missing here?
    > thankyou
    >
    >
    >
    >
    > __________________________________
    > Do you Yahoo!?
    > SBC Yahoo! DSL - Now only $29.95 per month!
    > http://sbc.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-24 21:40
    A pull up resistor will only fix the problem if you intend to leave it
    high. If the pin is supposed to be low, then the glitch will just go
    positive instead of floating.

    Al Williams
    AWC
    * Control 8 servos at once
    http://www.al-williams.com/awce/pak8.htm



    >
    Original Message
    > From: Allan Lane [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9PUoroKS6R2n_48Opg0RMvSdY142O1tSuFidxBd0OXiW6vlhNtoFbYpYM0_neLryIeLJAxH3M2N-p2_Ysw89fWPfl3o]allan.lane@h...[/url
    > Sent: Tuesday, June 24, 2003 12:11 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Output pin glitches
    >
    >
    > In 'sleep' (or 'end') mode, the BS2's watchdog times out,
    > as Mr. Williams has pointed out. In 'Stop', or in
    > continuous looping, this does not occur.
    >
    > BTW, you can get around this limitation by adding a
    > 10K or 20K ohm pull-up to +5 volts to the pin in
    > question. Since the pin briefly becomes an
    > input (high-impedance), an external pull-up
    > will hold the value during the watchdog
    > timeout period.
    >
    > --- In basicstamps@yahoogroups.com, harshit suri <suri_list@y...>
    > wrote:
    > > I have noticed that the output pin of the stamp BSII glitches to low

    > > every 2.1 Seconds. The setup is simple: the stamp is powered from a
    > > stable 9 Volt power supply. code is simply :
    > >
    > > high 7
    > >
    > > when u monitor pin 7 using a non - triggered rolling
    > > mode of the scope ...a high to low glitch pulse every
    > > 2.1 seconds occurs.
    > > I have heard of someone else having the same problem. Kindly
    > > advise..i have checked and the stamp does not reset so the problem
    > > is surely somethings else. what am i missing here?
    > > thankyou
    > >
    > >
    > >
    > >
    > > __________________________________
    > > Do you Yahoo!?
    > > SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.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/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-24 23:01
    When a Stamp pin is driving a relatively high impedance load, I
    usually use a small capacitor to free-wheel through the reset glitch.
    That way it can hold either the low level or the high level briefly
    as required and not drain current in the opposite state as does a
    pullup/down resistor.

    The answer to "why" the glitch occurs is that it is an artifact of
    the PIC16C5x that the Stamp is based on, and also the SX28 and SX48
    chips that form the multibank enhanced stamps. All resets, including
    the watchdog reset, turn the pins to inputs. It is not something
    that Parallax added later. Incidentally, the glitch is much shorter
    on the BS2pe, 0.25 millisecond instead of 18 milliseconds--that can
    be done on the SX48 chip.

    (Also, incidentally, more recent PIC chips (16C6x and later) hold
    the contents of the direction register through a watchdog reset,
    instead of forcing them to inputs.)

    -- Tracy







    >A pull up resistor will only fix the problem if you intend to leave it
    >high. If the pin is supposed to be low, then the glitch will just go
    >positive instead of floating.
    >
    >Al Williams
    >AWC
    >* Control 8 servos at once
    >http://www.al-williams.com/awce/pak8.htm
    >
    >
    >
    >>
    Original Message
    >> From: Allan Lane [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=E4uccUzel794cFeMZcSz46R8791LlqrxswptlNf5vtew8xHH4J5PlVtRArd3jmbd400hcp0j6u4eW9l7RZQ6z4Z2KcCbUw]allan.lane@h...[/url
    >> Sent: Tuesday, June 24, 2003 12:11 PM
    >> To: basicstamps@yahoogroups.com
    >> Subject: [noparse][[/noparse]basicstamps] Re: Output pin glitches
    >>
    >>
    >> In 'sleep' (or 'end') mode, the BS2's watchdog times out,
    >> as Mr. Williams has pointed out. In 'Stop', or in
    >> continuous looping, this does not occur.
    >>
    >> BTW, you can get around this limitation by adding a
    >> 10K or 20K ohm pull-up to +5 volts to the pin in
    >> question. Since the pin briefly becomes an
    >> input (high-impedance), an external pull-up
    >> will hold the value during the watchdog
    >> timeout period.
    >>
    >> --- In basicstamps@yahoogroups.com, harshit suri <suri_list@y...>
    >> wrote:
    >> > I have noticed that the output pin of the stamp BSII glitches to low
    >
    >> > every 2.1 Seconds. The setup is simple: the stamp is powered from a
    >> > stable 9 Volt power supply. code is simply :
    >> >
    >> > high 7
    >> >
    >> > when u monitor pin 7 using a non - triggered rolling
    >> > mode of the scope ...a high to low glitch pulse every
    >> > 2.1 seconds occurs.
    >> > I have heard of someone else having the same problem. Kindly
    >> > advise..i have checked and the stamp does not reset so the problem
    >> > is surely somethings else. what am i missing here?
    >> > thankyou
    >> >
    >> >
    >> >
    >> >
    >> > __________________________________
    >> > Do you Yahoo!?
    >> > SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.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/
    >>
    >>
    >>
    >
    >
    >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/
Sign In or Register to comment.