Hello everyone. I’m going to start a new tutorial series on pic programming, which could be very useful for beginners. First, I wish to give a brief description on microcontrollers and then move on to the next section, PIC16f84a programming using C language. Once you have understood the basics of the PIC, let’s move on to PIC18 series.
What is a microcontroller?
In brief, microcontroller is a kind of a small computer, packed in a small IC. Think of an ordinary computer for an instance. They come with a RAM, ROM, CPU, Hard drive, Input/Output devices, ports and a mainboard to connect them all together. In a microcontrollers also, all those things are there, but they are built in and sealed. So it’s not possible to change hardware configurations as we wish.
Applications of microcontrollers
Nowadays, there are microcontroller based systems in almost all of the electronic appliances. They are there in TV sets, DVD players, microwave ovens and everything. Even the remote controller of a TV or the LCD display of a microwave oven are driven by microcontrollers. So it’s very important for any IT/ electrical/electronic professional to have a good knowledge about these devices.
This is a small microcontroller, manufactured by “Microchip”, one of the leading semiconductor manufacturers. There are 18 pins, arranged as 9 in a side.
PORTA(RA0 to RA4)
PortA or RA is an I/O port, which could be used as an input or as an output. The port has 5 pins, so it could work as a 5 bit port, where the bit numbers are from RA0 to RA4.
PORTB(RB0 to RB7)
PORTB also similar to PORTA, except the fact that it has 8 bits.
OSC1 and OSC2(CLK IN and CLK OUT)
An external oscillator is connected to these pins. (In this case, we wish to use a 4MHz crystal oscillator.)
VSS, VDD and MCLR
VSS is the positive power supply of the PIC. VDD is the negative power supply pin. MCLR is used when we program the PIC microcontroller. However, it is normally connected to the positive power supply pin using a resistor.
INT pin is used to get a special input called “interrupts” . More on this pin comes later.
If you don’t get any of these things, just relax. You’ll understand everything when we start to write programs, which means from next post onwards.
Got any doubts? Feel free to post a comment. I’ll reply ASAP.