In the previous tutorial, I explained Getting Started with PIC microcontrollers and the software etc. Today, I am going to explain the hardware of PIC18F452 i.e. the functions available in PIC18F452. In other words, working of pins. We have a total of 40 pins in 18F452 microcontroller. Different PIC microcontrollers have different pins and different functions. Some of the PIC Microcontrollers lack the below functions and some of them have much more functions than these. So, here I am just discussing the PIC Microcontroller 18F452 because it is a moderate one and is mostly used in engineering projects. It's an 8-bit microcontroller. So now we are gonna have a look at the functions available in the PIC18F452 microcontroller. In the next tutorial, I have discussed How to install MPLAB software in Windows and have also discussed How to Install MPLAB C18 Compiler.
There are a total of five ports in PIC18F452. Each port is 1 byte (8 bits) and so each port has 8 pins of microcontroller except the portE which has 3 pins. These ports are named as:
You can access any pin of any port. Ports' pins are assigned as 0,1,2,3,4,5,6,7 and 7 being the most significant bit and 0 the least so suppose I want to use PIN 3 of port B then I will write RB2. We will see it in more detail in the coding section and as it's just the hardware section I am not going into detail about this.
We have a total of four built-in timers in the PIC18F452. These timers are also used as counters. We can set them to count anything or to set delays etc. For example, we want to make a digital watch on LCD using PIC, in that case, we will use timers to count. Four timers used in PIC18F452 are:
PIC18F452 also supports serial interfacing using TX & RX pins. Suppose we are using any sensor and want to make a graph of its output on the PC, then we will attach the sensor to any of the input pins and then send its data to the computer using TX and RX pins. In PIC18F452:
We use the TX pin of the PIC when we want to transmit data from the PIC to the computer and RX when we want to receive data into the PIC.
These are some advanced-level functions that I will explain in the advanced section but interested readers can ask in comments or can contact me. However, sooner or later, I will post about all of them in detail.
In the last tutorial, we discussed Getting Started with Microcontrollers and how they work and now we are gonna have a look at Getting Started with PIC Microcontrollers. PIC microcontrollers, as I mentioned before, are manufactured by Microchip. There are many types of microcontrollers but here I am concerned with PIC18F452.So let's have a small review of PIC18F452 PIC microcontrollers.
PIC18F452 is a 40-pin microcontroller each pin has its functionality, which we will see in our next classes one by one. suppose I want to create a project on LED blinking, a simple project on PIC so what do I have to do? First of all, I need the following things so that I may use them to work with PIC. I have discussed the Functions available in the PIC18F452 Microcontroller in the next post.
NOTE: We will learn the Assembly & C language in our next classes. This software has already been sent to all the registered users. If you need it, then Subscribe to our Email Notification and this will be forwarded to you. Thanks.
Now remove your PIC microcontrollers from the Programmer and add them to the hardware circuit and you will check that your PIC will give you the same results as you have programmed in it. In this tutorial, we have just taken an overview of PIC Microcontrollers. Next, we will check its Ports and the purpose of these ports. Till then take care ALLAH HAFIZ .... :))
Hey guys hope you all are fine and healthy. Today I am going to start a new tutorial, about PIC Microcontrollers. I will start from the very basics of PIC Microcontroller so that the beginner can also learn from it and can easily work on their projects and I will also post some projects in which I will use PIC Microcontroller and will control different modules using it.
The only thing I hate about PIC Microcontroller is the designing of its basic circuit, which we will discuss in coming tutorials, that's why I prefer to work on Arduino which is way more user-friendly than PIC Microcontroller but if look at the brighter side of PIC Microcontroller than it is much more flexible in option as compared to Arduino. Let's start today's tutorial, today I will just give an overview of what actually Microcontroller is and why to use it. So, let's begin with getting started with microcontrollers.
Microcontrollers are used to put the brain in your projects. Let's take an example, you have seen different light patterns at weddings or different functions where it seems like lights are walking, sometimes they show some characters glowing on and off quickly, etc. Before microcontrollers such patterns of light were very difficult you need a a lot of circuitry (serial & parallel combinations of lights) and then have to decide which light to on and which to off. A big messy thing but with the invention of the microcontroller, now you just have to add a microcontroller and put in some coding and you are done. That's the benefit of the microcontroller. and second thing in order scenario if something goes wrong then you have to change the hardware connections but in the microcontroller just change the code and you are done with no need for soldering etc.
There are different microcontrollers manufactured by different companies these days. A few of them are:
but all of them have the same function. Let's look at their function.
A microcontroller is a simple chip (IC). We are not discussing its internal architecture as it's beyond the scope of this tutorial. We are here just concerned with its output. So a microcontroller is just a simple hardware chip. Now how to operate that chip is a question. A microcontroller has different no of pins some have 8 pins some 16 and some 40 even have 80 pins. Each pin has its function and we tell the microcontroller what function each pin will perform by adding a code in the microcontroller.
PIC microcontrollers are manufactured by a company named Microchip. There is a wide variety of PIC microcontrollers. They are named PIC16F877A or PIC 18F452. The first two numbers show the series like the PIC16F series and PIC18F series. Each series has its own functions and qualities and the number of pins also varies. In my tutorial, I am gonna use the PIC18 F452 which is shown in the above figure too.
That's all for right now. I will continue it after afternoon. Stay blessed .... :))