When basic stamp is not enough, but propeller is not the right direction to move?
CuriousOne
Posts: 931
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?
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?
Comments
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).
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).
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
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
http://www.zbasic.net/Software/c-2.html?osCsid=1f413de9f1ce88c7e936cb4942b5a896
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.
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' ?
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.
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.
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.
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.
+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.
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
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)
http://www.kickstarter.com/projects/annikaskywalker/microprocessor-about-the-cost-and-size-of-a-pack-o
There are a ton of boards like that (e.g. dorkboard, ardweeny, Baby Orangutan), but at $5 that is crazy cheap.
I'll check out their next meeting. Thanks Gadgetman!
http://www.laroboticsclub.org
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.
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.
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