Shop OBEX P1 Docs P2 Docs Learn Events
How do you create a system log on the memory on the stamp — Parallax Forums

How do you create a system log on the memory on the stamp

NiallNiall Posts: 7
edited 2008-11-27 16:24 in BASIC Stamp
Basically i want to monitor the performace of my code and save it to a log file on the memory of the stamp. Then access the file another time
Just wondering if anybody could help me with this

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-27 12:53
    Niall -

    There really isn't anything to monitor that is internal to the Stamp. What was it you had in mind to monitor - some external events?

    If so there are a couple of options. You can insert HIGH/LOW statements to activate a pin port and use that as an external indicator for breakpoints in your programs although the Stamp will continue processing unlike traditional breakpoints you may be used to where execution stops. Usually this is done with the DEBUG commands, which is used in lieu of breakpoints, but that takes quite a bit of time to display whatever you are tracing. BTW - There is no real trace facility as there may be mini-computers or mainframes.

    Along with that, or separately, you can use an oscilliscope to measure things like time durations, pulse widths, and similar outputs from the Stamp. Any of this data would have to be acquired and processed by your program which would be external to the Stamp.

    There is one exception to this. There is a FREE plotting program named "Stamp Plot (Pro)" which will graph and/or collect any information you might chose to send it. Here is a link to that program, if that fits your needs:
    www.selmaware.com/stampPlot/home.htm

    The commands to utilize Stamp Plot are standard PBASIC Commands. That is INDEED done from within the PBASIC Program which is executing.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • NiallNiall Posts: 7
    edited 2008-11-27 15:31
    sorry i didnt make it very clear,
    Basically i will be using my serial port connection to control an external modem that will be sending a SMS message, for the purpose of problem solving i wanted to be able to monitor replies from the modem such as confirmation that the message sent or any error messages and to save them so i can check when trying to debug a problem
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-27 15:40
    There's very limited memory internal to the Stamp and it's shared with the program itself. For the BS2, it's only 2K. For most other Stamp models, it's 16K and, for the BS2pe, it's 32K. You can access the memory from your program using the READ, WRITE, and STORE statements. Read the chapters in the Manual on these for details.

    Other options include adding external EEPROM to I/O pins and the use of external datalogging devices. Parallax sells the USB Memory Stick Datalogger which interfaces to a standard USB thumb drive and allows you to write or read PC compatible files. Several other manufacturers have devices that allow you to use SD cards for the same sort of thing. Hitt Consulting has one (www.hittconsulting.com/sddatalogger.htm).
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-27 16:24
    Niall -

    I'm still not exactly sure how you want to do the monitoring. If you want to monitor the serial port, here is a software datascope you can use for free. It's Demo-Ware, so as long as it's not used for commercial purposes, you're OK. Here it the link to it: [noparse][[/noparse]url/http://www.win-tech.com/html/monitor.htm/url]

    If that's not what you had in mind, my apologies for taking up bandwidth.

    Regards,

    Bruce Bates


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
Sign In or Register to comment.