Melanie's got you covered.
Presetting Configuration Fuses (PIC Defines) into your Program http://www.picbasic.co.uk/forum/showthread.php?t=543
<br>
Melanie's got you covered.
Presetting Configuration Fuses (PIC Defines) into your Program http://www.picbasic.co.uk/forum/showthread.php?t=543
<br>
DT
This is for the 452 but I think it should be pretty much the same thing.
Code:@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HSPLL_OSC_1H ' Oscillator Switchover Disabled ' Oscillator Type HS PLL @ __CONFIG _CONFIG2L, _BOR_ON_2L & _PWRT_ON_2L & _BORV_45_2L ' Brown-Out Reset Enabled ' Power-Up Timer Enabled ' Brown-Out Reset Voltage 4.5V @ __CONFIG _CONFIG2H, _WDT_ON_2H ' Watch Dog Timer Enabled @ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L ' Stack Over/Underflow Reset Enabled ' Low Voltage ICSP Programming Disabled ' Background Debugger Disabled
Sorry I didnt reply to this sooner but ive just got my hands on a 18f252, Im still having problems setting the oscilator type in the config. Im trying to set it for a 4mhz crystal. What do I have to add to the following line.
@ __CONFIG _CONFIG1H
Thanks for the replys so far Sphere...
Sorted the problem out with the config, it was down to the default setting in pic basic pro inc files, just cleared the default settings and it now compiles without errors. Ive another issue, my program was wrote for a pic 16f876, it runs perfect. But when loaded on to an 18f252 it runs initially but then it will either reset or just lockup the program. I assume it down to the extra features in the 18f252 which need turning off. If possible can someone post the options for turning these features on and off.
Thanks Sphere...
Bookmarks