Shop OBEX P1 Docs P2 Docs Learn Events
Large Program Arrrgggggg!!!!!!!! need memory or networking experts — Parallax Forums

Large Program Arrrgggggg!!!!!!!! need memory or networking experts

Grant_OGrant_O Posts: 36
edited 2006-02-16 21:35 in BASIC Stamp
Hi everyone, I am relatively new to Parallax and this is my first post on this forum, but here goes... I need more flash memory!!!freaked.gif·· The program my company expects me to write for this machine·is huge. The basics of·the program·are very simple (just when one input·pin goes high three other output·pins go high with precise delay times between them of a few milliseconds). Sounds easy but they·asked me to include·interlocks for safe operation, sensors to ensure all systems·are running, maybe·data logging on those sensors,·accelerometers to detect if the translation stage has crashed, and pots to control the delays .smhair.gif·
·
I'm sure that I need more then one stamp module to run these functions. And I have thought of a few ways of getting around this problem but I really need some input! An idea that sound really good right now is networking.
·
The machine that we are building is an X-Ray CT scanner and I volunteered to do the interfacing!!
Please Help!

Comments

  • Jeff DegeJeff Dege Posts: 85
    edited 2006-02-16 04:23
    If you're going to be working in this area, there is a paper you should read:

    An Investigation of the Therac-25 Accidents
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-02-16 06:31
    Grant_O -

    You don't state whether you feel you're going to need more program memory, or memory for data storage. The latter is no particular problem, as external EEPROMs can be added to the Stamp using either the I2C or SPI/Microwire protocals, as you see appropriate.

    The Stamp BS-2 has 2K of memory which is estimated to be about 500 instructions. Unlike processors which use assembler or low level instruction sets, where one or two instructions don't do much at all, the Stamp uses an interpretive language, PBASIC, which has some VERY powerful instructions and some instructions can do an amazing amount of processing work all by themselves. A lot can be done with ~500 instructions.

    If you need more programming memory than that, the more advanced Stamps use a banked memory technique to provide it. Any of those Stamps will have 8 x 2K of program memory which loosely equates to about 4000 instructions. Few folks have run out of memory with that much available, since one instruction can do so much, as noted above.

    Personally, unless it was a low cost, low power application, I wouldn't use anything less than a BS-2SX on a commercial project. The BS-2SX is the lowest cost Stamp with an 8 x 2K banked memory profile.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • stamptrolstamptrol Posts: 1,731
    edited 2006-02-16 12:40
    Grant,

    The BS2 has handled a boat control system for me with over 600 lines of code. It had the same type of control delays you're talking about to start, stop, reverse two drive motors without blowing something up.

    Having said that, I'd still opt for the BS2sx if you're still at the development stage. It will give you a lot more program space, more variable space, runs faster.

    Tom
  • Piper984Piper984 Posts: 74
    edited 2006-02-16 21:35
    Hello Grant,

    You may be very surpirsed just how much you can do with 2K of programming space. I know I always am. I also have found usinig the BS2P series with 2k*8 helps with larger apps. You can't run a single large program, but to can use the other 'slots' to store data elements (like Strings for LCD displays, or numeric lookup tables) and then use the STORE command to switch between the memory areas. You can also use the RUN command to chain together programs in the various slots, and use the Scratchpad RAM to share data between programs.

    In any event, if you do outgrow the BS2P, you can probably port your work to the SX chip without too much trouble. That's what I'm looking to do with a very large B2P40 project I've developed, although not because I couldn't get the BS2p to do the work, but because I want to make qty. 10 of my designs for a market study and the SX chips are WAY cheaper than BS2. Still, BS2s are totally great for development work, or for low quanity custom electronic controller needs. You just cannot beat the BS2 support from both Parallax and these forums when you run into questions.

    Good luck!!
Sign In or Register to comment.