p16f877.h

Ir a la documentación de este archivo.
00001 
00002 #ifdef _ASSEMBLER_
00003 #define _PD
00004 #else
00005 #define _PD(x) (*(volatile unsigned char *) (x))
00006 #endif
00007 
00008 #define F 1
00009 #define W 0
00010 ;// 0x000 - 0x07F
00011 
00012 #define INDF    _PD(0x000)
00013 #define TMR0    _PD(0x001)
00014 #define PCL     _PD(0x002)
00015 #define STATUS  _PD(0x003)
00016 #define FSR     _PD(0x004)
00017 #define PORTA   _PD(0x005)
00018 #define PORTB   _PD(0x006)
00019 #define PORTC   _PD(0x007)
00020 #define PORTD   _PD(0x008)
00021 #define PORTE   _PD(0x009)
00022 #define PCLATH  _PD(0x00A)
00023 #define INTCON  _PD(0x00B)
00024 #define PIR1    _PD(0x00C)
00025 #define PIR2    _PD(0x00D)
00026 #define TMR1L   _PD(0x00E)
00027 #define TMR1H   _PD(0x00F)
00028 #define T1CON   _PD(0x010)
00029 #define TMR2    _PD(0x011)
00030 #define T2CON   _PD(0x012)
00031 #define SSPBUF  _PD(0x013)
00032 #define SSPCON  _PD(0x014)
00033 #define CCPR1L  _PD(0x015)
00034 #define CCPR1H  _PD(0x016)
00035 #define CCP1CON _PD(0x017)
00036 #define RCSTA   _PD(0x018)
00037 #define TXREG   _PD(0x019)
00038 #define RCREG   _PD(0x01A)
00039 #define CCPR2L  _PD(0x01B)
00040 #define CCPR2H  _PD(0x01C)
00041 #define CCP2CON _PD(0x01D)
00042 #define ADRESH  _PD(0x01E)
00043 #define ADCON0  _PD(0x01F)
00044 
00045 ;// 0x080 - 0x0FF
00046 
00047 #define OPTION_REG _PD(0x081)
00048 #define TRISA      _PD(0x085)
00049 #define TRISB      _PD(0x086)
00050 #define TRISC      _PD(0x087)
00051 #define TRISD      _PD(0x088)
00052 #define TRISE      _PD(0x089)
00053 #define PIE1       _PD(0x08C)
00054 #define PIE2       _PD(0x08D)
00055 #define PCON       _PD(0x08E)
00056 #define SSPCON2    _PD(0x091)
00057 #define PR2        _PD(0x092)
00058 #define SSPADD     _PD(0x093)
00059 #define SSPSTAT    _PD(0x094)
00060 #define TXSTA      _PD(0x098)
00061 #define SPBRG      _PD(0x099)
00062 #define ADRESL     _PD(0x09E)
00063 #define ADCON1     _PD(0x09F)
00064 
00065 ;// 0x100 - 0x17F
00066 
00067 #define EEDATA _PD(0x10C)
00068 #define EEADR  _PD(0x10D)
00069 #define EEDATH _PD(0x10E)
00070 #define EEADRH _PD(0x10F)
00071 
00072 ;// 0x180 - 0x1FF
00073 
00074 #define EECON1 _PD(0x18C)
00075 #define EECON2 _PD(0x18D)
00076 
00077 
00078 ;// Bits 0x000 - 0x07F
00079 ;//STATUS
00080 #define IRP 7
00081 #define RP1 6
00082 #define RP0 5
00083 #define TO 4
00084 #define PD 3
00085 #define Z 2
00086 #define DC 1
00087 #define C 0
00088 
00089 ;//INTCON
00090 #define GIE 7
00091 #define PEIE 6
00092 #define T0IE 5
00093 #define INTE 4
00094 #define RBIE 3
00095 #define T0IF 2
00096 #define INTF 1
00097 #define RBIF 0
00098 
00099 ;//PIR1
00100 #define PSPIF 7
00101 #define ADIF 6
00102 #define RCIF 5
00103 #define TXIF 4
00104 #define SSPIF 3
00105 #define CCP1IF 2
00106 #define TMR2IF 1
00107 #define TMR1IF 0
00108 
00109 ;//PIR2
00110 #define EEIF 4
00111 #define BCLIF 3
00112 #define CCP2IF 0
00113 
00114 ;//T1CON
00115 #define T1CKPS1 5
00116 #define T1CKPS0 4
00117 #define T1OSCEN 3
00118 #define T1SYNC 2
00119 #define TMR1CS 1
00120 #define TMR1ON 0
00121 
00122 ;//T2CON
00123 #define TOUTPS3 6
00124 #define TOUTPS2 5
00125 #define TOUTPS1 4
00126 #define TOUTPS0 3
00127 #define TMR2ON 2
00128 #define T2CKPS1 1
00129 #define T2CKPS0 0
00130 
00131 ;//SSPCON
00132 #define WCOL 7
00133 #define SSPOV 6
00134 #define SSPEN 5
00135 #define CKP 4
00136 #define SSPM3 3
00137 #define SSPM2 2
00138 #define SSPM1 1
00139 #define SSPM0 0
00140 
00141 ;//CCP1CON
00142 #define CCP1X 5
00143 #define CCP1Y 4
00144 #define CCP1M3 3
00145 #define CCP1M2 2
00146 #define CCP1M1 1
00147 #define CCP1M0 0
00148 
00149 ;//RCSTA
00150 #define SPEN 7
00151 #define RX9 6
00152 #define SREN 5
00153 #define CREN 4
00154 #define ADDEN 3
00155 #define FERR 2
00156 #define OERR 1
00157 #define RX9D 0
00158 
00159 ;//CCP2CON
00160 #define CCP2X 5
00161 #define CCP2Y 4
00162 #define CCP2M3 3
00163 #define CCP2M2 2
00164 #define CCP2M1 1
00165 #define CCP2M0 0
00166 
00167 ;//ADCON0
00168 #define ADCS1 7
00169 #define ADCS0 6
00170 #define CHS2 5
00171 #define CHS1 4
00172 #define CHS0 3
00173 #define GO 2
00174 #define DONE 2
00175 #define ADON 0
00176 
00177 ;// Bits 0x080 - 0x0FF
00178 
00179 ;//OPTION_REG
00180 #define RBPU 7
00181 #define INTEDG 6
00182 #define T0CS 5
00183 #define T0SE 4
00184 #define PSA 3
00185 #define PS2 2
00186 #define PS1 1
00187 #define PS0 0
00188 
00189 ;//TRISE
00190 #define IBF 7
00191 #define OBF 6
00192 #define IBOV 5
00193 #define PSPMODE 4
00194 
00195 ;//PCON
00196 #define POR 1
00197 #define BOR 0
00198 
00199 ;//SSPCON2
00200 #define GCEN 7
00201 #define ACKSTAT 6
00202 #define ACKDT 5
00203 #define ACKEN 4
00204 #define RCEN 3
00205 #define PEN 2
00206 #define RSEN 1
00207 #define SEN 0
00208 
00209 ;//SSPSTAT
00210 #define SMP 7
00211 #define CKE 6
00212 #define DA 5
00213 #define P 4
00214 #define S 3
00215 #define RW 2
00216 #define UA 1
00217 #define BF 0
00218 
00219 ;//TXSTA
00220 #define CSRC 7
00221 #define TX9 6
00222 #define TXEN 5
00223 #define SYNC 4
00224 #define BRGH 2
00225 #define TRMT 1
00226 #define TX9D 0
00227 
00228 ;//ADCON1
00229 #define ADFM 7
00230 #define PCFG3 3
00231 #define PCFG2 2
00232 #define PCFG1 1
00233 #define PCFG0 0
00234 
00235 ;// Bits 0x180 - 0x1FF
00236 
00237 ;//EECON1
00238 #define EEPGD 7
00239 #define WRERR 3
00240 #define WREN 2
00241 #define WR 1
00242 #define RD 0
00243 
00244 ;// Configuration word
00245 ;//FLASH PROTECT READ
00246 #define CP_ALL          0x0FCF
00247 #define CP_HALF         0x1FDF
00248 #define CP_UPPER        0x2FEF
00249 #define CP_OFF          0x3FFF
00250 
00251 ;//DEBUG
00252 #define DEBUG_DIS 0x3FFF
00253 #define DEBUG_EN  0x37FF
00254 
00255 ;//FLASH PROTECT WRITE
00256 #define WRT_DIS 0x3DFF
00257 #define WRT_EN  0x3FFF
00258 
00259 ;//EEPROM PROTECT
00260 #define CPD_DIS 0x3EFF
00261 #define CPD_EN  0x3FFF
00262 
00263 ;//LOW VOLTAJE PROGRAMMING
00264 #define LVP_DIS 0x3F7F
00265 #define LVP_EN  0x3FFF
00266 
00267 ;//BOR
00268 #define BOR_DIS 0x3FBF
00269 #define BOR_EN  0x3FFF
00270 
00271 ;//PWRTE
00272 #define PWRTE_DIS 0x3FFF
00273 #define PWRTE_EN  0x3FF7
00274 
00275 ;//WATCHDOG
00276 #define WDT_DIS 0x3FFB
00277 #define WDT_EN  0x3FFF
00278 
00279 ;//OSCILLATOR
00280 #define RC_OSC 0x3EFF
00281 #define HS_OSC 0x3EFE
00282 #define XT_OSC 0x3EFD
00283 #define LP_OSC 0x3EFC

Generado el Thu Jan 8 00:55:37 2009 para pic-gcc-library por  doxygen 1.5.1