Yep, looks good to me. As you can see, the different configuration settings for the oscillator (and everything else) are at the bottom of the P16F886.inc file (the one in the MPASM folder):On the 16F886 there are two CONFIG words (on other chips there are more) so if you need to change something that resides in another CONFIG word you have to add a second line, likeCode:_LP_OSC EQU H'3FF8' _XT_OSC EQU H'3FF9' _HS_OSC EQU H'3FFA' _EC_OSC EQU H'3FFB' _INTRC_OSC_NOCLKOUT EQU H'3FFC' _INTRC_OSC_CLKOUT EQU H'3FFD' _EXTRC_OSC_NOCLKOUT EQU H'3FFE' _EXTRC_OSC_CLKOUT EQU H'3FFF' _INTOSCIO EQU H'3FFC' _INTOSC EQU H'3FFD' _EXTRCIO EQU H'3FFE' _EXTRC EQU H'3FFF'Then you have your defaults and it is what will be included in every program you compile for that particular target, no need to have them in your code if you don't want to.Code:__config _CONFIG2, WRT_HALF & _BOR21V
/Henrik.




Bookmarks