Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I want to start - What should I get ?

Status
Not open for further replies.
I wanna program MCs in C if that's possible

I've heard of Arduino a few times (does it work with C?)

Where can I buy the sutff (and what), do you recommand a book, exercices, examples ??

thanks
 
Last edited:
If you're interesting in the Arduino - start here: http://arduino.cc/

It has a most excellent user forum - very friendly, very helpful, very active: http://arduino.cc/forum/

The Arduino software platform is completely open-source (and free); the compiler is avr-gcc (C/C++ for AVR), with the main library based on Processing/Wiring; the IDE is also based on Processing and is developed in Java. Some people have been successful using the Arduino core files and such with Eclipse (if you need something more robust than the standard IDE - which is designed to make things simple for users); you can also do everything "standalone" using the compiler, the libraries, and avrdude to upload the binary to the Arduino hardware (which is really just an AVR microcontroller - typically an ATMega328, but there are others in the family that are available - both larger and smaller).

There's some new and exciting things coming down the pipe for the Arduino community - the 1.0 release is expected "real-soon-now"; also Atmel and the Arduino team have announced the impending release of an ARM Cortex M3 (I think that's right) Arduino called the Due:

http://www.atmel.com/dyn/products/v...uino_Atmel.html&category_id=163&family_id=605

So - 32-bit goodness! Note that Atmel DOES NOT make the Arduino (they never have - the Arduino started out as an open-source project to make microcontrollers friendlier for new users and artists; the selection of the ATMega8 for the Arduino was partially due to influence from the Wiring/Processing boards which were based around similar hardware, and the fact that open-source compilers are more available for the Atmel/AVR line).

There have been others in the past that have done similar boards, though - notably:

http://leaflabs.com/devices/maple/
http://www.xduino.com/
**broken link removed**

There's also the fairly new option of Microchip getting into the act (also as a 32-bit platform):

**broken link removed**

I think you have to take some kind of notice that the Arduino is something more than a "fad" when Microchip is "following" - rather than "leading" such a community.

I see it as a good thing; competition and more platforms are always welcome, as long as the open-source availability remains (and no one PC platform is dominant over the others - so much about PIC development is centered on Windows boxes; only a bare minimum of the PIC family is supported by open-source compilers - about the only possible way around this is using Wine or a VM of some sort).
 
Last edited:
I've been working with µcontrollers for some time. I have not done anything with Arduino and I'm curious. Other than the benefits of open source, what compelling reasons are there to use Arduino over the traditional method of working with MCUs.
 
I've been working with µcontrollers for some time. I have not done anything with Arduino and I'm curious. Other than the benefits of open source, what compelling reasons are there to use Arduino over the traditional method of working with MCUs.

I would say that if you are comfortable with working with MCUs already in some fashion, then do what works for you.

I find that the Arduino's most compelling reason is the fact that it makes learning how to use microcontrollers more accessible to artists and designers (and by extension, everyone). I believe this to be the equivalent to the advent of desktop publishing - a paradigm shift in-progress of how we see ourselves in relationship to the objects around us. In this case, what's being created is "desktop manufacturing". The Arduino is simply playing a part (one of showing how to democratize hardware) in a larger process we as a society are undergoing (note that this doesn't mean that other methods/microcontrollers aren't part of the process as well).
 
Thanks, that's pretty much what I figured. Just wanted to make sure I wasn't missing out on something since it seems like it's becoming very popular.
 
ElectroNewby...do you have any experience/understanding of basic electronics? With microcontrollers, they're not just all software. There is a bit of knowledge of hardware and basic electronics required to fully get it and this is something I feel that lots have a problem grasping right out the gate.
 
I see it as a good thing; competition and more platforms are always welcome, as long as the open-source availability remains (and no one PC platform is dominant over the others - so much about PIC development is centered on Windows boxes; only a bare minimum of the PIC family is supported by open-source compilers - about the only possible way around this is using Wine or a VM of some sort).

Although I agree with you, there is a lot more options in the PIC world these days - MPLAB X works across Windows, Mac and Linux, the microchip compilers (albeit not fully open) are now available for all platforms and there is SDCC which is an open source compiler (only supports 18f and possibly 16f though). Microchip has really pulled it's finger out lately.

That said I have just made a move to AVR - purely to evade compiler licensing (and giving microchip ~£1k).

To the OP I would always recommend starting with a cheap programmer, a breadboard and the MCU of your choice. I have a USBTINY for AVR's and PICKIT2/PICKIT3 for PIC's. All those programmers are very reasonably priced (when I started I built my own parallel programmer, and then a home made ICD2 - but these days I would just buy USB programmers - it's not worth the hassle).

All you need to get a typical MCU running is a crystal, two 22pF caps, 10k resistor (on the MCLR/RESET) and a few 100nF caps to decouple. If you do not feel comfortable breadboarding and writing C from the ground up (Arduino hides quite a few things from you), the arduino is a good place to start.
 
The Arduino is a great platform for learning but there are downsides.

Cost: It uses a bootloader.
Either you have to buy a programmer to flash the controller or your have to buy controllers with the bootloader pre programmed.

There is no in circuit debugger.

I am not a big fan of buying compilers. Has anyone used the SDCC compiler with 16F and 18F ?

Note: Microchip offers light versions of both the C18 and the Hi Tech compiler for personal or educational use at no cost.
 
Last edited:
The Arduino is a great platform for learning but there are downsides.

Isn't there always? That's life...

Cost: It uses a bootloader.
Either you have to buy a programmer to flash the controller or your have to buy controllers with the bootloader pre programmed.

The nice thing, though, is that once you have a running Arduino, you now have an ISP programmer via a sketch that's included with the software; it doesn't allow all operations, but it does allow enough to get a bootloader other binary onto a bare chip.

There is no in circuit debugger.

From what I understand, this is mainly a limitation of the microcontroller and not the software. It would be a "nice to have", but many people get along fine without it...

I am not a big fan of buying compilers. Has anyone used the SDCC compiler with 16F and 18F ?

Note: Microchip offers light versions of both the C18 and the Hi Tech compiler for personal or educational use at no cost.

Neither am I - nor am I a big fan of software for which I don't or can't get the source for - although Microchip seems to be heading in that direction, too (Chipkit).
 
An in circuit debugger can be very useful - especially when there are problems on the silicon itself (I had terrible problems with an 18F and I2C the once, it was setting a status bit erroneously - a fault on the peripheral I had to trap) - I believe Microchip now have errata and or have fixed the problem now...

So never dismiss in circuit debugging, I usually make do with printf's but ICD can really save your bacon now and again.
 
  • Like
Reactions: 3v0
cr0sh said:
From what I understand, this is mainly a limitation of the microcontroller and not the software. It would be a "nice to have", but many people get along fine without it...

ICD is very nice to have but like most good things there is a learning curve that puts some people off. Once one gets into complex programs ICD can save boat loads of time where there are real time issues. ICD allows one to solve problems without adding debug/instrumentation code which can effect timing.

During less demanding debugging not having to add printf's and compile/flash etc can save time too. In industry time to market is a big issue. Choosing a tool chain that can get you to release faster is a real concern.

Seems some ATMEL chips have JTAG and others don't.

The ability to write a boot loader to a new chip with an existing arduino makes me feel better about the cost thing.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top