There are several common questions people ask when they begin learning about microcontrollers and I have found that a lot of the answers online to be from very experienced professionals who over think and over complicate the question. So before I become like them I thought i would answer these questions from the point of view of a person who just figured most of this out. So to begin let's list the most common questions I have seen from beginners.
- What is a microcontroller?
- What can a microcontroller do?
- Which microcontroller should I get?
- Where do I get a microcontroller?
- How do I program a microcontroller?
- How do I connect _______ to a microcontroller?
- How do I take over the world with a microcontroller?
- What is a microcontroller?
First, an Analog-to-Digital Converter (ADC) is a nice little gizmo that converts an analog signal into an digital signal. What this means is that you can convert a voltage from a sensor like a potentiometer into a numerical value that your program can then operate upon. A Digital-to-Analog Converter (DAC) does the opposite, it converts a digital signal into an analog one. One application of a digital-to-analog converter is in audio, sound is stored as numbers in memory and is then converted to an analog signal using the DAC.
The Universal Asynchronous Receiver/Transmitter (UART) is one of the ways you can communicate with your microcontroller. It is through this that you can talk to serial LCDs, USB, and RS232(desktop serial). Inter-Integrated Circuit (I2C) or 2-wire interface is intended for communication between ICs on a single board. I2C has addressing so that 112 nodes can communicate on the same bus, you would use I2C to add EEPROM (more storage) or a DAC to your project. Serial Peripheral Interface Bus (SPI) is a synchronous serial communication connection that is full duplex (two-way communication simultaneously). For example you can use SPI to connect a SD card to your microcontroller.
Pulse-Width Modulation (PWM) is a way of controlling things such as motors so that you can control speed. But instead of actually changing the amount of power supplied PWM just turns on and off really fast to give that illusion. You would use PWM for motor speed control and LED dimming. The watchdog timer is used by the system to reset the system if the main program freezes. It resets the system if it is not regularly updated by the processor. The other timers are used for things like real time applications. When something must happen by a certain time you would use a timer to ensure it happened on time.
So all this means is that a microcontroller is a system on a chip that has various ways of communicating to the world. By connecting sensors and mechanical devices to your microcontroller you can begin building interesting systems that can react to the environment, communicate with others, and gather data!