Author Topic: Which mcu for beginner??  (Read 6954 times)

0 Members and 1 Guest are viewing this topic.

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Which mcu for beginner??
« on: October 17, 2011, 08:03:22 am »
So I'm looking to start getting more into mcu's and have not a clue where to start. I can say that I have an arduino UNO and it has been great. I will gladly purchase another arduino as they are so handy as far as having everything on one board and slots for inputs and outputs. I don't want to be one of those who just sticks with one mcu and nothing else so I want to expand to something else. I'm thinking a pic kit but I'm not sure how the program works. The arduino program has not let me down and I like it so far. I don't have much experience with c programming so it's frustrating at times, but that's how I learn. Are pics easy to program and use?? What language do pics use? Thanks,

Jacob.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 31356
  • Country: au
    • EEVblog
Re: Which mcu for beginner??
« Reply #1 on: October 17, 2011, 08:19:17 am »
PIC's, including almost every other microcontroller have C compilers, and that is what most people use.
The difference between an Arduino and a "raw" microcontroller is that the Auduino environment takes care of the all the "low level" stuff like setting up registers to get your program working.
PIC, AVR, MSP430, etc etc are all essentially the same in terms of programming difficultly in C, and anyone who tells you otherwise is a nitpicking fanboy  ::)

Dave.
 

Offline Chet T16

  • Frequent Contributor
  • **
  • Posts: 522
  • Country: ie
    • Retro-Renault
Re: Which mcu for beginner??
« Reply #2 on: October 17, 2011, 08:21:50 am »
I got one of those MSP430 dev boards and it was such a pain to try and get and install the necessary software that i threw it in one of the storage boxes and forgot about it
Chet
Paid Electron Wrestler
 

Offline vtl

  • Regular Contributor
  • *
  • Posts: 136
  • Country: au
Re: Which mcu for beginner??
« Reply #3 on: October 17, 2011, 08:35:50 am »
I got one of those MSP430 dev boards and it was such a pain to try and get and install the necessary software that i threw it in one of the storage boxes and forgot about it
I didn't have any such problems, pressed the install button and it worked.

The MSP board is great because you can also use it as a programmer for any of the larger chips. For example I did a project with the MSP430F5437 chip in a qfp80 package and programmed it with the launchpad board. You can just have jumper wires for the 2 programming pins from the dev board to your project board.

I always cringe when I see a project where they're using a development board for an entire project. A $40 board to do some trivial embedded task is just retarded so its always nice to just program a cheap MCU and stick it into a perfboard or custom pcb
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 12135
  • Country: gb
    • Mike's Electric Stuff
Re: Which mcu for beginner??
« Reply #4 on: October 17, 2011, 09:40:06 am »
I always cringe when I see a project where they're using a development board for an entire project. A $40 board to do some trivial embedded task is just retarded so its always nice to just program a cheap MCU and stick it into a perfboard or custom pcb
For a beginner (or an experienced user learning a new part), starting with a devboard can save a lot of time, as you eliminate a large proportion of possible errors that prevent a first program working - power reset, programing, oscillator etc.
Unless you value your time very cheaply, the material cost is not very significant compared to time saved.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3195
  • Country: us
Re: Which mcu for beginner??
« Reply #5 on: October 17, 2011, 07:46:30 pm »
If you can produce that "custom PCB" for less than $40, including paying yourself, say, minimum wage for schematic entry and PCB development, plus PCB fabrication, plus shipping for the PCB, plus parts, plus separate shipping for the parts, then ... you're doing really well!  (perfboard is more ambiguous, I guess.)

But PCB design and even perfboard construction are probably not on the list of "beginner skills" for most people, anyway.  And may not even be on the list of skills they're interested in acquiring.

 

Offline gregariz

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: us
Re: Which mcu for beginner??
« Reply #6 on: October 17, 2011, 08:28:25 pm »
So I'm looking to start getting more into mcu's and have not a clue where to start. I can say that I have an arduino UNO and it has been great. I will gladly purchase another arduino as they are so handy as far as having everything on one board and slots for inputs and outputs. I don't want to be one of those who just sticks with one mcu and nothing else so I want to expand to something else. I'm thinking a pic kit but I'm not sure how the program works. The arduino program has not let me down and I like it so far. I don't have much experience with c programming so it's frustrating at times, but that's how I learn. Are pics easy to program and use?? What language do pics use? Thanks,

Jacob.

C is popular on pics, so is basic. Many people still use assembler on the pics.

Depending how complicated your code becomes I usually base the compiler I use ( I have several and dont seem to have settled on one in particular, but perhaps use CCS C more than others) on whether the compiler company has documented libraries to use - ie are you going to have to write your own libraries for LCD's, keypad scanning, port expanders and rotary encoders yourself? or have they already done it? What happens if you want to use a particular graphics LCD? Any library for that? A TFT? just something to think about if you already know the types of hardware you will be talking to. Pic Kit 2 has a 16F socketed part (assembly or Hitech C) and Pic kit 3 has a 18F smt part (assembly, Hitech or C18 C compiler).
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: Which mcu for beginner??
« Reply #7 on: October 17, 2011, 10:37:58 pm »
I will look into a pic kit 3 and a devboard. Pic seems like a nice place to start. Can you use the pic kit to program all their microcontrollers or just some? One thing bad about arduino is the largest through hole chip they use is a an atmega328, which I run out of outputs quick on. If I want to make my own board that's the largest I can go with arduino without getting into surface mount. Pic looks like they have massive through hole microcontrollers and their pic kit looks nice to start with. Will programming still be the same as far as writing it out? Since they are both c won't they be about the same?
 

alm

  • Guest
Re: Which mcu for beginner??
« Reply #8 on: October 18, 2011, 12:00:51 am »
The Arduino is based on AVR micro controllers. AVRs are similar to PICs, both are usually programmed in C and are available in DIP packages up to 40 pins. The Arduino uses some of these AVR micros to create an easy to use development environment, with their own language (based on C++) and libraries. You should compare the PIC with AVR (or MSP430, ARM Cortex, ...), and Arduino with something like the chipkit (Arduino clone based on a high-end PIC).

28-pins is often enough these days in my opinion. Many devices use serial buses like I2C or SPI which use only a few pins. If you need a ton of outputs for things like LEDs, you can always grab a shift register. I tend to avoid those huge 40-pin DIP packages if I can help it, where not living in the eighties anymore.

I don't understand your point about the Arduino Mega only being available in surface mount. You typically buy an Arduino pre-assembled. If you want to design your own board, you're free to use any IC package you like. But you'll probably skip the Arduino stuff at that point and directly program the AVR.
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: Which mcu for beginner??
« Reply #9 on: October 18, 2011, 12:34:05 am »
If I want to bud my own board can I use the arduino software to program other avr chips too? I have some max232's handy to interface them to serial. That would be nice to know but I still want to try another software to be open, I don't want to stay trapped with arduino and not try other software. What is the software called that pic uses and can I download it for free?
 

alm

  • Guest
Re: Which mcu for beginner??
« Reply #10 on: October 18, 2011, 01:10:57 am »
Yes, you can load an Arduino boot loader in any supported AVR (you need a programmer to do that, or have someone else do this for you). Then you can put it on a board with the basic Arduino peripherals and program it with the Arduino software. You are limited by the parts supported by the Arduino software, though.

MPlab is the free and popular software for programming PICs in C or assembly. You can download it for free from the Microchip website.
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: Which mcu for beginner??
« Reply #11 on: October 18, 2011, 05:39:29 pm »
All the 8/12/16 bit micros are very similar. Why not move up a notch and try 32-bit ARM? It still has free tools, and lots more horsepower than the Atmel/PICs.


Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 9711
  • Country: my
  • reassessing directives...
Re: Which mcu for beginner??
« Reply #12 on: October 18, 2011, 06:35:39 pm »
sounds like for a beginner.
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: Which mcu for beginner??
« Reply #13 on: October 18, 2011, 10:40:26 pm »
I have only used c before on the arduino, so what is the difference between c and assembler? I have heard of it but don't know the differences. Is there a topic regarding this?
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9692
  • Country: us
Re: Which mcu for beginner??
« Reply #14 on: October 18, 2011, 10:49:10 pm »
I have only used c before on the arduino, so what is the difference between c and assembler? I have heard of it but don't know the differences. Is there a topic regarding this?
Hey, these days there's a whole Internet at your disposal to answer this kind of question. Go search!

The short answer is that assembler is the machine language the micro actually works with. Each assembly instruction is a text mnemonic for one machine code instruction. Most assemblers are macro assemblers that allow you to define common groups of instructions as macros, and allow you to define helpful names for storage locations (basically like variables in C).

When you work with a C compiler there is usually a compiler option that allows you to see the assembly instructions generated as output by the compiler. This can often be useful for low level debugging.
I'm not an EE--what am I doing here?
 

Offline WhyMe

  • Contributor
  • Posts: 17
  • Country: us
Re: Which mcu for beginner??
« Reply #15 on: October 18, 2011, 10:50:44 pm »
I have only used c before on the arduino, so what is the difference between c and assembler? I have heard of it but don't know the differences. Is there a topic regarding this?

This explains levels of programming languages:

http://cset.sp.utoledo.edu/sample/engt1050/engt1050_languages.html
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7591
  • Country: nz
Re: Which mcu for beginner??
« Reply #16 on: October 19, 2011, 12:54:08 am »
I have only used c before on the arduino, so what is the difference between c and assembler? I have heard of it but don't know the differences. Is there a topic regarding this?

C is much better for portability.

The asm language for one micro will be a little different compared to other brands of micro (or a lot different).
ie, the number of asm instructions and what they do isn't the same for all micros so code has to be rewritten if you change.
Where as C language code can be the same for all micros,  (the compiler automatically converts your C code into the asm code needed for the micro your using)


« Last Edit: October 19, 2011, 12:59:29 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: Which mcu for beginner??
« Reply #17 on: October 20, 2011, 07:15:12 am »
I made my own arduino board today based on the atmega328 and max232 for serial interface. It works great so far ( haven't tried the serial interface yet) but the normal arduino functions work. I have a question about uploading the bootloader to the chip. I have an arduino UNO and on the arduino website it says that the UNO board won't burn the bootlaoder but other boards will. But on eBay you can buy the atmega 328 with the bootlaoder preloaded. It's a couple extra dollars no big deal, but I want to know how to burn it myself. Any ideas? Thanks,

Jacob.
 

Offline Chet T16

  • Frequent Contributor
  • **
  • Posts: 522
  • Country: ie
    • Retro-Renault
Re: Which mcu for beginner??
« Reply #18 on: October 20, 2011, 07:18:31 am »
I've used an uno to burn the bootloader to a couple of attiny85s
Chet
Paid Electron Wrestler
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3195
  • Country: us
Re: Which mcu for beginner??
« Reply #19 on: October 20, 2011, 06:18:06 pm »
The inability of the Uno to support burn the bootloader into other chips is "over-reported."  There are several workarounds that have been discussed MANY TIMES in the Arduino forums.  Check out the "Microcontrollers" sub-topic.

(short answer - you need to avoid auto-reset on the uno, so that running AVRDUDE doesn't cause a reset and end up talking to the Uno bootloader instead of the ArduinoISP sketch.  You can cut the trace, add an extra resistor or cap that "hotwires" the autoreset, or use a sketch dedicated to burning the bootloader that bypasses the problem entirely.
(optiLoader, by ... me!))
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf