dolphinlabs
...
Doplhin labs
News

LED interfacing


Ř  Program Statement: Interfacing of single LED with 89C51 microcontroller.

Connections: Port   P0.0 = LED0(Source mode)

                          Resistor is connected to limit the current after LED.

                          Pull up resistor is connected before LED.

Hardware Connections for 8051 Board:-

1.      Give supply to 8051 board with the help of adapter

2.       Connect +5V pin of 8051 microcontroller to +5V supply and GND pin of 8051 microcontroller to GND pin of supply.

3.      Connect +5V pin of RS232 interface to +5V supply and GND pin of RS232 interface to GND pin of supply.

4.      Connect R2OUT pin of RS232 interface to RXD pin of 8051 and T2IN pin of RS232 interface to TXD pin of 8051.

5.      Connect +5V of LED interface block to +5V supply.

6.      Connect P0 pin controller to single LED of LED interface block using wire.

 

 

Circuit Diagram:

 

Program code:

#include<reg51.h>

  sbit led=P0^0;                  //define P0.0 bit as  led

  void delay()                                      //delay routine

  {

  int i,j;

  for(i=0;i<2000;i++);

  for(j=0;j<10000;j++);

  }

  void main()

  {

               led=1;                                                    //led  on

               delay();                                               //call delay

               led=0;                                                    // led off

               delay();                                              //call delay

  }

 

 

 

 

 

 

 

 



Warning: readfile(z9.php) [function.readfile]: failed to open stream: No such file or directory in /home/dolphinlabs/public_html/Word-SubMenu-Display.php on line 104

Get SOCIAL







SAFE & SECURE SHOPPING

visa card master card maestro card
Maverick IT Industries Pvt. Ltd.