This is my first article and I am trying to give the main concept of microcontrollers. In this article, I give you a rough idea about what is a microcontroller.
A microcontroller is like a computer. We can give inputs and it gives outputs relevant to the inputs. There is a small memory in a microcontroller. First, we should finish the coding part using relevant software(ex: Atmel Studio), and then we can upload that code into the microcontroller through the specific software(ex: Progisp).
As an example, If we want to check whether is an object in front of a given place, We can develop a small hardware module to identify that object.
Types of Microcontrollers
Here I have mentioned two types of microcontrollers and examples for each type.
How do these chips differ from each other?
I think most of us have this problem. Therefore I’ll take two types of AVR microcontrollers to clarify that your doubt.
01)Different number of pins
Eg:- ATmega32 has 40 pins and ATmega16 has 28 pins.
02)Different internal memories.
03) Different interrupt tables
04) Different features.
Every microcontroller has its own datasheet which provides the specifications of the microcontroller. You can choose the ideal microcontroller for your project by going through the data provided in the sheet. We can get details about,
→what is the pin configuration
→ what is the function of every and each pin (pin description)
→ what is the internal architecture of that microcontroller, and many more details.
Refer to this link to get more ideas for your clarity. (Link)
Let’s talk about how to interface any I/O component to the microcontroller. I got some important steps to achieve that case.
01)Select a suitable microcontroller.
In this case, we have to realize what are the features we want and what are the limitations of the microcontroller? How many I/O components do you hope to connect to the microcontroller? and some other facts. After that research, you can select your IC.
02)Select suitable input and output devices.
When you are selecting any component, you should have a rough idea about that component. As an example, If we dealing with a sensor as an input component, we should know about what type of output signal will it gives. Because input components are giving signals may be analog or digital to IC.
03)Refer to the datasheet and Determine the pins of the microcontroller.
The next step is, We should Determine the pins of the chip. As an example, ATmega32 has four 8-bit I/O ports named PORTA, PORTB, PORTC, and PORTD, which are all general-purpose and most have dual functions(I/O). The PORTA can be used for reading analog quantities via the A/D converter(Analog-digital converter). According to that, design the circuit.
04)Write the code using proper software and upload the code to the microcontroller.
This is a very basic introduction to the microcontrollers. I think this article is useful to beginners and I hope to bring the next article about how to blink a LED from the beginning using ATmega32 microcontrollers and hope to give very important points for our projects :). See you soon.