00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00066 #include "pic24_all.h"
00067
00069
00070 #if (defined(__PIC24HJ12GP202__) || \
00071 defined(__PIC24HJ12GP201__) || \
00072 defined(__PIC24HJ32GP202__) || \
00073 defined(__PIC24HJ32GP202__) || \
00074 defined(__PIC24HJ16GP304__) || \
00075 defined(__DOXYGEN__)) // NOTE: DOXYGEN only used for documentation generation
00076
00077
00102 _FBS(BWRP_WRPROTECT_OFF);
00103
00104
00105
00106
00107
00127 _FGS(GSS_OFF & GCP_OFF & GWRP_OFF);
00128
00129
00148 _FOSCSEL(FNOSC_FRC & IESO_OFF);
00149
00174 _FOSC(FCKSM_CSECMD & IOL1WAY_OFF & OSCIOFNC_ON & POSCMD_SEL);
00175
00176
00211 _FWDT(FWDTEN_OFF & WINDIS_OFF & WDTPRE_PR128 & WDTPOST_PS512);
00212
00231 _FPOR(FPWRT_PWR16 & ALTI2C_OFF);
00232
00259 _FICD(BKBUG_ON & COE_ON & JTAGEN_OFF & ICS_PGD1);
00260
00262 #define CONFIG_BITS_DEFINED
00264
00265 #endif // #ifdef (lots of PIC24H devices)
00266
00267
00268
00269 #if defined(EXPLORER16_100P) && defined(__PIC24HJ256GP610__)
00270 _FBS(BWRP_WRPROTECT_OFF);
00271 _FGS(GSS_OFF & GCP_OFF & GWRP_OFF);
00272 _FOSCSEL(FNOSC_FRC & IESO_OFF);
00273 _FOSC(FCKSM_CSECMD & OSCIOFNC_OFF & POSCMD_SEL);
00274 _FWDT(FWDTEN_OFF & WINDIS_OFF & WDTPRE_PR128 & WDTPOST_PS512);
00275 _FPOR(FPWRT_PWR16);
00276 _FICD(BKBUG_ON & COE_ON & JTAGEN_OFF & ICS_PGD1);
00277 #define CONFIG_BITS_DEFINED
00278 #endif
00279
00280
00282
00283 #if (defined(__PIC24FJ64GA002__) ) || defined(__DOXYGEN__)
00284
00344 _CONFIG1(JTAGEN_OFF & GCP_OFF & GWRP_OFF & BKBUG_OFF & COE_OFF & ICS_PGx1 & FWDTEN_OFF & WINDIS_OFF & FWPSA_PR128 & WDTPS_PS512);
00345
00346
00392 _CONFIG2(IESO_OFF & FNOSC_FRC & FCKSM_CSECMD & OSCIOFNC_ON & IOL1WAY_OFF & POSCMD_SEL);
00393
00394
00396 #define CONFIG_BITS_DEFINED
00398
00399 #endif // #ifdef PIC24F processors
00400
00401 #if defined(EXPLORER16_100P) && defined(__PIC24FJ128GA010__)
00402 _CONFIG1(JTAGEN_OFF & GCP_OFF & GWRP_OFF & BKBUG_OFF & COE_OFF & ICS_PGx1 & FWDTEN_OFF & WINDIS_OFF & FWPSA_PR128 & WDTPS_PS512);
00403 _CONFIG2(IESO_OFF & FNOSC_FRC & FCKSM_CSECMD & OSCIOFNC_OFF & POSCMD_SEL);
00404 #define CONFIG_BITS_DEFINED
00405 #endif
00406
00407
00408 #ifndef CONFIG_BITS_DEFINED
00409 #ifdef __PIC24H__
00410 _FBS(BWRP_WRPROTECT_OFF);
00411 _FGS(GSS_OFF & GCP_OFF & GWRP_OFF);
00412 #ifdef IOL1WAY_OFF
00413 _FOSC(FCKSM_CSECMD & IOL1WAY_OFF & OSCIOFNC_ON & POSCMD_SEL);
00414 #else
00415 _FOSC(FCKSM_CSECMD & OSCIOFNC_ON & POSCMD_SEL);
00416 #endif
00417 _FOSCSEL(FNOSC_FRC & IESO_OFF);
00418 _FWDT(FWDTEN_OFF & WINDIS_OFF & WDTPRE_PR128 & WDTPOST_PS512);
00419 _FPOR(FPWRT_PWR16);
00420 _FICD(BKBUG_ON & COE_ON & JTAGEN_OFF & ICS_PGD1);
00421
00422 #warning Warning: Using default config bit settings in 'common/pic24_configbits.c' for PIC24H family.
00423 #warning edit 'common/pic24_configbits.c' to define bits for your processor!
00425 #define CONFIG_BITS_DEFINED
00427 #endif
00428 #ifdef __PIC24F__
00429 _CONFIG1(JTAGEN_OFF & GCP_OFF & GWRP_OFF & BKBUG_OFF & COE_OFF & ICS_PGx1 & FWDTEN_OFF & WINDIS_OFF & FWPSA_PR128 & WDTPS_PS512);
00430 #ifdef IOL1WAY_OFF
00431 _CONFIG2(IESO_OFF & FNOSC_FRC & FCKSM_CSECMD & OSCIOFNC_ON & IOL1WAY_OFF & POSCMD_SEL);
00432 #else
00433 _CONFIG2(IESO_OFF & FNOSC_FRC & FCKSM_CSECMD & OSCIOFNC_ON & POSCMD_SEL);
00434 #endif
00435 #warning Using default config bit settings in 'common/pic24_configbits.c' for PIC24F family.
00436 #warning edit 'common/pic24_configbits.c' to define bits for your processor!
00438 #define CONFIG_BITS_DEFINED
00440 #endif
00441 #endif
00442
00443
00444 #ifndef CONFIG_BITS_DEFINED
00445 #error Edit 'common/pic24_configbits.c' to add config bits for your processor!
00446 #endif