> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf > Of Info > Sent: Friday, March 17, 2006 11:37 AM > To: Microcontroller discussion list - Public. > Subject: Re: [PIC]: mC18 v3 Killed my program / PIC18F458 ? > > Oscillator: HDD-PLL (i have a 10 MHz xtal) > Osc. Switch Enable: Disabled (not sure what this one does) > Power up timer: Enabled > Stack Overflow Reset: Enabled > The rest is disabled. > > Dont know howto make it part of the C-source as > with asm - that would be ideal. > use #pragma config Here is my setup for an 18F6585 project I happen to have handy #pragma config OSC=HSPLL, OSCS=OFF #pragma config PWRT=ON, BOR=OFF, BORV=42 #pragma config WDT=ON, WDTPS=1 #pragma config MCLRE=OFF, CCP2MX=OFF #pragma config STVR=ON, LVP=OFF, DEBUG=OFF #pragma config CP0=OFF, CP1=OFF, CP2=OFF #pragma config CPB=OFF, CPD=OFF #pragma config WRT0=OFF, WRT1=OFF, WRT2=OFF #pragma config WRTB=OFF, WRTC=OFF, WRTD=OFF #pragma config EBTR0=OFF, EBTR1=OFF, EBTR2=OFF #pragma config EBTRB=OFF This should give you some idea of how to do it. It's in the manual somewhere. -- Mark -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist