Page 1 of 1

PIC12f609 use GP0 and GP1 ad digital input

Posted: Tue May 18, 2010 11:20 am
by Albert38
Hello,

I have trouble using GP0 and GP1 as digital input on the pic12f609. After reading the datasheet I found a possible error in the FCD file that belogs to this chip.
Am I right that the line containing Initialise="" must be Initialise="ansel = 0;\n" to use GP0 and GP1 as digital input ?

Or is there an other way to configure the chip in flowcode leaving the FCD file origional ?

Re: PIC12f609 use GP0 and GP1 ad digital input

Posted: Tue May 18, 2010 3:22 pm
by Benj
Hello,

Yes you can modify the FCD file to include the line.

Initialise="ansel = 0;\n"

You will need to close and reopen the flowcode file for the FCD changes to be read.

Or you can ad the following line of C code to the start of your program.

ansel = 0;

I have modified the default FCD for future versions of Flowcode.

Re: PIC12f609 use GP0 and GP1 ad digital input

Posted: Thu May 20, 2010 6:19 am
by Albert38
By the way there are a lot more PIC chips that have these setting by default on Comparator.

Re: PIC12f609 use GP0 and GP1 ad digital input

Posted: Thu May 20, 2010 8:58 am
by Benj
Hello Albert,

Yes this chip must have somehow made it through the net when we were updating the FCD files. Most of the devices already switch off the comparitor and analogue functionality by default on startup so you do not have to manually do it. I have also updated the 12F609 FCD file so that this mod will be included in the next release.