Page 1 of 1

Programming a PIC12F629

Posted: Tue Jul 22, 2008 6:43 pm
by spryderweb
I am having issues programming the '629 and getting it to work on the development board ver3 HP-488-00-3. I use flowcode. After I compile to chip it says that it is finished but nothing works on the board. I have tried something as simple a just turning on a port so the LED will light. If I use the 16F88 it works fine. Am I missing something on the '629?

Re: Programming a PIC12F629

Posted: Wed Jul 23, 2008 10:27 am
by Benj
Hello

What configuration are you using to set up the 629? This could be the cause of it not running your program.

Re: Programming a PIC12F629

Posted: Wed Jul 23, 2008 2:20 pm
by spryderweb
Using the simple config in Flowcode I entered the following:

Select Chip 12F629
Oscillator XTAL
Watchdog OFF

If I change the Oscillator to RC it give me a OSCCAL error.

Is this what your looking for?

Re: Programming a PIC12F629

Posted: Wed Jul 23, 2008 2:46 pm
by Benj
Hello

What is your clock speed set to to give the OSCCAL error?

Also which pin are you trying to light up an LED on? I think bits 4 and 5 are configured to use the oscillator unless you are using the internal oscillator. Even if you are using the internal oscillator the XTAL pins are hardwired on the V3 Dev board and therefore you will not be able to see the output changes.

Re: Programming a PIC12F629

Posted: Wed Jul 23, 2008 3:11 pm
by spryderweb
Clock Speed set at 19.6MHz

Your second statement might be it. I am trying to light and LED using pin 5. Opps. The other is with pin 3 and that doesn't work either. humm I'll try a different configuration of pins.

Re: Programming a PIC12F629

Posted: Wed Jul 23, 2008 4:10 pm
by Benj
Hello

Ok by default the 12F629 has the following inputs / outputs.

GP0 - Connected to HP488 LB7
GP1 - Connected to HP488 LB6
GP2 - Connected to HP488 LB2
GP3 - Setup as reset by default, Connected to HP488 Reset button - Can be converted to an input via the advanced configuration, No output function for this pin.
GP4 - Setup as OSC2 by default, Can be converted to an input/output via the advanced configuration, Connected to HP488 Crystal
GP5 - Setup as OSC1 by default, Can be converted to an input/output via the advanced configuration, Connected to HP488 Crystal

Hope this helps.

Re: Programming a PIC12F629

Posted: Wed Jul 23, 2008 8:41 pm
by spryderweb
Very helpful, thank you.

Can I change the advance configuration in Flowcode? I see where I can go to the expert config screen but don't see where to do this?

Re: Programming a PIC12F629

Posted: Thu Jul 24, 2008 1:36 pm
by Benj
Sorry by advanced configuration I mean Expert configuration.

GP3 is controlled by the MCLR setting and GP4 and GP5 are controlled by the oscillator setting.