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.

Which microcontroller do I want to learn?

Status
Not open for further replies.
Hi, everyone. I'm 35 years old, living in Australia. When I was a kid I learned 6808 assembly and BASIC. Then I got an Amiga and learned 68000 assembly. These days I'm writing in C and occasional C++.

I've also been studying basic analogue electronic circuits. Nothing more complicated than an AM radio.

I want to study a microcontroller architecture, and need to pick one. I want to return to the Amiga assembly days, where you had complete control of the machine, and the computer isn't hidden under layers of abstraction.

I want a uC that can run off a 6 volt battery pack, and directly input/output electronic signals so that I could hand-solder a circuit for the uC to connect it to, say, a speaker or LED or some sort of sensor. I want it to have an inbuilt ADC. I want it to run compiled C and I also want to program it in assembly, from my Mac or PC. I think that any CPU that can run Linux is probably too complex for my purposes. I'm kind of intrigued by 8-bit AVR, but most electronics enthusiasts seem to think that Arduino is a bit of a toy.

Any suggestions?

Richard
 
Last edited:
I'm kind of intrigued by 8-bit AVR, but most electronics enthusiasts seem to think that Arduino is a bit of a toy.

I don't know of any who think that - it's a pretty ludicrous suggestion :D

The most popular are the MicroChip PIC series, with the Atmel AVR's in second place - the Arduino is simply an AVR development system, and as it's principally C based could be a good choice for you?. If you wanted the PIC route, choose at least the 18F series, as there's a free C compiler for that, but not for the lower spec PIC's.
 
I agree..... The Arduino is no toy..... The development board has been taken to a new height... Once you need more power.... just buy a bigger board.

You said you dabble with C#....... Netduino is right up your street... I use GHI electronics 'Panda' in several of my applications.... There are many plugin boards and many libraries written.


Sorry..... Don't know where I read C#...
 
Last edited:
I don't like Arduino. I've never owned one, but I've seen examples and I've written libraries for it for other people. The coding styles in the arduino libraries (e.g. software serial) and examples I've seen are full of blocking functions and make for low performance code. Arduino code is called 'Wiring', and is based on C++.

There's nothing wrong with using the Arduino platform to get started.. but you may soon realise you don't need to use the software (or that it gets in the way of what you want to do) and you can then just use the standard AVR-GCC/G++ compiler on its own (or keep using the Arduino toolchain, but remove the unwanted libraries).
 
Last edited:
Like others pointed out, AVR does not equal arduino. If you want to get a quick start, buy some arduino board but make your own programs in C using avr-gcc.
 
For conventional digital: Freescale (former Motorola) or Zilog. Yes, I am one who thinks PIC, Rabbit and others of that ilk are second tier players. If you want to be well out the box, learn the PSOC series of Cypress: Very different, Not obvious to get good at, but a huge niche expertise for sensor acquisition & conditioning. Full valid objects can be built in one PSOC chip with display & sensor/input. Checkout their sonar ranging build as example.

I envy the younger aspirations, modern chip integration makes building premium solutions a Lot more available. Good Hunting... <<<)))

Glad I didn't include the Atmel uC based boards (Arduino etc). That is a completely competitive processor core. Inexpensive development boards readily available... Good Stuff.
Have to add, I'll write C (visual) for PC based apps, but for embedded uCs I only write assembler. Aforementioned library B.S. amongst the reasons
 
Last edited:
I'm both an 8051 and PIC fan myself. Lots will frown on 8051 due to its age, but it's been around since the '80s and doesn't look like it's going away anytime soon. There's a reason for that.

8051 assembly is much more fun to code than PIC assembly IMHO. But for low pin count stuff I prefer PIC.

As for the hardware development environments, not a big fan of them as I've done most of my development "vanilla style" (i.e. bare uC on a breadboard). Lots will say not to use breadboards as the intertrace capacitance messes things up. But speaking from personal experience, I have yet to have an issue on breadboard development.
 
Last edited:
Okay, I think I'm leaning towards AVR. Probably without Arduino. So what development board/environment do I need? Like I said, I want to develop in both C and assembly, and it would be nice to program the chip in-situ and be able to monitor input/output lines in realtime with an oscilloscope or with on-board LEDs. I want to be able to use a wide range of AVR chips. I'd rather get a more expensive option now than have to upgrade later.
 
The environment could be AVR studio, with the AVR-GCC compiler (windows version is called WinAVR). As for the programmer, if you just want to program it and debug manually the old fashioned way, you can get a e.g. USBASP **broken link removed** for less than $5 (incl. shipping). If you want to debug via AVR studio, you would want to get a debugger, e.g. AVR Dragon, which are around $50.

I've personally never used an AVR debugger, just the programmer. I've used the PICKit 2/3 debuggers, and singlestepping and breakpoints can be pretty helpful (the alternative is to signal on a pin(s) or use serial data output to let you know where the program is up to),.
 
I'm just starting to play with this product https://www.coridiumcorp.com/SuperPRO.php an ARM based processor. Basic, C and "I believe" inline assembly is available.

I'm having interfacing issues which I'll hopefully work out. I just ordered a bunch of headers, so I can't try out my first "Hello World" program for an serial LCD display. Input will likely be a quadrature encoder so that could be fun. For now, it has a switch and is bicolor. Might add capacitive sensing as well. Not sure.

The other part of my plan is to use two 16 I2C IO devices, 1 with interrupts enabled. The system is 3.3 and what I have to interface to is 5V, so that's the fun part. My platform has an 8 port device which have Isolated modules such as AC IN, DC IN, relay out, buzzer

Furthermore, I want to add the ability to interface the I2C to an isolated I2C device of any choosing power supply from 1.8 to 5V.

So, that will be my development platform to start.

Look what they pack into that thing: https://www.electro-tech-online.com/custompdfs/2012/08/DS175x.pdf and https://www.electro-tech-online.com/custompdfs/2012/08/UM175x.pdf

ARM has an interesting architecture.

I go back to the PDP-8, PDP-11, 6800 and 1802 assembly
 
I think the Arduino "is a bit of a toy". Not because it has low functionality, because people have shown it can do some impressive tasks. The reason I think of it as a "toy" is because it's a ready made hobby module.

If you worked as a designer under contract and delivered your product to your government contractor; "I've finished your missile guidance system, I ended up using an Arduino... Don't look at me like that, it's got an excellent reputation and a wide user base!" ;)

Jokes aside, there's not much the Arduino does that you can't do yourself for a fraction of the price just connecting some wires to a PIC or AVR. If you ever expect to make something really small, or specialised, or commercial product etc then you need to be able to work with a microcontroller chip itself.

And if you are starting from scratch, start from the bottom, ie; getting a micro to do what you want. At age 35 you can probably afford a small investment in hardware so I suggest the MikroElektronika development boards and C compilers, they will get you up and running extremely quickly, I have even seen them criticised as making it "too easy". :)
**broken link removed**
 
If you worked as a designer under contract and delivered your product to your government contractor; "I've finished your missile guidance system, I ended up using an Arduino... Don't look at me like that, it's got an excellent reputation and a wide user base!" ;)

The obvious MASSIVE flaw in that statement is that you wouldn't provide the completed application on a development board (no matter what the processor), so while you developed on the Arduino you would provide the final application on an AVR.

Whatever the processor you used, it's almost certain you would use a development system, even if it's a home made one - so it's a completely flawed argument, and yet again seems to be encouraging people to think of the Arduino as a processor rather than a system including a processor.

Incidentally - an old friend of mine (who I've not seen for many years) actually wrote missile guidance systems for a military contractor - obviously I've no idea what processors it used, but it was about 30 years ago.
 
Do many professionals in industry start with a development board these days?

They guys I worked with went straight to PCBs. One one project I had to switch to a new toolchain and used a dev board to play with while waiting for the first cut of the pcb but it lacked so much of our hardware that it was not worth much as a development tool.

Then again our stuff was too fast to implement on anything but a PCB so I expect it dictated going right to a PCB.

Maybe the are more popular with organizations with fewer resources.
 
Yes, some professionals start with development boards especially for items they are not familiar with. For me (not that I'm a professional atm), it's because it's cheaper than designing my own board, is quicker & cheaper than waiting for the board to be made and soldering the parts on, and because I know it will work when I plug it in and if it doesn't then it's because of something I've done wrong.

I prefer to start with something that is known to work rather than faffing around for a few days to find some error in my work only to get to the same stage as I would have by just purchasing the dev board in the first place.
 
Last edited:
A number of years ago I did a relatively complex analog design that I went straight to PCB, but since it was a "one of", it was made modular. The layout program was DOS based with no design rule checking and the boards were etched/exposed in house.

I had some gliches:
1) Driving a capacitive load required a daughter card. Didn't find that out until it was 98% done.
2) Learned the hard way about bias currents and Zero ohms.
3) I should have provided DC offset pots
4) Offset had a major issue because the D/A would not output EXACTLY 0 Volts. Never fixed.

For a "first", "MAJOR" electronic analog design it turned out OK.

@Ian
The Panda looks pretty cool. My C experience is very "Rusty". I only did an OS for a class as part of a 2-member team. Everyone else had 4 or 5 people. We got an "A". It was my first C project. I'm trying to come up with a "configurable digital I/O" that will allow a buffer/inverter and inverted and non-inverted open drain outputs. Input can be provided too. I think I have a design that's workable.
 
I think a large part of why the arduino has a reputation as a toy is because it is popular and makes it relatively easy for beginners to do things (which is a good thing). These beginners throw together a board and a couple of shields and for $60 and a few hours playing with sample code off the web they have something that does roughly what they set out to do and they are damn happy about it (also a good thing) and they want to spread the word so everyone else can see how cool electronics and microcontrollers are (still a good thing).

The problem comes when someone with a little more experience goes to look at arduinos and 99% of the stuff he finds is built by (or for) beginners, he can immediately see that what they have built for $60 in a shoebox he could easily build for $5 and in the size a matchbox. The arduinos can be (and often are) used as toys, they can also be used as cool, cheap, little development boards, but the people using them as toys attract more attention, people who use them as development boards probably aren't writing dozens of blog posts about it.
 
The obvious MASSIVE flaw in that statement is that you wouldn't provide the completed application on a development board (no matter what the processor), so while you developed on the Arduino you would provide the final application on an AVR.
...

I accept your point Nigel, although mine is still valid. The Arduino user base is in the vast majority people who just use the module as the final device, and write code for it.

The amount of people who use an arduino for "development" and then just use an AVR chip is very small in comparison, and for that type of development the Arduino is not necessary nor would it be the best choice.

The main value inherent in the Arduino platform is that it provides a level of separation between the user and the micro, so users don't start with working with "a micro" they start working with "an Arduino device".

A "proper" micro development system like the MikroE EasyPIC7 allows the user to plug in any PIC 16F or 18F they like, use the same compiler, and all PICs access the same buttons, LCDs etc. That allows an application to be made on the dev board WHILE the user is working with "the chip" itself.

Heydonms makes some good points about the Arduino too. And re your comment Nigel about the Arduino being used for development, do you know any pro developers using Arduino for their main dev work? I would put it more in the category of "beginner toy to easily make your art project move" rather than a pro development tool.
 
I think a large part of why the arduino has a reputation as a toy is because it is popular and makes it relatively easy for beginners to do things (which is a good thing).

Not a good thing. While it should be easy for a beginner to get started, it should not be so easy that it completely eliminates the learning curve.

These beginners throw together a board and a couple of shields and for $60 and a few hours playing with sample code off the web they have something that does roughly what they set out to do and they are damn happy about it (also a good thing) and they want to spread the word so everyone else can see how cool electronics and microcontrollers are (still a good thing).

Again not a good thing. Through all of it, what have they really learned? Why should beginners get all this instant gratification with little to no effort? It's like they want the exploit without actually having to invent anything, or think for that matter.

I'm with Mr RB on this. There are some things that should not be made so easy that a newborn could do it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top