Saturday, 24 November 2018

PIC18 microcontroller- 8 LED toggle program with output check in Proteus .

PIC 18 Microcontroller toggle program
     
 The PIC18F4550 microcontroller.


This is schematic diagram of toggle. PIC 18 Micro-controller interface with 8 LEDs and that LEDs blinking continuously.Crystal oscillator is 4 MHz and 5v power supply.

Program:
--------------------------------------------------------------------------------------------------------------------------
       

   // PIC 18 Microcontroller toggle program
   // gawade916.blogspot.com 
   
   #include
   void delay();
   void main()
  {
    TRISD=0X00;//PORT D clear
    while(1)//loop
    {
        PORTD=0x55; //data
        delay(100);
        PORTD=0xaa;//data
        delay(100);
      }
     }
     void delay()
    {
      unsigned int i,j;
      for(i=0;i<200;i++)
     {
        for(j=0;j<200;j++);
       }
      }<200 code="" for="" i="" j="0;j<200;j++){}">
 
--------------------------------------------------------------------------------------------------------------------------

Execute the program and check the output on proteus software ,LED continuously blinking



Output on Proteus software



No comments:

Post a Comment