Help with 12F683

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Post Reply
Cono
Posts: 2
Joined: Thu May 15, 2014 3:24 pm

Help with 12F683

Post by Cono » Thu May 15, 2014 3:42 pm

Hey, i decided to start with PIC programming today and i bought a clone of the pickit 2 with zif socket. My first test was the 12F683 using MicroC Pro and pickit 2 software. Using this code:

void main(void)
{
while(1)
{
GPIO.B2 = 1;
Delay_ms(1000);
GPIO.B2 = 0;
Delay_ms(1000);
}
}

But it does nothing. The code seems to be written fine. Im confused with the MCLR pin and im just using a 100 ohm resistor from the GP2, 5v to VDD and MCLR to 5v. Is this correct? I've tried MCLR to ground with and without resistors
Thanks!

jremington
Support Volunteer
Posts: 2342
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: Help with 12F683

Post by jremington » Fri May 16, 2014 8:31 am

MCLR (if that function of the pin is even activated by the fuse settings) should be high, for example connected to Vdd with a 10K resistor.

Did you compile the program and successfully program the chip?
What clock and other fuse settings did you use?
How did you go about determining that "it does nothing"?

User avatar
leon_heller
Support Volunteer
Posts: 5734
Joined: Sun May 01, 2005 11:20 am
Location: St. Leonards-on-Sea, E. Sussex, UK.

Re: Help with 12F683

Post by leon_heller » Fri May 16, 2014 9:39 am

Also, you have to set your output pin as an output. The default setting is as an input.
Leon Heller
G1HSM

Cono
Posts: 2
Joined: Thu May 15, 2014 3:24 pm

Re: Help with 12F683

Post by Cono » Fri May 16, 2014 10:44 am

Thanks so much for the replies.
Turns it, i didn't declare the output pins nor the oscilator as interal. Everything is working now!
Thank you!

Post Reply