Microcontroller :
Basically, microcontroller is one kind of Integrated circuit (IC) which can be defined as the single chip computer. Microcontroller is very similar with computer and a microcontroller contains processor ,I/O ports, RAM, EEPROM etc. Microcontroller is a little computer which is designed to govern the operation of embedded systems in motor vehicles, robots, office machines, complex medical devices, mobile radio transceivers, vending machines, home appliances, and various other devices.
If you like to get more details, here is a link wikipedia
PIC 18f2550 Micocontroller's Pin out
Some necessary information about PIC 18F2550 Microcontroller are given here :
PORTA : Pins from RA0-RA7 are included to PORTA. Those pins can perform in
both operation input and output. Those pins are also used for converting Analog signal to Digital signal.
If we write PORTA.F0 =1, RA0 the pin gets VDD. When PORTA.F0 =0, the pin gets GND. As we like to use PORTA for I/O, it is required to select related RESISTER. We can initialize RA0 as input by TRISA.F0=1 and TRISA.F0=0 for output.
PORTB : Pins from RB0-RB7 are included to PORTB. Those pins also can perform in both operation input and output. Those pins have ADC functions also. If we write PORTB.F0 =1, RB0 the pin gets VDD. When PORTB.F0 =0, the pin gets GND. As we like to use PORTB for I/O, it is required to select related RESISTER. We can initialize RB0 as input by TRISB.F0=1 and TRISB.F0=0 for output.
PORTC : Generally we use RC0,RC1,RC2,RC7,RC6 for input /output. If we write PORTC.F0 =1, RC0 the pin gets VDD. When PORTC.F0 =0, the pin gets GND. As we like to use PORTC for I/O, it is required to select the RESISTER. We can initialize RC0 as input by TRISC.F0=1 and TRISC.F0=0 for output.
USB Communication Pins : The 14, 15 and 16 number pins are used for USB communication.The microcontroller supports USB 1.0 .
*Pin 14 ----- Vusb [Which is connected with 220nf capacitors in USB communication]
*Pin 16 ----- D+
*Pin 15 ----- D-
Pins for Serial Communication : Basically 17and 18 pins are used for RS232 communication. The 17th pin is RC6 and 18th pin is RC7. Here we use 17th pin or RC6 pin as Tx and 18th pin or RC7 pin as Rx. Tx for transmitting signal and Rx for receiving signal.
VDD , VSS & MCLR :We need to supply 5 volt to run the microcontroller .VDD pin should be connected with +5V and all VSS pins should be connected with groung(GND).
Here is the important thing, the MCLR pin is used to resetting microcontroller and it's also called the Master RESET pin.
When MCLR==1, it's not activated and in MCLR==0 it's activated.
INTERRUPT : Basically interrupt means restrict something. We can use INT pin for enabling and disabling interrupt in microcontroller. INT=1 for enabling interrupt and INT=0 for disabling the interrupt. During INT=1 others process should be disabled.
Clock : With a view to measuring the time, we need crystal and two 22pf capacitors. If we use 12MHz crystal, we can measure time period by it. 9th and 10th number pins [OSC1 &OSC2 ] are used for connecting crystal.
Pic microcontroller also has SPI , I2C connection options. I didn't describe about SPI because at beginning state you don't need this. When you will be an expert, automatically you will be informed about this. You will know about I2C communication in Real Time Digital Clock Project
If you are a beginner, I would recommend you continue Newer Posts one by one. From this blog, you can download some software packages also.
Very informative, simple and direct! Great article my friend. Hugs from Argentina!!!
ReplyDeleteAh! Thank you! Hugs from Bangladesh!
Delete