Let's Learn PIC Microcontrollers

Let's Learn PIC Microcontrollers
Create what you want by yourself

Tuesday, January 3, 2012

2. Introduction to the Microcontrollers

What are micro-controllers? Some of you may not know about it. But in the near future everyone will know about it because these days most of electronic instruments are made by using micro-controllers. Examples for those kind of instruments are motor cars, toys, cd/dvd players, radio, camera etc.
But in your real life you will need this to create your own circuits. For an example
Think that you want to measure current supply to your home and if voltage is above than what you want you can cut down the electricity until it get corrected. Pretty interesting ah!


As for learning purposes I use PIC 16F84A,628A,877A microcontrollers and those are around Rs.500(5$) in the market so anyone can practice this without much problems.


What is a microcontroller?


It is an IC(Integrated Circuit) also  it looks like an IC. This is a picture of a microcontroller which i am going to use in lessons.


But here not as normal ICs we program microcontrollers and we convert it to an IC we want. But we need to have a computer to write programs to microcontrollers and a special gadget to insert that program into the microcontroller. Later I will give you the guidance to make a similar gadget which is very expensive in the market. But do not worry because you need just less than Rs.200(2$) and I will tell you what to do in next lesson.
Actually microcontroller is a computer because it has a processor, memory, and a data source. So this is similar to a system unit of a computer. But the processing speed is very much low compare to the microprocessor in computers. But for our purposes this is more than enough.
So I think now you know something about microcontrollers. You will gain more knowledge on this as we go on.
 There are pins as a usual IC in a microcontroller but the difference is that you can use any output input as you like not as in IC which is previously defined.

So microcontroller communicate with outside with these input and output pins. In this pictures I have shown you a PIC microcontroller named PIC16F84A which is going to be used in my basic lessons.



Each and every microcontroller these input and output pins are grouped. As an example in PIC1684A has 5 pins grouped as PORTA (pin number 17,18,1,2,) and 8 pins groupe as PORTB (pin number 6,7,8,9,10,11,12,13). So this has 13 input/output pins. You can use these 13 pins to control the circuit you make. Let's say that you want to make a blinking LED , you can use any of above 13 pins and make your circuit.



I will explain how to do that in little later in my next lessons. You may noticed that there other pins also in the microcontroller and those are for giving power supply and clock impulses to the microcontroller.

Microcontrollers are executing programs according to the clock impulse given to it. Example of a clock impulse is given below.



In PIC16F84A you should give this impulse to pin 16 and 18. 

Don't worry with lessons you will understand everything.

This is how you should give the power supply to the microcontroller. When you give power to the circuit it execute the program written inside it by us. 


You will understand everything as we go on. Do not worry. I'm giving these here for completeness.


So now I think you have some kind of basic knowledge about microcontrollers. You will understand everything as we go on because i will teach you everything with free of charge. 


So see you in my next lesson which is about softwares you should use in microcontroller programming.
Please give me comments , suggestions, and if you have any problem please just ask.




No comments:

Post a Comment