Bizarre BS2 output pin pulse
Archiver
Posts: 46,084
I seem to be having a weird problem with the BS2's output pins. On
any given pin, everything is fine until I send a high pulse to that
pin. The pin responds with no problem to the pulse. The problem is
that after the pulse the pin will continue to output a pulse about
once per second, almost as if it's stuck in some sort of loop. It's
not a series of random states, but instead seems to be clocked by
something. The only ways I've found to stop this behavior are
eihter to place the pin in input mode or reset the chip. Has anyone
out there run across this or know what might be causing it? It's
playing havic with my drive motors.
Could this be noise from somewhere? Defective chip? I've tried
disconnecting everything and the behavior still occurs.
chip is BS2 OEM Rev. A1 version
power source: battery
any given pin, everything is fine until I send a high pulse to that
pin. The pin responds with no problem to the pulse. The problem is
that after the pulse the pin will continue to output a pulse about
once per second, almost as if it's stuck in some sort of loop. It's
not a series of random states, but instead seems to be clocked by
something. The only ways I've found to stop this behavior are
eihter to place the pin in input mode or reset the chip. Has anyone
out there run across this or know what might be causing it? It's
playing havic with my drive motors.
Could this be noise from somewhere? Defective chip? I've tried
disconnecting everything and the behavior still occurs.
chip is BS2 OEM Rev. A1 version
power source: battery
Comments
does your program terminate? If you put the following immediately
after the PULSE statement and/or at the logical end of all
processing does it help?
here: GOTO here
Also, try putting the following at the beginning of your program:
DEBUG CR,"Start"
This will let you know if your program is resetting due to, for
instance, power problems associated with the pulse generation.
If problems persist, feel free to post your code for review.
Regards,
Steve
The BS2 does have a watchdog timer, which when
it wakes the chip out of 'SLEEP', briefly sets
all pins to input, then puts them back to the
state they had before 'SLEEP'. The result, if you
don't have a resistor to hold the state, is a
glitch on the output line.
The solution to this problem is to put a 20 KOhm
resistor from the output line to ground (if your
pin idle state is a 0).
On the other hand, it could be 'ground bounce'.
If you have some other device pulling large current
once a second, it could affect the ground of the
BS2 enough to get a pulse.
--- In basicstamps@yahoogroups.com, "max2451234" <jjghost@t...> wrote:
> I seem to be having a weird problem with the BS2's output pins. On
> any given pin, everything is fine until I send a high pulse to that
> pin. The pin responds with no problem to the pulse. The problem
is
> that after the pulse the pin will continue to output a pulse about
> once per second, almost as if it's stuck in some sort of loop.
It's
> not a series of random states, but instead seems to be clocked by
> something. The only ways I've found to stop this behavior are
> eihter to place the pin in input mode or reset the chip. Has
anyone
> out there run across this or know what might be causing it? It's
> playing havic with my drive motors.
>
> Could this be noise from somewhere? Defective chip? I've tried
> disconnecting everything and the behavior still occurs.
>
> chip is BS2 OEM Rev. A1 version
> power source: battery
jjghost@t... writes:
> I seem to be having a weird problem with the BS2's output pins. On
> any given pin, everything is fine until I send a high pulse to that
> pin. The pin responds with no problem to the pulse. The problem is
> that after the pulse the pin will continue to output a pulse about
> once per second, almost as if it's stuck in some sort of loop. It's
> not a series of random states, but instead seems to be clocked by
> something. The only ways I've found to stop this behavior are
> eihter to place the pin in input mode or reset the chip. Has anyone
> out there run across this or know what might be causing it? It's
> playing havic with my drive motors.
>
> Could this be noise from somewhere? Defective chip? I've tried
> disconnecting everything and the behavior still occurs.
>
> chip is BS2 OEM Rev. A1 version
> power source: battery
>
Post your code, lets have a look
[noparse][[/noparse]Non-text portions of this message have been removed]