Hi Pablo,
PBP has default config fuse settings in device specific header files. Look in your PBP directory for a file named 12F683.INC. Open this file.
You'll see the PBP default config fuse settings for this target PIC. It looks somthing like this;
This is used only if you're using the default PM asembler that ships with PBP.
device pic12F683, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
And this one is used when you're using the Microchip MPASM assembler.
__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
Notice how the default settings for /MCLR (GPIO.3) all have the reset function enabled (mclr_on, _MCLRE_ON)?
You can over-ride these default config fuse settings, and make GPIO.3 available as an input by editing the file, and changing it to mclr_off or _MCLRE_OFF, save the file, and re-compile.
Or simply add this line to the beginning of your code (if using the PM asembler);
@ device pic12F683, intrc_osc_noclkout, wdt_on, mclr_off, protect_off
Now you just need to make the pin an input by setting the appropriate TRIS bit.
Melanie posted a nice tutorial on config settings here:
http://www.picbasic.co.uk/forum/showthread.php?t=543 so I won't elaborate.
Bookmarks