Is there a way to "reset" a program?
I have a BS2 program that includes a Parallax Data Logger. The program runs fine right after I download the program from a pc. When the program is operating correctly, the data acquired from a sensor is stored to a flash drive at regular intervals. My problem is when I switch the stamp's power off and then switch it back on, the data logger has trouble synchronizing and the program hangs up.
I'm wondering if I need some sort of reset at the beginning of the program or something that emulates the process when I download the program from a pc. Obviously, I want to disconnect from the pc so the BS2 is portable and able to run reliably each time it is turned off and back on. Incidentally, I don't switch-off the stamp while the data logger is writing to the flash drive.
Thanks for any help,
Bill
I'm wondering if I need some sort of reset at the beginning of the program or something that emulates the process when I download the program from a pc. Obviously, I want to disconnect from the pc so the BS2 is portable and able to run reliably each time it is turned off and back on. Incidentally, I don't switch-off the stamp while the data logger is writing to the flash drive.
Thanks for any help,
Bill
Comments
Bill
Datalog: '
'DEBUG CLS, "Memory Stick Datalogger Demo V1.0", CR, CR, "Initializing..."
PAUSE 200 ' Allow Time To Settle
HIGH TX ' Initialize Transmit Line
LOW RTS ' Take Vinculum Out Of Reset
PAUSE 600 ' Allow Time To Settle
DEBUG "Synchronizing..."
Would setting RTS HIGH reset the Viniculum? If so, would that be something to try?
Bill
Welllllll...a wild idea.
Would it be possible to initerrupt the Datalogger power with a transistor (or FET) so that a pin from the Stamp drives the xistor, which turns it on/off?
Thanks davejames. I was thinking something similar to your suggestion, but hadn't thought of using a transistor for the switch.
bill