Shop OBEX P1 Docs P2 Docs Learn Events
BS2e memory loss??? — Parallax Forums

BS2e memory loss???

Peter RandPeter Rand Posts: 20
edited 2008-01-07 16:48 in BASIC Stamp
I program my BS2e (RevD) on a parallax carrier board to drive one servo motor.
For space reasons I move it to a 24 pin IC socket. There I use only 3 pins, Vin, Vss and P15 - all other pins of the socket are sheared off - and I include a on-of switch on the positive line in from a 9 volt battery.
It works there on installation, and I can switch it on and off, and it will run as a looped program for many minutes. After some time however in the off position it fails. It just gives one brief movement on switch-on. If I return it to the carrier board it fails. If I reprogram it, it's ok on carrier board and 24 pin socket. But its memory fails again with time in the off position?
Why is its memory volitile? Is there some other connection I'm missing on the 24 pin socket configuration?

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-07 15:52
    Peter -

    Are you powering the servo from the same 9 volt battery that's powering the Stamp? If so, the servo may be causing a brown-out which is causing the Stamp to RESET. The solution is to power the servo from a separate source (remember to tie both grounds together) and that should eliminate the brown-out RESET.

    You can prove that this is the case by putting the following as the first instruction of your program: DEBUG "Starting"

    If the word "Starting" appears more than once during any iteration of the program, the Stamp IS being RESET.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Peter RandPeter Rand Posts: 20
    edited 2008-01-07 16:21
    Bruce - Thanks - I am using one 9- volt battery for both. I thought that was OK since that runs the servo for many minutes continuously. It is only when I switch OFF the power for some several minutes that the memory seems to be gone when I switch it back on. That is happening on the carrier board now too. Pushing reset on the carrier board does not recover it. All recovers back to normal immediately when I reload the program. Somehow the program is "leaking away" when the power is off!!
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-01-07 16:48
    I think you need to connect the ATN (aka "RESET") signal to Vdd through a 10 KOhm resistor. Check the BOE board schematic.

    The program can't "leak away" from the eeprom -- but an incomplete 'reset' on the BS2 can cause problems. Oh, and I assume you're not writing to the EEPROM yourself using the "WRITE" keyword -- if you do you CAN over-write your program.
Sign In or Register to comment.