Shop OBEX P1 Docs P2 Docs Learn Events
A chip 'like bs2' — Parallax Forums

A chip 'like bs2'

mouzgmouzg Posts: 21
edited 2009-10-01 09:18 in BASIC Stamp
Hi i have kind of a weird question.I have a very expensive chip programmer (my father bought it for his work) hav iu heard of an innexpensive chip like bs2 (same clock freq same ram size same eeprom size)???and is it legal to copy a bs2 program (that i made) to an non bs2 chip using my beeprog+ ?????

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-09-29 22:50
    Not sure what you are talking about. It might help if you could include several large, clear pictures for us to look at.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ZootZoot Posts: 2,227
    edited 2009-09-29 22:58
    A non-Stamp PIC/SX will not run a Pbasic Stamp program. Stamps are "pre-burned" PICs (BS2) and SXes (other Stamps) which run an interpreter program. In other words, the Stamp is not actually running *your* program, it's a running a program that itself fetches a version of your program from an external memory chip, "interprets" each instruction of the program and then does what that instruction dictates.

    The "real" program burned into Flash on the chip is protected and is really what Parallax is selling -- the actual hardware in the Stamp is not the major cost of a Stamp (in the end it's a micro worth $2-$5, a regulator, an eeprom, and brownout detector and few external transistors, resistors, capacitors).

    So, work backwards. Find out what kind of chip (family/families) the programmer will program, then go read some datasheets and see what micros in those families meet your needs (e.g. ram/flash space/ee space/cost/language) etc.

    To my knowledge, outside of the Stache (a kind of field-programmer for Stamps and tokenized Stamp programs) or a serial connection to a PC that is running software which will download a tokenized Pbasic program, there are not alternatives to programming a Stamp.

    (Of course, you could solder up your own programming interface to the PIC or SX on a Stamp module and reprogram it -- BUT THEN YOU WOULDN'T HAVE A STAMP anymore -- you would have a PIC or an SX on a very nice dip board with a built-in power supply and level shifter for serial comms to a PC port).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • mouzgmouzg Posts: 21
    edited 2009-09-30 16:26
    I think that a stamp can be programmed through my programmer using ISP (in system programmer)..The broblem is thati i cant programm in machine language...if i could, i would programm as many chips i wanted with no cost (2-3 usd each)..So i have to stick to the stamp untill i learn more in programming and in machine language...Thank you Zoot very much..Its the second time you help me...
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-30 16:31
    You can't program a Stamp with an ISP. If you try to do so, you will erase the PBasic interpreter already in the Stamp's microprocessor and the only way to restore that is to send it back to Parallax. Yes, you could write your own machine language program and program that into a Stamp, but it's a pretty expensive way to get a microcontroller since most of the value of a Stamp is the PBasic interpreter.
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-09-30 16:32
    Some PICs support ISP -- the 16C57 the BS2 is based on I'm not sure about. In any event, what has been said before is true -- the BS2 PIC chip is one-time-programmed with the Parallax proprietary "PBasic" environemnt. That environment knows how to read and write an external EEPROM which holds a tokenized version of your PBASIC program, and 'execute' it.

    Now, you CAN purchase additional tools (MELabs has some) which would let you program a PIC chip in Basic or C, compile that program into PIC assembly, download that code into a PIC, put the PIC onto a board with a resonator and an RS-232 driver chip and off you go. But you're going to spend way more than the $50 or so of a BS2. If you're going to sell more than 20 boards to somebody, it might make commercial sense to do that. If you're simply building one or two robots, the BS2 is the way to start out.
  • mouzgmouzg Posts: 21
    edited 2009-09-30 16:47
    My first plan was,program a chip in an easy to use enviroment..and then copy the chip program to many others using my programmer...this dropsdown the costs to almost zero...
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-10-01 00:19
    Yes, and you can do that, just not with the Parallax BS2 environment. If it's any consolation, this occurs to quite a few people, myself included. But most of them listen to the advise not to try to use the Parallax BS2 stuff that way.

    It's also true that the Intellectual Property is not free -- as I say, www.melabs.com will sell you a compiler and a board and the empty PIC and the kit of parts (resonator and RS-232 driver chip, mostly) to let you do this. Then each hardware platform can be built for about $10 or less depending on the cost of the board. But you'll still need to spend about $300 once for the compiler.

    So if you're building a lot, it makes sense to go that way. If you're building one or two, a $50 "complete solution" in the BS2 is very worthwhile.
  • mouzgmouzg Posts: 21
    edited 2009-10-01 09:18
    thanx allanlane5, thats what im going to do.Thanks for the advice...
Sign In or Register to comment.