What is the best (not expensive) microcontroller development environment with C/C++ compiler support for a freshman mechatronic student?
- posted
18 years ago
What is the best (not expensive) microcontroller development environment with C/C++ compiler support for a freshman mechatronic student?
I personally like Microchips PICs and I've been using them for yonks but unless you go for low end chips, C compilers cost a fair bit. I don't know how much dev kits cost for these chips cos I only ever buy just the microcontrollers.
There are these new PICAXE chips. Extremely easy to use. It doesn't support C or C++ only its own BASIC variant. But interms of learning curve, this chip is definately the easiest. The smallest chip(picaxe08) + dev board costs $30 at altronics or for something bigger, the picaxe18 set cost $50.
Finally there are the AVRs. There is a free C compiler available for this chip dev boards for these chips aren't really all that expensive either. You probably can get started on AVRs for well under $100.
-- Wing Wong. Webpage: http://wing.ucc.asn.au
I know its bad form to follow up you own posts but...
There is also a book called "Experiments In Mechatronics Using Picaxe Chips" which is also sold at altronics
-- Wing Wong.
environment
As always, it depends on your needs.
The C compilers for the PICs are very good, but they are relatively expensive. There isn't much at the low cost end. Forget any rubbish you hear about the PIC not being suitable for C.
The Atmels have a slightly bigger range of lower cost C compilers, but you get what you pay for. A lot of people recon that because the Atmels have a GCC compiler for free that makes this the platform of choice. In reality it isn't easy to use and you have to know what you are doing. Unless you have a lot of GCC C experience (like writing scripts etc yourself), I'd go for one of the commercial compilers like CodeVision. Infinitely easier to use and you get results from day one.
There are others like say the Zilog series which offer very cheap development systems with C compilers, but these aren't as popular.
The PIC and Atmel are the two hottest 8bit solutions at the moment, and you'll get plenty of online forum support for both.
If you are after more horsepower than an 8bit micro can provide and think you might need a real-time C kernel, then you might like to look at the Rabbit series of processors. The developments kits are reasonably low cost and the come with a real-time C compiler which is easy to use.
Dave :)
If you used sdcc which is a freeware ansi complient C compiler for
8052/avr/pic/z80 processors then you would have the best of all possible worlds with a compiler which is generaly well behaved and allows you to pick your processor to suit the job.
There is a free c compiler for lower end PIC, PICC-Lite by Hitech is very good and compiles to quite small code. Personally, most of my coding is in assembly since I can't afford to pay for a compiler that supports the newer chips. :P
-- Wing Wong. Webpage: http://wing.ucc.asn.au
According to the offical SDCC site: AVR and gbz80 ports are no longer maintained. Does it work well enough for AVR, or is it hopeless?
I know its bad form to follow up you own posts but...
WHY ?? not if you have something usefull to add,
and my posting is not useful on this topic so I think it will be bad to follow it up.
An indirect reply:
I know that SDCC works well for 8051, and I know that WinAVR (GCC) works well for AVR. There will be little code that cannot be compiled with both and nearly all such code will be processor specific anyway (the IO routines for example) - it should be easy to switch between compilers with the same code base [I already do this].
Regards, Richard.
but they are strange compared to anything else.
No true at all. The academic versions are free then there is GNU...
50 USD up.;
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org
8051, AVR or ARM?
You have got to be joking... They are both limited range single source compared to the 600+ version of the 51 family from the 30+ silicon vendors.
Not only are there free c compilers for the 51 there are also free/cheap academic versions of the commercial compilers.
Or go to the industry standard ARM7. ARM is so comon it has been called "the 32bit 8051" (not the 32 bit PIC or AVR)
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org
I prefer GCC over the "polished" commerical compilers, even Atmel's own IDE. Anyone who took an introductory C programming class in college should have no problems using GCC for the AVR.
you
Sorry, I meant AVR.
and
source
No I am not joking. The PICs and the AVRs are two of the most poplaur
8bit solutions going around, especially for those starting out with micros. I am not saying that the PICs or AVRs are better than any other device, that can be debated forever. Last I checked the PIC was the worlds #1 selling 8bit micro. Newbies don't care about having 30+ silicon vendors, they care about what's popular, what's easy to use, and what support they are going to get. You can get support for any micro of course, but the PICs and AVRs seem to be the two micros of choice for beginners these days, with tons of new books, beginners development tools, traning systems, web sites, forums, and other support available.The 51 family is just not a popular solution for first timers any more.
In fact, the "PIC" has almost become synonomous with microcontrollers these days to those not entirely in the know.
free/cheap
Yes there are, just like many other micros as well.
look
is
called
The ARM is not common at the low end of the market, esp for beginners. Dave :)
Hi
I am just a newbie, but I know of a new e-book for sale ( USD$ 29.95 ) that uses the AVR Butterfly board ( USD$20 from Digi-key.com ), I bought 3 of them! which is a credit card sized board AVR 169 that has a 5-way joystick, lightsensor, 4 Mbit flash memory, temperature sensor, speaker, LCD, and RS-232.
I am waiting for the hard-copy version to be released. The author teaches you how to install and use the free WinAVR C-based development environment.
All you need is some additional components from an electronics store ( listed at the back of the book) and you have all you need to get started. Check it out at:
For Microchip PICmicro, there are free (limited to 2kB hex code) C (new), BASIC and Pascal compilers from
Hope this helps.
Cheers
Dale
routines
) that
of
joystick,
and
teaches
environment.
(started.
(new),
good
Olimex sells come AVR dev boards too. For about the same price also, about $15USD.
Wing Fong Wong
That leaves C for the smaller chips. Let me share a secret : programmer productivity and quality when using C (and C++) is fairly low, ie you take more time to produce code with more bugs. This is to do with the C language itself. There may be screams of outrage from others on this group, but you can save brain cells, time and quality by using Pascal or even a good compiled Basic. Don't be too proud.
You can't compare microcontrollers by comparing crystal speed - for example, the 8051 derivatives are all slow - even the 25 MHz pipelined chips, because the 8051 has a brain dead instruction set.
The free GCC compiler is easy to install and use. Google for WinAVR and you can download the compiler and editor and be running. It is good.
For $450 you can buy the JTAG ICE for AVR - a real In Circuit Emulator.
The AVRs have so much grunt that I write all my interrupt handlers in C. Not a line of assembler anywhere.
Roger
If you're using C on PICs, then I hope you never depend on the code being re-entrant. The lack of a proper chip-level support for a C run-time stack kills the platform for me.
CTW
Get AVR studio which is a free download from Atmel web site. AVR studio does not include a C compiler (only assembler) but is used for souce level debugging of C code or Assembly code. A STK500 prototype board from Atmel is a low cost option to program the AVR devices. A JTAG debugger is a more expensive option which will also support in-circuit debugging.
For C compiler, I suggest Imagecraft is excellent value for money and works quite well with AVR studio for simulation / debugging. There is a 45 day evauation version at
regards, Johnny.
I can say that we use AVRs at work.
-- Wing Wong. Webpage: http://wing.ucc.asn.au
I like using a simulator and simlate on computer. The one that comes with the atmel chip works quite well for my puposes. I'm not paid enough to afford an ICE. I envy those who have access to such hardware. :P
-- Wing Wong. Webpage: http://wing.ucc.asn.au
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.