00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _CONFIGBIT_H_
00012 #define _CONFIGBIT_H_
00013
00014
00015
00016
00017
00018 #define XINSTEN 0xFFFF // Enabled
00019 #define XINSTDIS 0xFFBF // Disabled
00020
00021 #define WDTDIS 0xFFFE & XINSTDIS // Watchdog timer disabled
00022 #define WDTEN 0xFFFF & XINSTDIS // included only for completeness
00023
00024 #define STVREN 0xFFFF & XINSTDIS // Stack over/underflow will cause reset
00025 #define STVRDIS 0xFFDF & XINSTDIS // Stack over/underflow will not cause reset
00026
00027 #define DEBUGEN 0xFF7F & XINSTDIS // Debugger enabled
00028 #define DEBUGDIS 0xFFFF & XINSTDIS // Debugger disabled
00029
00030 #define UNPROTECT 0xFFFF & XINSTDIS // Do not protect memory
00031 #define PROTECT 0xFBFF & XINSTDIS // Protect code memory
00032
00033
00034
00035 #define ECPLL 0xFFFF // EC with PLL when OSCON<1:0> = 00
00036 #define EC 0xFFFE // EC when OSCON<1:0> = 00
00037 #define HSPLL 0xFFFD // HS with PLL enabled when OSCON<1:0> = 00
00038 #define HS 0xFFFC // HS osc when OSCON<1:0> = 00
00039 #define INTRC 0xFFFB // INTRC when OSCON<1:0> = 00
00040
00041 #define FCMDIS 0xFFBF // Disabled
00042 #define FCMEN 0xFFFF // Enabled
00043
00044 #define IESODIS 0xFF7F // Disabled
00045 #define IESOEN 0xFFFF // Enabled
00046
00047 #define WDTPS32K 0xFFFF // 1:32768
00048 #define WDTPS16K 0xFEFF // 1:16384
00049 #define WDTPS8K 0xFDFF // 1:8192
00050 #define WDTPS4K 0xFCFF // 1:4096
00051 #define WDTPS2K 0xFBFF // 1:2048
00052 #define WDTPS1K 0xFAFF // 1:1024
00053 #define WDTPS512 0xF9FF // 1:512
00054 #define WDTPS256 0xF8FF // 1:256
00055 #define WDTPS128 0xF7FF // 1:128
00056 #define WDTPS64 0xF6FF // 1:64
00057 #define WDTPS32 0xF5FF // 1:32
00058 #define WDTPS16 0xF4FF // 1:16
00059 #define WDTPS8 0xF3FF // 1:8
00060 #define WDTPS4 0xF2FF // 1:4
00061 #define WDTPS2 0xF1FF // 1:2
00062 #define WDTPS1 0xF0FF // 1:1
00063
00064
00065
00066 #if defined(_18F85J10) || defined(_18F85J15) || defined(_18F86J10) || defined(_18F86J15) || defined(_18F87J10)
00067 #define WAITEN 0xFF7F // WAIT states ofr external bus active
00068 #define WAITDIS 0xFFFF // WAIT states inactive
00069
00070 #define BW16 0xFFFF // 16-Bit external data bus width
00071 #define BW8 0xFFBF // 8-Bit external data bus width
00072
00073 #define ABW20 0xFFCF // Extended microcontroller mode + 20-Bit address mode
00074 #define ABW16 0xFFDF // Extended microcontroller mode + 16-Bit address mode
00075 #define ABW12 0xFFEF // Extended microcontroller mode + 12-Bit address mode
00076 #define ABW0 0xFFFF // Microcontroller mode - no bus access
00077 #define XMCU20 ABW20 // Deprecated
00078 #define XMCU16 ABW16 // Deprecated
00079 #define XMCU12 ABW12 // Deprecated
00080 #define MCU ABW0 // Deprecated
00081
00082 #define EASHFTEN 0xFFFF // Enabled - addresses on external bus start at zero
00083 #define EASHFTDIS 0xFFF7 // Disabled - address on external bus reflects PC
00084 #endif
00085
00086 #define CCP2RC1 0xFFFF // RC1
00087 #define CCP2RE7 0xFEFF // RE7
00088
00089 #define ECCPRE 0xFFFF // ECCP multiplexed on Port E
00090 #define ECCPRH 0xFDFF // ECCP multiplexed on Port H
00091
00092
00093 __CONFIG(1, UNPROTECT&DEBUGDIS&XINSTDIS&STVREN&WDTDIS);
00094 __CONFIG(2, WAITDIS&WDTPS32K&IESOEN&FCMEN&HS);
00095 __CONFIG(3, ECCPRE&CCP2RC1&BW16&ABW0&EASHFTEN);
00096
00097
00098
00099
00100
00101 #endif