| Electronics > Beginners |
| Help a beginner get started with mcu's |
| (1/6) > >> |
| avogadro:
Hello, I want to learn how mcu's work and eventually be able to build a board and program the mcu on it. I have played around with arduino but I feel like I'm not really learning. Anyway I was looking around the web about embedded but I'm just getting more confused. They are millions of different chips to start playing with. There are people suggesting that I first get a book about computer architecture, operating systems, kernels etc. Others are suggesting various different discovery or eval boards... Some say just pick up a datasheet on the mcu and start figuring things out... So what would be the best place to start with? I'm not a complete beginner tho, I know the basics of c and pretty much what you learn in first year EE. |
| ljwinkler:
Hi avogadro, The best way to learn stuff it to set a reasonable goal, even a blinky LED could be a project for start. Define what would you like to achieve? There are tens of approaches to the same problem. You could pick an Arduino to make a simple clock/thermometer on a 16x2 LCD or adapt ARM to capture images from a camera. Arduino (or rather the entire AVR family) is quite rich in the matter of features, you have serial, I2C, SPI, ADC, EEPROM already built in. Other micros could be PICs, STMs, MSPs. One can be better than other in a specific application, do you need lower power consumption or high processing power? Do you need only 2 I/Os or tens of them? Find a project on instructables, follow the steps, then break something and try to figure it out why it is not working. Debugging is the best way to learn. Try to modify the project by adding additional functionality, components. You could start with an Arduino Blink project. Then add a button to it and change the code to blink different rates depending on the button state (you'd need to combine 3 Arduino examples to get the result), then maybe add a second LED... let it blink every 10th time you press a button (you'll learn then about debouncing when you discover that pressing the button once makes 10s or 100s of contacts of the contacts (PUN intended :)) Tell us what you want - we will guide you to get this done. Pick something simple, achievable that wont discourage you, don't start with plans of creating a TV :) |
| agehall:
Why do you feel you are not learning from playing with an Arduino? If anything, Arduino has made learning basic embedded development trivial. You can easily buy a standardised board, use an IDE that is trivial and work your way up from there. Once you are comfortable with the Arduino platform, you can start tinkering with moving outside out Arduino but still use Arduino boards. From there, start designing your own boards as you need them... |
| stian:
--- Quote from: agehall on July 12, 2018, 02:33:50 pm ---Why do you feel you are not learning from playing with an Arduino? --- End quote --- I can guess why.. The arduino ide sucks. now thats just my opinion. some will say its great to get started. well idk. What you can do is code in C rather than C++ and skip the arduino ide. or still code in C++ if you prefere. Once you get rid of the Arduino wrapper you will start learning more about the microchip. You will be using registers, flag and more, way way more than whats going on in arduino ide. learn about different Interrupt routines. and so on. But you would need to learn 1* how to use avr-gcc to compile your code to object file(s) with correct flags and such 2* how to use avr-gcc to link object files with system libs, <avr/io.h> etc. 3* how to create ihex from object. 4* how to use avrdude and uploade your hex. 5* how to use avrdude to set fuses if needed. Arduino ide does this all for you when you press uploade. A good place to start is https://www.nongnu.org/avr-libc/user-manual/index.html and google, and irc freenode #avr :) |
| agehall:
I agree 100% that the Arduino IDE sucks. But it is hard to find an easier way to get started with MCUs. The actual limits of Arduino in terms of learning how to develop for embedded systems is pretty high - even flipping 3d printer control software is written in Arduino - so I would argue it is a very convenient and easy way to get started. Once you move to avr-gcc & co you have a whole host of problems you can run into that are not related to the embedded development itself. If you are looking to learn how to use microcontrollers rather than how to play sysadmin for your build environment, Arduino is the way to go until you really understand what you are doing. Even switching to a fullfledged IDE such as Atmel Studio will be error prone - there are simply a lot more switches and buttons to press that you don't need in the beginning and unless you know what they do and understand why they are useful, they are mostly complicating your life. Of course all of this depends on ones background and knowledge. If you have a strong software development background, a fullfledged IDE might not be a problem at all. But if you are new to both development and electrical engineering you'll probably be better off starting with the existing building blocks, at least until you know how to use them and understand why you need something different. Personally, I often start with simple Arduino stuff for prototyping. If the project works out, I might design up a small custom board to host it instead of using standard arduinos. |
| Navigation |
| Message Index |
| Next page |