Which mcu for beginner?? - Page 1
Forum section: electronics / general

author: jackbob
author_rank: Regular Contributor
timestamp: October 17, 2011, 08:03:22 am
content: 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.

author: EEVblog
author_rank: Unknown
timestamp: October 17, 2011, 08:19:17 am
content: 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 fanboyDave.

author: Chet T16
author_rank: Frequent Contributor
timestamp: October 17, 2011, 08:21:50 am
content: 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

author: vtl
author_rank: Regular Contributor
timestamp: October 17, 2011, 08:35:50 am
content: Quote from: Chet T16 on October 17, 2011, 08:21:50 amI 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

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 17, 2011, 09:40:06 am
content: Quote from: vtl on October 17, 2011, 08:35:50 amFor 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.

author: westfw
author_rank: Super Contributor
timestamp: October 17, 2011, 07:46:30 pm
content: 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.

author: gregariz
author_rank: Frequent Contributor
timestamp: October 17, 2011, 08:28:25 pm
content: Quote from: jackbob on October 17, 2011, 08:03:22 amC 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).

author: jackbob
author_rank: Regular Contributor
timestamp: October 17, 2011, 10:37:58 pm
content: 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?

author: Unknown
author_rank: Unknown
timestamp: October 18, 2011, 12:00:51 am
content: 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.

author: jackbob
author_rank: Regular Contributor
timestamp: October 18, 2011, 12:34:05 am
content: 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?

author: Unknown
author_rank: Unknown
timestamp: October 18, 2011, 01:10:57 am
content: 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.

author: Zad
author_rank: Super Contributor
timestamp: October 18, 2011, 05:39:29 pm
content: 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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: October 18, 2011, 06:35:39 pm
content: sounds like for a beginner.

author: jackbob
author_rank: Regular Contributor
timestamp: October 18, 2011, 10:40:26 pm
content: 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?

author: IanB
author_rank: Super Contributor
timestamp: October 18, 2011, 10:49:10 pm
content: Quote from: jackbob on October 18, 2011, 10:40:26 pmHey, 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.

author: WhyMe
author_rank: Contributor
timestamp: October 18, 2011, 10:50:44 pm
content: Quote from: jackbob on October 18, 2011, 10:40:26 pmThis explains levels of programming languages:http://cset.sp.utoledo.edu/sample/engt1050/engt1050_languages.html

author: Psi
author_rank: Super Contributor
timestamp: October 19, 2011, 12:54:08 am
content: Quote from: jackbob on October 18, 2011, 10:40:26 pmC 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)

author: jackbob
author_rank: Regular Contributor
timestamp: October 20, 2011, 07:15:12 am
content: 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.

author: Chet T16
author_rank: Frequent Contributor
timestamp: October 20, 2011, 07:18:31 am
content: I've used an uno to burn the bootloader to a couple of attiny85s

author: westfw
author_rank: Super Contributor
timestamp: October 20, 2011, 06:18:06 pm
content: 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!))