Shop OBEX P1 Docs P2 Docs Learn Events
My Basic Stamp change the code without my licence (or permission) — Parallax Forums

My Basic Stamp change the code without my licence (or permission)

JoeJoe Posts: 184
edited 2008-06-27 14:18 in BASIC Stamp
Hi,

I have a Basic Stamp 2 ( BS2-IC) module with four servos
with two ultrasonic sensors from Parallax (called Ping) and about each 2 moths
the Basic Stamp doesn't execute
the same code instead of that, the Basic Stamp execute
a part of the code (not the entire code)

The code is very simple.

I would like to know if some kind of interference could be
the problem of that because it is very unusual.

I check many times the cables, code and all is Ok.
Even I load an other code (more simple) and I have the same
problem.

I saw batteries and they are charged.

But perhaps , I am not using a condenser protection for the servos
like the item "Board of Education" . Do you know if that could be the problem?

Thanks, Joe

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-26 20:07
    What you describe is usually a power supply problem. Without a schematic and source for your program, it's hard to tell for sure.
    Servos can draw a lot of current for a short time (over 1A peak) and their average current while moving is something like 250mA.
    With 4 servos plus some other loads, that's more than 1A average. If you're running this through a regulator, it may overheat and
    shut down occasionally. If you want specific suggestions, attach a schematic of your system and include (as an attachment) the
    simplest source program that illustrates the problem.
  • JoeJoe Posts: 184
    edited 2008-06-26 21:26
    Thanks, but

    A power supply problem could be the problem when servos are
    working but my problem continue even after I
    am using the Basic Stamp alone (without servos and without
    sensors)

    Even if I take the Basic Stamp and put it with
    other power supply in a different board.

    For this reason I think that it is difficult
    to think that the problem is the power supply.

    Do you know if a temporal problem with a power supply
    like an occasionally shut down problem
    could cause a "permanent lose of code" problem ?


    Thanks, Joe
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-26 22:31
    No

    The Stamp has a "brown out" detector on the module that holds the processor in reset if the supply voltage is too low to function properly.· That prevents any change in the EEPROM with power supply problems.· The EEPROM also has its own low voltage detection circuit and will not start a write cycle if it can't complete it due to low voltage.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-27 14:18
    The only way you could have a "permanent loss of code" is if you're using the eeprom "WRITE" command in your program, and your code lets it "get away" and start "over-writing" your program code. This CAN happen, but ONLY if you're using the eeprom "WRITE" command in your code, and using it wrong.

    Otherwise, I believe it's impossible for your program code to be over-written in the eeprom during normal use.
Sign In or Register to comment.