PIC16F84 Simple LED Blink PIC-C

| May 6, 2016 Updated
PIC16F84 Simple LED Blink PIC-C

In this project, I PIC16F84A microcontroller PORTB bits to 0 (RB0) LED (light emitting diode) is connected. In the project, this LED is extinguished and burned at intervals of 250 milliseconds. was operated with a 4MHz crystal microcontroller. RB0 port (pin 6) is connected to a resistor and an LED.

PIC16F84 LED Blink Schematic

pic_led_yak

PIC16F84 LED Blink Code


/*--------------------------------------------------------------------
*
* 	LED Blink PIC-C
*	===========================
*
* Yazan: Dogan Ibrahim
* Tarih:   Mart 2003
* Dosya: PROJE1.C
*--------------------------------------------------------------------
*/
#include <pic.h>
#include <delay.c>

main(void)
{
TRISB = 0;			// PORTB bits do outputs

for(;;)				//continuous loop
{
RB0 = 0;		// LED OFF
DelayMs(250);		//250ms wait
RB0 = 1;		//LED ON
DelayMs(250);		//250ms wait
}
}

Source: http://www.yayinevi.bilesim.com.tr/images/PROJE5-1.doc

Published: 2008/07/22 Tags: , , , ,



1 Comment “PIC16F84 Simple LED Blink PIC-C

Leave a Reply

Your email address will not be published. Required fields are marked *