PIC Project


How to interface LEDs with PIC Microcontroller (PIC18F4550)

It is necessary to understand basic I/O operations of PIC18F4550 before dealing with its complexities. This article presents a way to take simple output from a PIC microcontroller. This learning would also help in interfacing of external devices with the controller. Here the output from the microcontroller is taken on a set of LEDs which are made to blink in an alternate fashion.

Circuit Diagram
Code
// Program to Interface LED with PIC18F4550 Microcontroller

// Configuration bits
/* _CPUDIV_OSC1_PLL2_1L,  // Divide clock by 2
   _FOSC_HS_1H,           // Select High Speed (HS) oscillator
   _WDT_OFF_2H,           // Watchdog Timer off
   MCLRE_ON_3H            // Master Clear on
*/

void main()
{
 TRISB=0x00;   // Set PORTB as output PORT
 LATB=0xFF;   // Set PORTB high initially (All LEDs on)
 while(1)
 {
         LATB = ~LATB;  // Toggle the value of PORTB
         Delay_ms(1000);  // Delay of 1 sec
 }
}

How to interface LCD with PIC18F4550 Microcontroller

The character LCDs are the most commonly used display modules. These LCDs are used to display text using alphanumeric and special characters of font 5x7/5x10. For basic working and operations of a character LCD, refer LCD interfacing with 8051. Here PIC18F4550 has been used to display a single character on a 16x2 character LCD.

Circuit Diagram

How to interface RFID with PIC18F4550 Microcontroller

RFID (Radio Frequency Identification and Detection) is widely used everywhere from highly secured defense laboratories to school attendance system. By employing RFID, much secured entry systems can be developed without incurring huge costs. These are the reasons of excessive use of RFID technology. In this article, interfacing of an RFID reader module has been explained with PIC18F4550. The USART interrupt, an internal PIC interrupt, has also been explained. (For more details on USART, refer PIC EUSART)

 Circuit Diagram

How to interface Stepper Motor with PIC18F4550 Microcontroller

A Stepper Motor is a brushless, synchronous DC motor which divides a full rotation into a number of steps. For detailed information on working, types and stepping modes, refer the article on Stepper Motors. Here the operation of a unipolar Stepper motor with PIC18F4550 microcontroller has been explained.

Circuit Diagram
For code post comment here..below...

No comments: