Delay Based LED Blinking Program

Here is a simple code for Blinking a LED. The LED is connected to P2.0 & 12MHz crystal is used. The Anode of the LED is given to Vcc through a resistor & the cathode is connected to the microcontroller pin. Please check this link to see how to interface LED to Microcontroller. The LED is ON for One Second & OFF for ONE Second. This delay of ONE Second can be changed by changing the values loaded into the R7, R6 and R5 in the delay subroutine. The higher the value loaded the higher the delay. Since the controller is 8 bit microcontroller values greater than 255 cannot be loaded.

Get In Touch

DNA Technology is an Online shop for Electronic Components in India. We have successfully delivered various IC's, MOSFET, Transistors, Sensors, Nextion Displays, 18650 Lithium ion Battery, Arduino, and various other Electronic parts required for your project. List of some of cities we have dispatched to: