Shop OBEX P1 Docs P2 Docs Learn Events
bs2 question and a pic qestion — Parallax Forums

bs2 question and a pic qestion

zemkaczzemkacz Posts: 19
edited 2007-11-01 00:52 in BASIC Stamp
i know the bs2 uses an onboard interpreter, what xactly does this interpriter do? can i use a interpriter for another pic microcnotroller?

also, would i be able to power a dc moter thats prety small, used in an old cd drive for opening and closing it, with a transitor and another powersupply but using the bs2 as the "trigger" for starting the motor?

lastly is the thing that u could only program the b2 like 1000 times before it starts to slow down extremely and wont be able to be programmed again?

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-31 23:55
    you can think of the interperter as the "CPU" of the microcontroller... it is the "brains".

    Yes, you can CONTROL all types of motors with a Stamp... as you noted, you need to use a motor controller or a transistor circuit.

    The Stamp can only be reprogrammed a limited number of times, but it is more like a 100,000... I have never heard of anyone who wrote so many programs, that they wore out their Stamp, so I would not worry about it.... and no, it does not slow down after many reprogrammings... it just won't let you program it anymore.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-11-01 00:52
    The BS2 is a 'module', that has on it a 16C57 PIC chip, along with some other components -- a resonator, an eeprom, a brown-out reset circuit, and a few transistors and resistors. In the on-chip eeprom is programmed the PBasic interpreter firmware, which knows how to 'load' bytes into an on-module eeprom, and 'read' bytes from the on-module eeprom in order to 'execute' them with the on-PIC interpreter firmware.

    You can't use the "interpreter" firmware on another PIC chip -- it's programmed inside the PIC already, and can't be read from there. This is Parallax's Intellectual Property, and the only part of their equipment that they don't publish. Everything else -- hardware schematics, how to use the module, etc -- is published and has excellent tutorials.

    And yes, with a transistor you can interface an external motor to the BS2.

    And yes, the on-module eeprom can only be reprogrammed 100,000 or a million times -- but that's not a problem, really. It IS possible to write to the on-module eeprom from a program -- and in that way 'wear out' a location on the eeprom. A "worn-out" location in the eeprom won't hold its data anymore -- it will always read 'zero'.

    But merely through programming it, you won't wear it out. It certainly doesn't "Slow down".
Sign In or Register to comment.