PDA

View Full Version : configuration bits



Izone1173
- 17th June 2009, 19:18
hello,
I'm sorry if I've missed the answer, but can someone tell me how to include the configuration bits in a PicBasic file?
I need to set the internal oscillator on a 16f88 to 4Mhz and also enable MCLR, the only instructions I can find are for PicBasicPro, and they don't seem to work in PicBasic.
Thanks.

Archangel
- 18th June 2009, 00:07
Hi Izone 1173,
I do not have PBC and have no idea if this will work, but what do you have to lose by trying it?
For MPASM assembler.


asm
__config _CONFIG1, _INTRC_IO & _WDT_ON & _LVP_OFF & _CP_OFF & _MCLR_ON
endasm

In PBP, in the PBP root directory, each chip has a file called by chip number and the suffix .inc. There we have to comment out the default configs or change them to what we want them to be. Look and see if such a file exists in your PBC root directory, if so open it and look and or change as you need to.
The PBC manual only talks about setting the fuses in the programmer.

Izone1173
- 18th June 2009, 04:17
Thanks very much,

PBC has an INC directory with every chip in it, I'll try commenting out the configuration line there.