Can someone point me to a really good tutorial on electrical engineering, mainly avr stuff. I have looked at alot and none in my opinion really give a complete idiot like my self a good place to start.
-
It could help to study a microcontroller-agnostic electronics book (or tutorial) first. A classic text for this is [The Art of electronics by Horowitz and Hill](http://en.wikipedia.org/wiki/The_Art_of_Electronics) ([more here](http://electronics.stackexchange.com/questions/616/basic-electronics-book)). Back in the day, this book made it easier for me to pick up microcontrollers. – Nick Alexeev Dec 21 '14 at 04:07
-
Win Hill has indicated that (as of the beginning of this month) the final edits of the 3rd Edition of AoE have finally been completed. I've only seen one chapter, but from that I can say that it's a significantly enhanced tome indeed. It should be on the shelves some time next year. – Spehro Pefhany Dec 21 '14 at 05:06
-
For a nice overview of the nuts and bolts of microcontrollers, try [this](http://www.freescale.com/files/microcontrollers/doc/ref_manual/M68HC05TB.pdf) – EM Fields Dec 21 '14 at 08:38
1 Answers
Electrical engineering is a very broad field. What parts you need to study depends on what sort of projects you want to do. Here are some areas that may be relevant to microcontroller projects:
- Basic circuit theory (voltage and current, power, resistance, Ohm's Law, Kirchhoff's Laws)
- Digital logic (boolean algebra, logic gates)
- Computer architecture (IO pins, registers, addressing, memory-mapped peripherals, interrupts)
- Embedded software (toolchains, C, assembly, memory management, what a linker actually does)
- Common microcontroller peripherals (timers, PWM, SPI, ADC, etc.)
- Basic electronics (diodes and op amps)
- Basic power conversion (linear regulators)
- Intermediate electronics (transistors)
As you can see, there's quite a lot, so it helps to narrow it down. Without knowing much about your background, it's hard to suggest a good course of study. (For instance, if you already know C, that will make life much easier.) The main question is whether you're more interested in analog or digital projects. Microcontrollers are used for control and communication. So what are you controlling, and what are you talking to?
Probably the most important thing to start with is your toolchain. You can use an IDE (Atmel Studio), and there's lot of example code available from Atmel and from other people online. Going through the compile/link/load/run process a few times will be very helpful.
You'll need to be able to program in C. If you don't know it, The C Programming Language by Kernighan and Ritchie is an excellent book. Pay special attention to pointers. If you want a book with a general overview of embedded programming, try Making Embedded Systems by Elicia White.
Start with IO pins. Using example code, figure out how to make pins either inputs or outputs, how to control the state of an output, and how to read the state of an input. Make some LEDs blink and some buttons turn them on and off. A little knowledge about voltage, current, and resistance helps on the hardware end.
From there, it's up to you. For analog projects, you'll need to know circuit theory and electronics. For digital projects, you'll need to learn about logic and communication protocols. To move beyond a development board and/or a bench-top power supply, you'll need to learn about power conversion.
What resources are best for learning about these depends on your learning style. Do you prefer a more serious, disciplined approach using textbooks? Would you rather read shorter articles on the internet? Or do you just want to put together things that other people have designed?
If you want textbooks, you might start with Hayt and Kemmerly for circuit theory. The Art of Electronics by Horowitz and Hill is a good choice for analog electronics and some basic digital stuff. Basic digital logic is too easy to really need a book.
A really great online resource is the Falstad circuit simulator Java applet. It'll help you to develop an intuitive understanding of what's going on in a circuit. There are lots of built-in demo circuits, too!
I can probably suggest more resources if you clarify your goals, so please do so if you can.

- 21,331
- 4
- 50
- 91
-
I'm in hs, so all I really want is a good understanding of electrical engineering to put together a small robot or something. Thx for the good answer. – user298729 Dec 22 '14 at 03:43