The Best Microcontroller?
Jim the Hermit
Posts: 79
Well, the Best microcontroller is a matter of "whatcha need?"
I need memory! The more the merrier.
Followed by good number of I/O lines and high-speed. And Price is a pretty close 2nd-3rd place.
Running some form of BASIC is good. I never liked C/C++.
I was thinking of experimenting with Propeller or BasicX. Anyone have other ideas?
Thnx
I need memory! The more the merrier.
Followed by good number of I/O lines and high-speed. And Price is a pretty close 2nd-3rd place.
Running some form of BASIC is good. I never liked C/C++.
I was thinking of experimenting with Propeller or BasicX. Anyone have other ideas?
Thnx
Comments
The Propeller is fast. It has multiple processors on chip. It has 32K of shared memory on-chip that is used for code (Spin) and data. There are 32 I/O pins that can be used interchangably (with some minor restrictions on 4 of them). It can do lots of things that would be hard to do directly with most other microcontrollers like video and a variety of soft peripherals. You can program in Spin, assembly, several integer Basics, Forth, C, etc. If your application is not speed intensive, you can use a large external memory to hold the code in C.
I find that a microcontroller generally does NOT require a file system; while a microcomputer always uses a file system. They are very different devices and for many projects having Linux or Windows or whatever is a huge waste of time and effort. Small is beautiful.
Also, a wide well-informed user base to seek knowledge from is important. Some devices seem to have the blind leading the blind.
BasicX is rather poorly documented or supported; but ZBasic is an off-shoot that is excellent. The contrast between the two well demonstrates how good support can make a great product and poor support can ruin excellent hardware.
The Propeller is just more fun as it does a surprising amount of things that others struggle to do - and does such tasks better.
Much like the great plywood and relay debate.
Debates as such are being solved ! http://www.youtube.com/watch?v=Bp464vKKu5g
No, no, no. I have a basic stamp 2sx, and there isn't nearly enough memory to do what I want. (several 2 dimensional arrays kind of stuff) I need to upgrade.
Based on your previous robot project, I'd bet the Propeller would be the microcontroller that would be the most useful for your needs.
The Prop's 32K if memory in a bit limited for video graphics work but if you're looking for a way to store sensor data and robot parameters, the Prop should be fine.
The Prop doesn't have native 2D arrays, but you can easily fake them with a single dimension array.
If you have a lot of data to store, you could add a SD card.
I hope you've seen my PropBOE-Bot that can record it path and then play it back.
The Prop is really an ideal microcontroller for robot projects. Being able to divide up the various tasks among multiple cogs is a very powerful capability and makes programming a robot a lot of fun.
You need hard values before closing in on a choice. "good number of I/O lines and high-speed" is very vague.
Generally, you can start with the hard-numbers first, like Pin-Count, Supply voltage range, Peripherals, - that excludes many,
then you can check into Core and languages supported....
Do not be averse to using more than one Microcontroller.
With a little simple coding, anything can have any kind of array that one wants. Providing a set of 'array' commands in a programming language leads to people not learning how to write their own as required into any platform.
For a 2x array, it can be as simple as allocating a block of memory with such that data alternates in an 'ab,ab,ab, ab...' fashion for any number of items.
Yeah, I'm probably going to go with the propeller. The memory is for programming and data accumulation and storage. I imagine the program is going to be quite long, so it should be fast. How much memory, how fast? I don't know.
IF, and this might be a big if, you can relax your requirement for BASIC, you have an optional that pretty much gives you what you want on the propeller: Propforth.
The propeller is cheapest (assuming you already have one on you desk, most folks on these forums do).
The propforth environment is a high level programming language with a simple syntax, much like BASIC, only much more powerful. Source is interpreted on the fly when code is input, and the definitions are compiled into the dictionary. Execution speed is very fast. If you need even faster, you can write "snippets" in assembler, and call these from high level forth. You get to concentrate on the parts that need assembler, without having to write the whole thing in assembler.
Concerning memory: Forth is great for logging. With a couple resistors you can make a microSD adapter into a cheap SD slot, Propforth can read an write to this on the fly. SD access is done with very low overhead (no FAT support) so the transfer is VERY fast. In the propforth model, the SD can be seen as system ram (and storage), and the HUB and COG ram can be seen as "cache" (but maybe you need a good imagination for this image to work). When you do need to have SD with FAT, you either export the data to an external system, or simply install a second SD with FAT support, and arrange your processing at allow the slow transfers to FAT.
Concerning I/O lines and processing: you can easily add additional prop chips to the initial propforth set up, the connection is transparent to the application, you just have six more cogs and 26 more pins available for you application. The synchronous serial connection has the protocol built in, and the transfers happen at pretty much as fast as the prop can handle, so there isn't too much difference between local cogs and remote cogs. The additional prop chips need no additional EEPROM, of course you can add more for additional storage, logging, etc.
Only draw back is that it is forth, and folks seems to either love it or hate it. Forth fell out of favor when very fast processors with insane amounts of memory became cheap, but we now have to deal with grotesque code bloat. Propforth and forth in general lends itself to simple elegance and maximizing the least necessary resources.
I would use forth on any development project on a microcontroller, and I would use the prop for any intial development, since this combination can do pretty much anything any other uC can do, and I already have it. After the prototype is complete, the algorithms can easily be ported to another lower cost and more specialized uC (e.g TMS430) in a more generic environment (e.g C). This is a typical model for very fast development.