Re: Internal Osccillator help
you can also do something like this to allow your code to compile for different processors...
Code:
#IF __PROCESSOR__ = "16F1828" or __PROCESSOR__ = "16F1829"
#CONFIG
__CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_OFF & _MCLRE_OFF & _CP_ON & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
__CONFIG _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_OFF & _BORV_25 & _LVP_OFF
#endconfig
#else
#IF __PROCESSOR__ = "16F690"
#CONFIG
__CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_OFF & _MCLRE_OFF & _CP_ON & _CPD_OFF & _BOD_OFF & _IESO_OFF & _FCMEN_OFF
#endconfig
#ELSE
#ERROR "Program does not support " + __PROCESSOR__
#ENDIF
#endif
#msg "compiling for target " + __PROCESSOR__
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks