Shop OBEX P1 Docs P2 Docs Learn Events
stamp crashes/hangs, help on avoiding this — Parallax Forums

stamp crashes/hangs, help on avoiding this

Sutton MurraySutton Murray Posts: 88
edited 2006-11-22 07:15 in BASIC Stamp
Greetings
·
I have last night being playing around with the stamp. In the early mornings for some reason I could not keep my eyes open, jumped into bed and left the computer and stamp burning while I dozed away in the bed. I had Chris Savage advance bar code programmed in the stamp. After bed when my eyes started working again I realized that our house had a power failure. The LCD connected to the stamp only displayed a “-“on the screen. The computer was restarted and I noticed that the mouse and keyboard on the computer is not working as it should. The mouse pointer on the windows desktop jumped around on the desktop. After several restarts of the stamp and the computer I changed the keyboard and mouse with another computer, still un-successful. Eventually I unplugged the serial cable to the stamp and the computer was working fine. The stamp I had to download the program again to get it working.
·
My concern, I am not worried about what happens to the computer, but I am very worried about the data stored in the stamp. The power failure caused me to download the program again to the stamp. It is important in one of my project that the data stored are secure for years without any downloads to the stamp.
·
I need to avoid crashes, no matter what happens. Can additional electronics be fitted to prevent crashes like this? What can be done to avoid this?

Comments

  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2006-11-21 15:51
    Sutton Murray--

    If your outages are infrequent, why not buy a fairly good sized UPS and power your computer and Stamp with it? If you do not need the computer powered up, the UPS should power the Stamp for a LONG time.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-11-21 17:39
    Well, in normal use your computer won't BE attached to the BS2 during a power outage, so it shouldn't be a problem.

    In a power-outage, all kinds of weird things happen -- lightning strike, noise on the ground wire, that sort of thing. Traditionally, PC's have NOT been well protected from this -- thus the popularity of UPS's.

    The BS2, being battery powered, or using a wall-wart along with a linear regulator, tends to be MUCH better isolated from wall-power than a PC is.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-21 18:06
    Hello,
    ·
    ·· I believe what happened was as follows…When the power came back on your computer restarted…So did the BASIC Stamp, normally…However, when the computer detected a USB/Serial Device sending data it detected your USB/Serial Device as a Serial Mouse and treated it as such.· This would’ve cause problems on both the PC and BOE sides.· There is no known work-around for this.· If the computer is receiving data from the device at the time of detection it will mis-detect it.· I hope this recovers some of your sanity.· You can also recreate this by simply unplugging the Device while running (If USB) then plugging it back in.· It should be detected as a Serial Mouse.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Sutton MurraySutton Murray Posts: 88
    edited 2006-11-21 20:45
    My stamp will not be connected to the computer at all times, in fact very seldom. Connection to computer wills only occurs to download data from the stamp. The stamp will also be working in a truck so I think a UPS is out of the question.
    I have read somewhere that the stamp might at times hang or have a problem while it gets connected to the computer. I have also seen this happening in the past. If I remember correct, both computer and stamp needs to be switch off when connections are made. It was further more stated that the USB cable will not cause this kind off permanent crashes. At that stage when I have read this, it was already of a concern to me. Now the concern is even more due to the power failure also proved to me that this can cause a permanent crash in the stamp. My thoughts on the more secured USB cable I thought must be due to its additional involved circuitry. This is why I am looking for a protection circuit to prevent this. As like it is in the automotive world, at some stage some clever guy will be removing the battery terminals and/or failed to secure the battery terminals on the truck again. This can end up in a series of un-whished for power pulses. To do the connections according to the book will never be honored as successful, every single time. This is the way of the human race. You probably will have some genius doing his own experiments, just to see if you have told him the truth.

    Is their no way to at lease better the security?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-21 20:55
    Hello,
    ·
    ·· I highly doubt the Stamp is ‘crashing’.· Based on what you described I believe it was in fact the computer mis-detecting the connection that cause the problem.· If the computer toggles the DTR line it will reset the BASIC Stamp.· If the computer is not connected then this shouldn’t have happened.· As for USB not exhibiting this problem, that is not true.· If the BASIC Stamp is sending DEBUG information to a PC, even with the USB connection the PC can detect it as a mouse and exhibit the same problems.· Better security?· I could perhaps offer advice if I was clear on where the security issue is, or at least where you feel it is.· It seems you feel the BASIC Stamp is not secure, although in all my years I have never seen or heard of a Stamp Module crashing that was not subjected to a lightning strike or other catastrophe which would damage any microcontroller.· It doesn’t just crash because the power went out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-21 21:45
    With the FTDI drivers at least, you can usually avoid the spurious mouse detection by unchecking the "Enumerate" box in the advanced setup screen. For USB serial drivers lacking this option, you can also disable the mouse that it detects (but not the port it's detected on) in the Control Panel Device Manager.

    -Phil
  • Sutton MurraySutton Murray Posts: 88
    edited 2006-11-22 07:15
    Thanks for the advice on the mouse detection. This can always be fixed especially now that I have been explained what the computer is trying to do; I thank all of you again. But like previously mentioned, I don’t really care what happens to the computer. The stamp data however is a must. This needs to be downloaded only ones in its life.

    Chris
    After the crash, I disconnected the cable. With the stamp then as a stand alone unit, the power was removed and refitted again. The stamp did not restart. The board the stamp is fitted too is a board designed by my self. I have not build a reset switch on the board as like the ones found on the Parallax boards. I haven’t in dept looked at the switch functionality. Will this switch have gotten the stamp going again, running the stamp with still its original program in it?
    I will try to find the book I have read this about the cables; maybe I understood things wrongly.
    I will be back.
Sign In or Register to comment.