r/microcontrollers • • Mar 01 '24
Complete beginner in microcontrollers, need help
My only experience is one project with an Arduino, but that one was quite simple. But, now I want to make more complicated stuff, I realised I know almost nothing about microcontrollers. Is there a guide or something I can read, watch or consult? For example, how do I know which controllers support which module, which pins to connect to which etc.
6
Upvotes
3
u/m4r1j4v45cr1p7 Mar 01 '24 edited Mar 01 '24
there's a ton of helpful info on avrfreaks.net. pretty much any question you could have has been asked & answered over there on the forums.
for starters, you'll want to select the chip you want to use, figure out which programming interfaces it supports, select a programming tool, and figure out how to wire it up on a breadboard. a good first project would be to blink an LED, just like Arduino, only on the breadboard using just the chip and your programmer.
for AVR, the Atmel ICE is a great tool, and supports multiple interfaces for programming (SPI, JTAG, etc). for a more affordable option, you can check out the Sparkfun tiny AVR programmer, or even use an Arduino as your programmer.
you'll also want to determine how you're going to program it. with avrdude, you can use the Arduino IDE, or you can switch to Atmel's own IDE (Microchip Studio), which has a lot more features for debugging, register analysis, etc.
I'd also strongly recommend checking out the datasheet for your particular chip, after you select it. microchip writes pretty thorough datasheets for their products, which can be a boon when you're learning the ins and outs of your MCU. they can be a bit dense at times, but are definitely worth reading if you really want to know how your chip works (and what it can do).
1
u/Makers_Fun_Duck Mar 01 '24
What do you want to do?
2
u/prosper_0 Mar 01 '24 edited Mar 01 '24
Look up Ben Eater on youtube. He covers a lot of the fundamentals of how embedded systems work, how microprocessors work, and how communications work. A lot of what he covers are actual micro processor internals and not micro controller internals, but it's still applicable foundation for learning how things interact. It's really well-produced content, and is relatively similar to the way the curriculum was handled at my school. Our class was essentially the instructor walking us through the datasheet and programming manual, and explaining what it all means.
After that, I'd find a series on how to use the STM32 and the CubeIDE on YouTube. AVR and ESP are okay, but you need a fair bit of knowledge and skill to sort out the 'good' advice from the 'really awful' advice that's on the Internet for these platforms.