Shop OBEX P1 Docs P2 Docs Learn Events
BS2, few general questions — Parallax Forums

BS2, few general questions

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2012-09-07 12:36 in BASIC Stamp
Ok so im fairly new to micros but not coding, and especially not basic... I started using GW-Basic and QBasic around 11/12 then moved to vb around 16, im now 28. So Im pretty confident the bs2 is gonna fit me like a glove with very little learning curve, I have been using micros for the last 6 months, but only the propeller and a little AVR here and there...

So today I won a BS Activity kit with the 2.2 book. First off I was wondering if the version 3.0 book is alot better or what the deal with that is?? Ok, secondly and most importantly!!!!!! Now that I will have this bs2 homework board I am thinking about using the bs2 where id usually use a small 8 but AVR to interface to a propeller, So I guess what I need to know is can I just program the chip on this board then pull it out and throw it on a custom pcb easily? And if so... Is it cheap to do this? I mean an AVR is like 4 dollars and lower can I get the bs chip and just program the bootloader on it for cheap? The parallax store sells the BS dips for 10 to 17 bucks, at that price its cheaper to just use another propeller.. even if its not to cost feasible to use a bs2 to serve a function like decode a keypad and then send it via 1 wire to the prop im sure it will still be such a blast to prototype things with im really looking forward to this, im not sure why I never got one earlier I dont really understand the bs2s relation to SX and that scares me a little I think. And the last question, can you use assembly language on the bs2 at all?

Comments

  • RDL2004RDL2004 Posts: 2,554
    edited 2012-09-06 06:05
    You can download the newer version of the book as a .pdf
    The Activity kits use Homework boards, the chips are soldered to the board.
    The BS-2 is a pre-programmed SX chip runnning the PBasic Interpreter software.
    I'm not sure if you can use assembly on a BS-2.
    If possible it would be a huge amount of trouble and would over-write the pre-programmed PBasic.
    I don't think it can be used within a PBasic program.


    edit: oops, my bad. I forgot the BS-1 and BS-2 actually use a PIC as Mike says, and only the later versions of the BS-2 use an SX
  • Mike GreenMike Green Posts: 23,101
    edited 2012-09-06 08:22
    The BS2 (like on the Homework Board) is a preprogrammed Microchip PIC16C56 microprocessor plus an EEPROM and Crystal or Resonator. You can download a new assembly program to the PIC with the appropriate programming hardware (see Microchip's website), but then it wouldn't work as a Basic Stamp and, other than sending the chip back to Parallax for reprogramming, it couldn't be used again as a Basic Stamp.

    Beginning with the BS2sx model, the PIC was replaced with an Scenix SX microprocessor and the BS2p/pe/px models continued this. Each new model added features to PBasic. In some cases, the EEPROM size was changed. In some cases, the SX would be run at a different clock speed. In each case, the code of the preprogrammed PBasic interpreter was changed.

    Parallax has used a combination of a BS2pe with some AVRs as peripheral processors ... works well. The AVRs come preprogrammed with a useful utility interpreter, but you can modify that or change it out for some other AVR assembly program. The source is available.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-06 13:16
    So im still a little off base on this just want to make sure im thinking about all this correctly, as far as the feasibility of using the bs2 and a second chip to complete simple tasks, in conjunction with a propeller or maybe even ARM. And im still a little lost as to wether the bs2 will be around for a while or not.

    From your explanation and looking around the OEM subsection of the basic stamp part of the store, im under the assumption there is a basic stamp which uses a pic16f this would be the same bs2 found on the homework board. There are also bs2s using different types of SX microcontrollers. Now the SX line has been announced EOL if im not mistaken. So this means that when parallax stash of SX chips is gone thats it for the bs2s that use the sx architecture. That leaves us with only the pic 16f bs2? I mean parallax could start putting the bs2 on a pic32 tomorrow I am just saying from what we know right now this is the case to plan for. Now if I built a product next week and wanted to include the bs2 on my design my safe bet would be to stick with this chip correct, this is the same chip thats on the homework board?

    Ok here is the second thing im trying to get a grip on. When you set up a propeller all you need is the chip, a crystal, and an eeprom. The propeller is programmed via a serial connection and has a boot loader built into it, that way it can start up spin and grab infor from the computers serial port via its uart. So if you were to build a product built around a propeller you would spend about 10 dollars to add those three components to each board, and you could then program each board using a prop-key, i know this is a stupid way to mass manufacturer programmed prop boards but stick with me... So at the cost of $10 dollars i have super powerfull product that can use a propeller chip!!

    Now lets say I used Arduino instead of a prop. I could go buy 10,000 Arduino boards but that seems impractical and fairly expensive not to mention bulky. Soo whats a guy to do if he built his product on an Arduino? Well lets take a look at what ardunio is... its an atmel avr chip specifically atmega128/328 chips I believe, that someone has programmed a custom boot loader on too, that allows it to be programmed via serial and understand a Higher level language than ASM and plain old C. Sort of the same thing as the prop only the boot loader isnt hard coded into the silicon its written on to the chips flash memmory. And the arduino boot loader is open source and free! So this mean if you develop a product using the Arduino you don't actually have to use an Arduino board in your product or even buy an Atmega chip from the Arduino guys that has the boot loader programmed on to it. You as a mass manufacturing developer source your Atmega128/328 for 1 dollar a piece in quantity (probably more like 2.75, there 4 a pop for a single last time a bought one) from a parts house like Digi-Key, along with some crystals and caps. You then program your chips using a $5 e-bay programmer with the open source Arduino boot loader. So now you can take your prototype of this rediclously big board made in Italy and fit it in a very small space with in any project.

    Ok so nowww to the BS2! It is my understanding the BS2 is basically a bootlader like Arduino except it uses pic chips or sx chips instead of atmel atmega's! I personally dont know much about what an SX is, but I do know about PIC and I like that choice alot more than I like avr's! Basically from what I can understand from the post above mine the BS2 bootloader is not open source (which is ok its a business decision) but you cant even get it in binary form, like a hex file???!! So lets say I build a graphing calculator, and lets say I use the propeller (cuz I love parallax!) for the main chip but I need 50 buttons and the propeller doesn't have that much I/O. Plus the prop is busy doing math I don't even wanna waste too many cycles or to much hub space on anything to do with buttons. This sounds like a job for a bs2 and some shift registers!!! I can use the bs2 to read the shift registers handle all the multiplexing code for the 50 button and then have it send the button presses to the propeller via 1 wire serial, that way my prop only loses 1 I/O and doesn't have any space wasted in its memory for shift register drivers and multiplexing code and yada yada. This is awesome because im sure it took no time at all to set this up on a BS2, since im quite good with BASIC (embarrassed to say that but its sadly true). I used my homework board to prototype this hole thing out, and Im excited to get the this onto the rest of the PCB with the propeller. Now your telling me that instead of being able to use a pic-kit to program the bootloader onto a pic16F I have to buy this chip??!!! This thing is 16.99!!! Granted some of the SX based bs2 chips are only $10 but as I asked above what is going to happen to SX based bs2s? Is this really my only option to use the bs2 as a supporting uController in projects?? These Basic Stamps were popular for along time!!! It seems to me that 16.99 is huge price, its 11.85 in quantity of 100x.. but still this is a dollar twenty pic! I understand the price isnt all the hardware it also pays parallax for the software and there labor burning the chip, but im gonna say the propeller is alot better intellectual property and there not charging nearly this for it, not only that by why is the pic one so much more than the SX?!! Isnt the SX technically better??

    I love parallax and im not b*tching they make the bs2 open source like arduino. I guess im just asking if my assumptions on all this are right? And if they are maybe someone from parallax will see this and explain why the inferior $1.25 pic16f is way more than the SX based bs2. It seems like there has to be a better cheaper way to use the bs2 in a big project as a support chip. I would pay more to use it than the2.50 for an avr or PIC because of it convienece, but why would I pay more than a propeller, having a second prop as a support IC isn't always a great answer because its overkill. The bs2 seems perfect for small projects and small support systems but the pricing doesnt not seem to allow for it to be used in that way. I will still be using a bs2 for its own simple projects and definitely quick prototyping I thinks its the bees knees ;) for that!!
  • W9GFOW9GFO Posts: 4,010
    edited 2012-09-06 14:25
    I can't answer why a Basic Stamp chip is more than a Propeller. I wish they were much cheaper, especially since I need to buy 50 or more pretty soon.

    A few years ago a very prominent forum member pointed out a program called PIC Basic Pro. It allows you to program all manner of Microchip PICs in a basic language very similar to Parallax's PBasic. In fact they reference Parallax's documentation frequently. It is not as easy to use - but once you get it figured out it works well.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-06 16:30
    Ya ive acually seen that after I read this thread and did some research trying to find out if there was a bs2 hex file. It just doesnt make seanse to me like a bs2 is pretty old and limited compared to alot of other micros with bootloaders built in. This just seems like a no brainer for parallax, if someone wants supporting chips for the prop why not make them bs2s instead of avrs or msp430s or whatever is reasonably inexspensive.. I mean a picaxe is only like 8 bucks and its a pic with a bootloader. It just seems like good buisness to help people use make there boards with all parallax ucontrollers. I was really hoping I could use the bs2 as my little chip in big projects, ive been so disapointed with the cheap msp430. 8 or 16 bit PICs or AVRs are a decent choice but a bs2 would just make life so much easier for alot of simple stuff that can be unloaded from a full blown Propeller or ARM setup.

    Like I said im not bashing parallax on this by any means and I dont want anyone to think that. Im just somewhat confused by this. If i were gonna use a pic id pay 1.25 in singles im sure parallax gets them alot cheaper so why not charge us 5 bucks a chip for convience of there bs2 bootloader?? There would be so many kits out there using a Prop and Bs2! At 16 bucks I could buy 2 props or almost a model A Rasberry Pi and turn the propeller into the support chip! Even if the pics were 8 I think itd be worth it to me, but if I were gonna mass produce something which I hope to do with parallax products someday the price of using a bs2 adds 12 dollars to the consumer. Mind you these are in single prices. But the reality in bulk is the same as the bs2 drops down to 12 bucks at one hundred its base chip the pic16f drops to 81 cents! So someone who wants to prototype and make as little changes as possible may be inclined to buy the pic and then turn around and port there code to PIC Basic Pro, where as parallax could have had all the profits if there price was a bit lower.

    Maybe the bs2 is priced this way is becuase it is older and its targeted twords education, so theres less competion. In that arena it only has to compete with the Arduino and PICAxe.. I look at it this way though if I invest my time learning something out side of school I want it to be a marketable skill, and im sure some kids learning on a bs2 in school would like to use there bs2 as a consultant or in a commercial product. If the pricing has something to do with the educational market maybe parallax could do some kind of liscensing to allow people using the bs2 in a commercial project to burn the boot loader to there own pic. Im not an engineer and I have yet to push out a kit (im workin on it) but all the engineers I know say alot of engineering is designing something to the best of there ability and doing it for as little as possible. This means it more commercially viable to use PIC Basic Pro and a pic-kit or whatever, and this seems like a whole lota money that parallax is losing, especially since id think most people using PIC Basic Pro started with a basic stamp and would probably stay using it if it were commercially viable for there projects.

    I think im being so opionated on this becuase Im really excited to get this kit I already started reading the PDF online. Im excited becuase It seems like when I wanna write code to explore new hardware I can get it done QUICK with almost no learning curve using the basic stamp. I have no intrest in robotics I didnt even know what a servo really did till I read it in the What is a MicroController book for the BS2 last night, but I sure figured out what a servo does real quick and how to controll it! If the BS2 will make learning the newest chip I got in the mail this easy to get accquaitnted with Im all for using it as much as possible to explore new hardware that way when I go to write a driver for the propeller I already know whats going on. If the bs2 did a good enough job with the new chip If it were feasible id just slap it on on the pcb too instead of writing a prop driver! Its seems like a really cool product im really excited about getting one, but it makes me really sad that the price to power ratio makes it almost impossible to use in a product, unless its the only uController even then though im not sure...
  • Mike GreenMike Green Posts: 23,101
    edited 2012-09-06 16:49
    There are all sorts of questions that you raise, but embedded in your post. I'll try to answer a few that I remember.

    1) Parallax has a very large stock on hand of SX chips. Based on their current and projected demand for the SX-based Stamps and other products that use the SX, I believe they have about a 10 year supply if not more. That's nearly forever in this business.

    2) The Spin Stamp requires two voltage regulators, an EEPROM, a Prop chip, and a 10MHz crystal plus a few passive components. Any of the SX-based Stamps require a voltage regulator, a brown-out detector, an EEPROM, an SX chip, and a resonator plus some passive components (more than the Spin Stamp). The modules are roughly equal in difficulty for assembly and testing. The Stamp module has to have the PBasic interpreter programmed into it while the Spin Stamp just needs to be tested after assembly. The Prop chip is bigger than the SX chip, so costs a little more. Most of the costs are in the assembly and testing, Parallax still needs to make some money from the intellectual property of the PBasic interpreter, so that adds to the cost. If you just buy a Prop chip and the fixings around it, it's much cheaper than a Stamp module.

    3) As W9GFO notes, you can always buy a copy of PICBasic PRO and use that with bare PICs from Microchip. For that matter, you could get free C compilers for most of the microcontroller chips on the market including the PICs, AVRs, and the myriad of others. All are more complex to use than the Stamp Editor, but easy enough if you're willing to choose one and learn to use it. The Basic Stamps still are easier to program, debug, and otherwise use than most of the others. They're well supported and have lots and lots of educational materials and use examples. It's always a tradeoff. You're going to be much more willing to learn well how to use any microprocessor and its support tools if you're going to make 10K or more identical devices and the product isn't likely to change for a few months. If you're going to make at most 10 devices and they're complex and the specification is changing up to the last moment and is not likely to remain unchanged on the market for more than a few months, maybe ease of use and level of support will be more important.

    4) The Propeller is finally beginning to replace the Stamp in many of Parallax's products. The Prop BOE is one example that you'll see more of in the future. The Prop Servo Controller is an example of the Prop replacing an SX. Parallax's (and other folks') products are getting more complex and the Prop will find a place in some of them. The CMUcam4 uses a Prop and Parallax will be carrying its own version of it whenever Kye does his magic again on it. I'm sure the Prop 1 price will continue to drop over time, particularly once the Prop 2 is available, and that will make it more suitable for more products. The Prop GCC compiler / IDE will also help.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-09-06 18:07
    @Mike

    Im not talking about cutting the cost of the spin stamp or any of the dev boards. Im saying there should be some sort of cheaper option to this product

    http://www.parallax.com/Store/Microcontrollers/BASICStampOEM/tabid/135/CategoryID/10/List/0/SortField/0/Level/a/ProductID/12/Default.aspx

    a
    nd maybe its SX brothers. 16.99 is a rather hi price since this chip the pic16f57 is 1.24 in singles, that means parallax is charging over 15.00 dollars for its labor to burn the chip and it software. 15.00 isnt a bad price for a basic interpreter per say... but it makes it very hard for us that would like to use this product as a smaller supporting chip to a bigger system or even build simple cheap products using the BS2 technology most people are so familiar with. Which is nuts this technology is older and not very powerfull these days. I think a pic with a boot loader should be at a cost of 8 or under probably closer to 5, this is PICAxe prices for chips i believe. The funny thing is I wouldnt mind paying 16 for a propeller!! Maybe they could keep selling at this rate if there is a reason to do so (like the education market) but maybe sell a hex file licence for 5 dollars to cut there labor of burning the chip, and make it easyer for the hobbyist or small time developer to build with 100% parallax micros.

    The price on this thing seems so backwards compared to the other products they sell. I mean a propeller is 8 dollars, A javelin module is 18 dollars. There components are only a few cents higher than digi-key prices! Parallax sells everything at a very reasonable price indeed. Not just is there store reasonable but there only gonna make one prop 2 board so the rest of us that want to design and sell prop2 boards can compete. There is just something totally weird about the price of a bare interpreter IC, even to account for IP, im sure the props software was a huge task compared to this and its only 8 bucks with software on it and all. I feel like Im missing something, theres some bottom line im not seeing when it comes to the bs2.

    Although I do take comfort in the fact they have so many SX chips, thats a good thing, If I want to buy an basic interpreter I now feel good about using an SX but those dips are still 13.00 bucks
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-09-07 12:03
    Parallax has been selling Basic Stamps for over 25 years and have built a very successful business over that period of time. I doubt there is much incentive for them to change anything with regards to the Basic Stamp product line. I don't know I'm just guessing, but maybe their pricing is based on a certain amount of profit per interpreter, whether it's on a board or in just a single chip.

    The original SX was basically a high speed version of a PIC16C5x. If cost is a problem and you don't need the support and ease of use provided by the Basic Stamp, your best recourse might be to experiment with a PIC using one of the BASIC compilers available, or something similar. I think you can get a PICkit with a demo board for under $50
  • PublisonPublison Posts: 12,366
    edited 2012-09-07 12:15
    If you want to do a BS2 on the cheap, pair up a Propeller chip and BS2 Functions in the OBEX.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-09-07 12:36
    Publison's suggestion is a good one, but you have to remember that the Propeller is a 3.3V logic device while the Stamps use 5V logic. Most sensors and other external ICs will either work at 3.3V or can be interfaced to a 3.3V microcontroller.
Sign In or Register to comment.