Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with PIC 16f72??

Status
Not open for further replies.

deadly123

New Member
Hi all,
I am new to PIC programming and just started PIC programming the other day.. I wrote this simple code and burn it in PIC but the PIC seems dead and doesn't work at all..

#include<htc.h>
#include "delay.h"
#define _XTAL_FREQ 20000000
__CONFIG (UNPROTECT &BORDIS &WDTDIS &PWRTEN );
void main()
{
TRISC6=0b0;
while(1)
{
RC6=0;
DelayMs(500);
RC6=1;
DelayMs(500);
}
}

I have MCLR pulled up with 4k7 resistor and 20MHz crystal in pin OSC1 and OSC2 with 22pF capacitor grounding them. I just can't figure out the problem.. HELP??
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top