Shop OBEX P1 Docs P2 Docs Learn Events
When basic stamp is not enough, but propeller is not the right direction to move? — Parallax Forums

When basic stamp is not enough, but propeller is not the right direction to move?

CuriousOneCuriousOne Posts: 931
edited 2013-05-08 02:14 in General Discussion
Hello.

When I started with basic stamp, I needed a simple, robust system, which will allow me to care less for hardware and put more focus on actual development. I'm not working nor planning to work with any serious tasks, for which propeller is a good choice. All my activities are much more simpler - say, count number of pulses, measure temperature, etc. The basic stamp is ideal for that, while you're on protoboard. When you will decide to move to finished product, you find that high price of basic stamp modules just makes useless usage of MCU at all? say, I'm doing a device, with total part cost of $4. and pay $12 for MCU ? ($12 only in case if I'll buy only pre-programmed MCU)?

So, I decided to move to something different. Propeller is totally different, and not fitting my needs. I don't need multicore or interrupt support, I need LOW PRICE. So I can take any cheapo $2 MCU, write a program on easilly understandable language for it, burn it and use it.

First, I decided to go with mikroelektronika (MIKROE) and boy, I was totally wrong. While their everything looked great, the $400 I've paid for their PIC Basic kit was absolute waste. They have very bad documentation, very bad hardware quality, and awful support, like you ove them money. Also, development software was idiotic. For example, if you compile project, it automatically being saved, without asking you, overwriting what you have done before !

So, I decided to look at something different. Considering I already have PIC proto board, some PIC MCUs, I decided to go with PIC based solutions. I've downloaded microengineering labs picbasic pro, which looks a bit better than MIKROEs software, but still I found some huge limitations. For example, you can't simply set port #1 high, you have to know port naming of specific MCU being used, deal with register, etc. Do a lot of low level things, that you should not have to do in theory with high level language, such as basic.

So, considering all above, maybe anyone can suggest any BASIC languge like IDE, which will take care of low level things (like basic stamp does), and won't require expensive hardware, like again, basic stamp does?
«13

Comments

  • RDL2004RDL2004 Posts: 2,554
    edited 2013-02-24 08:35
    I'm not going to say whether it's good or not, because I haven't actually tried it, but you might look at the TI MSP430 Launchpad along with Energia. I heard about Energia only a few months ago. It's supposed to be a lot like the Arduino programming software. I realize it's quite a bit different from the Basic Stamps, but considering about half a kabillion people have figured out how to program their Arduinos, it must not be that difficult.
  • CuriousOneCuriousOne Posts: 931
    edited 2013-02-24 08:45
    Thanks, I'll review it also.
  • KC_RobKC_Rob Posts: 465
    edited 2013-02-24 09:28
    CuriousOne wrote: »
    Hello.
    So, I decided to look at something different. Considering I already have PIC proto board, some PIC MCUs, I decided to go with PIC based solutions. I've downloaded microengineering labs picbasic pro, which looks a bit better than MIKROEs software, but still I found some huge limitations. For example, you can't simply set port #1 high, you have to know port naming of specific MCU being used, deal with register, etc. Do a lot of low level things, that you should not have to do in theory with high level language, such as basic.

    So, considering all above, maybe anyone can suggest any BASIC languge like IDE, which will take care of low level things (like basic stamp does), and won't require expensive hardware, like again, basic stamp does?
    You might take a look at BASCOM-AVR or BASCOM-8051. I haven't used either, but many people do, and from what I understand BASCOM has most of the features you're wanting.

    More generally, I would stay away from PIC and go with AVR or 8051. In terms of smaller, cheaper MCUs, you'll have many more HLL options with those two families (and as for getting the most bang for your buck, it's hard to beat the old 8051).
  • TinkersALotTinkersALot Posts: 535
    edited 2013-02-24 09:48
    Proof once again that there is no perfect tool chain -- only a tool chain that is the best fit for the project's requirements. This being the assertion, then it seems sensible to select a tool chain after the project requirements are understood.

    Another truth shown here again is that the prototypes are often not related to the final product (and in many cases, this is a very good thing).
  • CuriousOneCuriousOne Posts: 931
    edited 2013-02-24 10:06
    BASCOM looks also promising, but the fact that it haven't updated since 2006, rings large warning bell.
  • KC_RobKC_Rob Posts: 465
    edited 2013-02-24 10:18
    CuriousOne wrote: »
    BASCOM looks also promising, but the fact that it haven't updated since 2006, rings large warning bell.
    Are you sure? In any case, forums look to be very active , which is generally a good sign.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-24 13:09
    why not try soldering up your own picaxe or atduino boards? You can get pre burned mcus.

    I have a pile of atmega328 chips i just use a 4 dollar programmer from ebay to burn the arduino bootloader on them.

    There is also the option of buying a preburned basic stamp chip from parallax for 12 bucks
  • shimniokshimniok Posts: 177
    edited 2013-02-24 13:34
    Getting a $2 processor is difficult unless you buy in large quantities.

    If your goal is to avoid bare metal then I think it's best to limit the search to options that offer robust libraries and simple programming (BASIC or Arduino-like) that can be easily added to whatever circuit board you want.

    One option is to use Atmel ATtiny AVR MCUs; they are cheap. The ATtiny13 is a commonly-used 8-pin MCU. There are other more powerful 8-pins that are often used: ATtiny25, 45 or 85 as they have more memory and more peripherals. ATtiny24/44/84 are 14-pin with more flexibility. ATtiny2313/4313 are the 20-pin. I think you're looking at < $4 single unit prices. You can also do an ATtiny328P and program it with an AVR programmer or program an Arduino bootloader on it.

    As for programming the ATtiny chips, I'm pretty sure you can write code for all of them with the Arduino IDE (there may be some tricks). That way you don't have to deal with the bare metal. I code in AVR Studio for the small chips, though. Anyway, once you have the hex file, download using a programmer like the AVR programmer from Pololu within the Arduino IDE.

    I got so sick of breadboarding these chips that I built breakout boards where I just plug in the chip and AVRISP cable, add power, and go.

    What about PICAXE? Those come in various pin counts from 8 to 28 and seem to be relatively low cost. $5 for the 18-pin, $4 for the 14-pin, $3 for the 8-pin.

    A somewhat more expensive option which looks really promising is Coridium's DIP form factor ARM with BASIC interpreter. It immediately reminded me of the BASIC Stamp. I've only played with it a little. It has the ability to tweak hardware registers directly if you want, or you can just keep it simple with BASIC commands.

    There are other BASIC chip options I believe.
  • Hal AlbachHal Albach Posts: 747
    edited 2013-02-24 14:47
    Have you considered programming the PIC's with C? It's not too difficult to learn and C takes care of most of the low level stuff. No need to buy a C compiler, if the student version of Hitech C is too limited then go for the free SDCC version. Once you start learning C you will be amazed at what you can do without being bogged down with low level details.

    Hal
  • RickBRickB Posts: 395
    edited 2013-02-24 14:57
    ZBasic compiler for generic AVRs. Always very quick response on the forum. Syntax is a bit different from what you might expect, but the compiler is of high quaity. The author is a frequent poster on AVR Freaks.

    http://www.zbasic.net/Software/c-2.html?osCsid=1f413de9f1ce88c7e936cb4942b5a896
  • KC_RobKC_Rob Posts: 465
    edited 2013-02-24 15:49
    shimniok wrote: »
    Getting a $2 processor is difficult unless you buy in large quantities.
    If you look in the 8051 family you can stay pretty close to that (eg, Silicon Labs, STC, probably Winbond and some others as well).

    8051s are abundant and cheap to make, which is why they'll be around for some time to come. Of course, what you can get for how much also depends on your needs.
  • jmgjmg Posts: 15,173
    edited 2013-02-24 18:10
    CuriousOne wrote: »
    Also, development software was idiotic. For example, if you compile project, it automatically being saved, without asking you, overwriting what you have done before !

    I'm not sure quite what you expected here - do you really want tools to compile without saving ?!
    If it is only a scratch-pad project, you do know about 'save as' ?


    CuriousOne wrote: »
    So, considering all above, maybe anyone can suggest any BASIC languge like IDE, which will take care of low level things (like basic stamp does), and won't require expensive hardware, like again, basic stamp does?

    Depends how 'Basic like' you mean, but you can download and try this :

    http://turbo51.com/download-free-pascal-compiler-8051

    and also look at SDCC, tho being C, that is further from Basic in read-ability.

    For low cost devices, with ADC, and affordable Debug, look at SiLabs, or the Zilog Z51F series.
    (The Z51F has a nice MSOP10, which is S08 area, using 1mm lead pitch.)

    If you want DIP40, or PLCC44, then the Atmel AT89LP51RB2 (etc) is a good, modern choice.
  • msrobotsmsrobots Posts: 3,709
    edited 2013-02-24 19:12
    Ok $400 for software. That are already 50 Propeller or 33 Basic-stamps... why not propeller and prop-basic?
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-24 19:39
    Ive been wondering about 8051s for a while, i guess this is as good of thread as any to ask, im sure the OP wouldnt mind knowing this either.

    What is needed to get started with them? Do they use some kind of in circuit programmer like pic or avr? My guess has always been its more like an arm, where you have many companies developing them and many different programmers/protocals depending on the brand? Also are the good IDEs pretty spendy like IAR/keil etc or is there some really good universal free stuff out there?

    The biggest turn off of cheap micros is the price and complexity of getting started. I think AVR is by far the best having 4 dollar universal icsp dongles and free software based on visual studio. Cant speak for pic. The nicest thing about the prop/arduino/bs2 is that they have serial bootloaders and free devellopment tools. Makes getting up and running a snap
  • jmgjmg Posts: 15,173
    edited 2013-02-24 20:06
    Ive been wondering about 8051s for a while, i guess this is as good of thread as any to ask, im sure the OP wouldnt mind knowing this either.

    What is needed to get started with them? Do they use some kind of in circuit programmer like pic or avr? My guess has always been its more like an arm, where you have many companies developing them and many different programmers/protocals depending on the brand? Also are the good IDEs pretty spendy like IAR/keil etc or is there some really good universal free stuff out there?

    The biggest turn off of cheap micros is the price and complexity of getting started. I think AVR is by far the best having 4 dollar universal icsp dongles and free software based on visual studio. Cant speak for pic. The nicest thing about the prop/arduino/bs2 is that they have serial bootloaders and free devellopment tools. Makes getting up and running a snap

    8051's have a low 'getting started' cost.
    Lower than PIC.( I recently looked at pulling 2 x 741Gxx parts + passives into a PIC10Fxx, SOT23-6 :- nice package, nice part price, but the getting started price headed to $200 )

    With 8051, you can get going on a Silabs ToolStick, for sub $30, (or Zilog Z51F0811000KITG or Z51F0410000KITG also sub $30)
    The Silabs C8051F5xx series, and Zilog's Z51F are wide-supply operation.

    That gives you a Debug system with Breakpoints, single step, and it can work with free compilers like SDCC or Turbo51.

    Some variants (eg Atmel and also SST and NXP ) have boot-loaders, as well as SPI-ISP options.
    A boot-loader allows RS232 style download-and-run, but often cannot gm every chip option. The SPI-ISP is needed for that.
    The new Atmel AT89LP51RB2..ED2 series come in DIP and PLCC, with serial loaders in ROM.
  • KC_RobKC_Rob Posts: 465
    edited 2013-02-24 20:37
    Ive been wondering about 8051s for a while, i guess this is as good of thread as any to ask, im sure the OP wouldnt mind knowing this either....
    jmg already gave you an excellent reply, so I'll try not to repeat too much here. Silicon Labs 8051s are impressive, very nice selection, and the tools they give you are quite good. It's easy and cheap to get up and running with their 8051s. SDCC works seamlessly with SiLabs' (free) IDE. Turbo51 (free Pascal compiler) generally supports the SiLabs chips quite well. The peripherals found on SiLabs 8051s are impressive, and of course the chips are reasonably priced (you're crazy not to look at them if you're doing anything analog intensive).

    I'll also mention again the STC parts. Most come ready-made with a bootloader so you just use a little PC utility to program them. Also, there are gobs of programmers and eval boards on ebay for under $25.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-02-24 21:06
    So if you get a SiLabs set up, proggrammer etc, then move to STC/Winbound are you going to have to repurchase dev tools or will the silabs stuff in genral be compatible with any other brand. This is assuming there is no serial boot loader the chips your working with.
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-02-24 21:11
    When I used the Silabs IDE it was really hard to get started to compile.
    And forgot about user groups or even tech support from silabs.

    MSP430 Launchpad with free IAR Workbench or Energia probably the best way to go.
  • KC_RobKC_Rob Posts: 465
    edited 2013-02-24 21:22
    So if you get a SiLabs set up, proggrammer etc, then move to STC/Winbound are you going to have to repurchase dev tools or will the silabs stuff in genral be compatible with any other brand. This is assuming there is no serial boot loader the chips your working with.
    The hardware tools will, as a general rule, vary somewhat, but they are almost always dirt cheap (like I say, programmers etc. for STC parts are all over the place for next to nothing). OTOH, some are direct replacements for one another, so that going from, say, an AT89C5x to a STC11Fxx should be pretty much seamless.
  • KC_RobKC_Rob Posts: 465
    edited 2013-02-24 21:28
    tonyp12 wrote: »
    When I used the Silabs IDE it was really hard to get started to compile.
    And forgot about user groups or even tech support from silabs.
    That wasn't my experience. It comes with a limited version of Keil ready to go, and integrating SDCC was a piece of cake.
  • ercoerco Posts: 20,256
    edited 2013-02-24 21:36
    shimniok wrote: »
    What about PICAXE? Those come in various pin counts from 8 to 28 and seem to be relatively low cost. $5 for the 18-pin, $4 for the 14-pin, $3 for the 8-pin.

    +1. A $4 20M2 has lots of amazing features, free BASIC editor, and a decent forum. Very similar feel to programming a Stamp. I consider it the MIA BS3.
  • jmgjmg Posts: 15,173
    edited 2013-02-24 22:27
    So if you get a SiLabs set up, proggrammer etc, then move to STC/Winbound are you going to have to repurchase dev tools or will the silabs stuff in genral be compatible with any other brand. This is assuming there is no serial boot loader the chips your working with.

    Depends what you mean by "repurchase dev tools"

    - The Hardware Emulators/Debuggers of the Silabs and Zilog offerings, are focused on those vendor's parts, of course, but the tool chains, and any simulators, and libraries you have, are usually quite variant portable.

    I noticed even Microchip recently removed their 'not for new designs' tags from their SST89E516RD2 datasheet (wry smile)

    There are new parts coming from Nuvoton, Sycmos and Holtek, and Atmel's parts show plenty of life in the 8051....

    Edit: I see just up, is data on the upcoming teensy MSOP10 SM39R08A5

    http://www.syncmos.com.tw/products_file/ISSFD-M067_A_SM39R08A5-DDatasheet%28EN%29.pdf
  • jmgjmg Posts: 15,173
    edited 2013-02-25 00:03
    KC_Rob wrote: »
    I'll also mention again the STC parts. Most come ready-made with a bootloader so you just use a little PC utility to program them. Also, there are gobs of programmers and eval boards on ebay for under $25.

    Yes, the STC variants seem to work ok, but they have made some strange decisions.
    * Their PDF files are reader paranoid, and also do not allow copy.
    * Their STC12 variants lack a timer 2 or PCA
    * Their newest variant family, the STC15 series, has a slightly faster core, and add the T2 and PCA, but are not pin-compatible

    So I'd place the Atmel AT89LP51Rx2 series ahead, with better docs, and standard pin-outs. (and a faster core, at the same clk speed)
  • GadgetmanGadgetman Posts: 2,436
    edited 2013-02-25 06:13
  • Martin_HMartin_H Posts: 4,051
    edited 2013-02-25 06:46
    Gadgetman wrote: »

    There are a ton of boards like that (e.g. dorkboard, ardweeny, Baby Orangutan), but at $5 that is crazy cheap.
  • ercoerco Posts: 20,256
    edited 2013-02-25 09:23
    Hey, that kickstarter was a great lead to the LA Robotics Club, which I'd never even heard of. They meet a mile from my office, I run right past there nearly every day. :)

    I'll check out their next meeting. Thanks Gadgetman!

    http://www.laroboticsclub.org
  • CuriousOneCuriousOne Posts: 931
    edited 2013-02-26 03:25
    Thanks everyone for suggestions. I'll try all recomended options sequentally (at least will read docs). So far, I disliked PICBASIC PRO quite much. With these guys, you have to know and remember all registers of specific MCU. For some unknown reason, they don't bothered themselves with gui-like wizard, which you can use to set all inputs, outputs, registers, clocks, etc - you have to do it all by yourself. And have to memorize thousands of register names and variables for various MCU.

    Below is the example of task, which I want to solve. I already did it via basic stamp, but as I've said, I want cheaper, non-vendor specific solution.

    here the task:

    We have input, logcal level. Where, the specific sequence of pulses should be isolated and processed (there may be tons of different pulses, but we should care only for specific sequence): first pulse duration 1ms, then pause 3ms, then 2nd pulse 5ms. And after 2nd pulse finishes, you have to output pulse of specific length (1-8ms), length of which is defined by user. User sets the length of pulse by pressing the button repeatedly. Selected value is shown on 7 segment led. User defined value is memorized and being restored and shown on power restore.

    I did this with BS2P & MAX7219, but I want cheaper, standalone solution.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-02-26 03:51
    It is really difficult to find a lot cheaper than a $7.99 Propeller chip, even when you add in the other needed items. And the Propeller Protoboard for TLL interface (no USB) can be bought in 5x for a very good price. I do build RS232 interfaces from transistors to save money as the level shifter chips are just as much work to write with added costs and about the same board space.

    I suspect the only way to go cheaper is to use PICs in Assembler, and if you are not willing to learn that, it is likely you need to review your criteria. Even then, the cheapest of PICs are missing important features, like brown out protection.

    Parallax still has SX chips available and the SX-B Basic is a good option. You will have to come up with an SX-Key which is a bit of an investment.

    The Max7219 might be done with other components for less money, but more soldering. But you are not going to find a micro-processor with a dedicated 7 segment LED driver built in.

    A Propeller Protoboard and a Max7219 might be a best fit for cost competative. A PicAXE might be all you require. But cheaper and cheaper at some point makes nothing suitable.
  • CuriousOneCuriousOne Posts: 931
    edited 2013-02-26 04:00
    Yes, max7219 may be replaced with generous shift register, like 74hc595. I just used what I had at hand.

    PicAXE uses same approach as bs & prop - small vendor specific pre-programmed IC required.

    Regarding the ASM, I was writing quite effective code for Z80 in ASM, but that was almost 2 decades ago, and I won't recall these days as pleasant and sunny ones :)
  • KC_RobKC_Rob Posts: 465
    edited 2013-02-26 10:32
    CuriousOne wrote: »
    Yes, max7219 may be replaced with generous shift register, like 74hc595. I just used what I had at hand.

    PicAXE uses same approach as bs & prop - small vendor specific pre-programmed IC required.
    Have you tried BASCOM (8051 or AVR) yet? Just going from what you've said your requirements are, I suspect that may be your best option.
Sign In or Register to comment.