Postby hohisilver » Mon Jan 23, 2012 6:17 pm
These are my config settings; I may have reassigned some pins from the original PBP code so they may not be totally correct but at least you might avoid some of the "trial-and-error" I had to go through. I was intending to fit a ceramic resonator at some point hence the "#if" but I haven't done much on this project for a while so mine's still running at 8MHz internal. If you fit a resonator you'll need to reassign the pins as we are currently using them for other purposes:
#if _XTAL_FREQ == 8000000 // 8MHz internal
__CONFIG(1, FCMEN_OFF & IESO_OFF & OSC_IRCIO67);
#else
__CONFIG(1, FCMEN_OFF & IESO_OFF & OSC_HS);
#endif
__CONFIG(2, BOREN_BOHW & BORV_3 & PWRT_OFF & WDT_OFF & WDTPS_4096);
__CONFIG(3, PBADEN_OFF & LPT1OSC_OFF & MCLRE_ON);
__CONFIG(4, LVP_OFF & STVREN_OFF & BBSIZ_1024 & XINST_OFF & DEBUG_OFF);
__CONFIG(5, CP0_OFF & CP1_OFF & CP2_OFF & CP3_OFF & CPB_OFF & CPD_OFF);
__CONFIG(6, WRT0_OFF & WRT1_OFF & WRT2_OFF & WRT3_OFF & WRTC_OFF & WRTB_OFF & WRTD_OFF);
__CONFIG(7, EBTR0_OFF & EBTR1_OFF & EBTR2_OFF & EBTR3_OFF & EBTRB_OFF);
Ian.
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....