⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pic12f617.h

📁 picc
💻 H
📖 第 1 页 / 共 2 页
字号:
#ifndef	_HTC_H_
#warning Header file pic12f617.h included directly. Use #include <htc.h> instead.
#endif

 /* header file for the MICROCHIP PIC microcontroller
    12F617
 */

#ifndef __PIC12F617_H
#define __PIC12F617_H

//
// Configuration mask definitions
//

// Config Register: CONFIG
#define CONFIG               0x2007 
// Oscillator
// External RC Clockout
#define OSC__EXTRC_OSC_CLKOUT 0xFFFF 
// External RC No Clock
#define OSC__EXTRC_OSC_NOCLKOUT 0xFFFE 
// Internal RC Clockout
#define OSC__INTRC_OSC_CLKOUT 0xFFFD 
// Internal RC No Clock
#define OSC__INTRC_OSC_NOCLKOUT 0xFFFC 
// EC
#define OSC__EC_OSC          0xFFFB 
// HS
#define OSC__HS_OSC          0xFFFA 
// XT
#define OSC__XT_OSC          0xFFF9 
// LP
#define OSC_LP               0xFFF8 
// Watchdog Timer
// On
#define WDT__WDT_ON          0xFFFF 
// Off
#define WDT__WDT_OFF         0xFFF7 
// Power Up Timer
// Off
#define PWRTE__PWRTE_OFF     0xFFFF 
// On
#define PWRTE__PWRTE_ON      0xFFEF 
// Master Clear Enable
// External
#define MCLRE__MCLRE_ON      0xFFFF 
// Internal
#define MCLRE__MCLRE_OFF     0xFFDF 
// Code Protect
// Off
#define CP__CP_OFF           0xFFFF 
// On
#define CP__CP_ON            0xFFBF 
// Internal Oscillator Frequency Select
// 8 MHz
#define IOSCFS__IOSCFS_8MHZ  0xFFFF 
// 4 MHz
#define IOSCFS__IOSCFS_4MHZ  0xFF7F 
// Brown Out Detect
// BOD disabled
#define BOREN__BOR_OFF       0xFCFF 
// BOD disabled
#define BOREN_BOD_DISABLED   0xFDFF 
// BOD enabled in run, disabled in sleep
#define BOREN__BOR_NSLEEP    0xFEFF 
// BOD Enabled
#define BOREN__BOR_ON        0xFFFF 


//
// Special function register definitions: Bank 0
//

// Register: INDF
volatile unsigned char           INDF                @ 0x000;
// bit and bitfield definitions

// Register: TMR0
volatile unsigned char           TMR0                @ 0x001;
// bit and bitfield definitions

// Register: PCL
volatile unsigned char           PCL                 @ 0x002;
// bit and bitfield definitions

// Register: STATUS
volatile unsigned char           STATUS              @ 0x003;
// bit and bitfield definitions
volatile bit CARRY               @ ((unsigned)&STATUS*8)+0;
volatile bit DC                  @ ((unsigned)&STATUS*8)+1;
volatile bit ZERO                @ ((unsigned)&STATUS*8)+2;
volatile bit nPD                 @ ((unsigned)&STATUS*8)+3;
volatile bit nTO                 @ ((unsigned)&STATUS*8)+4;
volatile bit IRP                 @ ((unsigned)&STATUS*8)+7;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned C                   : 1;
        volatile unsigned DC                  : 1;
        volatile unsigned Z                   : 1;
        volatile unsigned nPD                 : 1;
        volatile unsigned nTO                 : 1;
        volatile unsigned RP                  : 2;
        volatile unsigned IRP                 : 1;
    };
} STATUSbits @ 0x003;
#endif

// Register: FSR
volatile unsigned char           FSR                 @ 0x004;
// bit and bitfield definitions

// Register: GPIO
volatile unsigned char           GPIO                @ 0x005;
volatile unsigned char           PORTA               @ 0x005;
// bit and bitfield definitions
volatile bit GP0                 @ ((unsigned)&GPIO*8)+0;
volatile bit GP1                 @ ((unsigned)&GPIO*8)+1;
volatile bit GP2                 @ ((unsigned)&GPIO*8)+2;
volatile bit GP3                 @ ((unsigned)&GPIO*8)+3;
volatile bit GP4                 @ ((unsigned)&GPIO*8)+4;
volatile bit GP5                 @ ((unsigned)&GPIO*8)+5;
volatile bit RA0                 @ ((unsigned)&GPIO*8)+0;
volatile bit RA1                 @ ((unsigned)&GPIO*8)+1;
volatile bit RA2                 @ ((unsigned)&GPIO*8)+2;
volatile bit RA3                 @ ((unsigned)&GPIO*8)+3;
volatile bit RA4                 @ ((unsigned)&GPIO*8)+4;
volatile bit RA5                 @ ((unsigned)&GPIO*8)+5;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned GP0                 : 1;
        volatile unsigned GP1                 : 1;
        volatile unsigned GP2                 : 1;
        volatile unsigned GP3                 : 1;
        volatile unsigned GP4                 : 1;
        volatile unsigned GP5                 : 1;
    };
    struct {
        volatile unsigned RA0                 : 1;
        volatile unsigned RA1                 : 1;
        volatile unsigned RA2                 : 1;
        volatile unsigned RA3                 : 1;
        volatile unsigned RA4                 : 1;
        volatile unsigned RA5                 : 1;
    };
} GPIObits @ 0x005;
#endif

// Register: PCLATH
volatile unsigned char           PCLATH              @ 0x00A;
// bit and bitfield definitions
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned PCLATH              : 5;
    };
} PCLATHbits @ 0x00A;
#endif

// Register: INTCON
volatile unsigned char           INTCON              @ 0x00B;
// bit and bitfield definitions
volatile bit GPIF                @ ((unsigned)&INTCON*8)+0;
volatile bit INTF                @ ((unsigned)&INTCON*8)+1;
volatile bit TMR0IF              @ ((unsigned)&INTCON*8)+2;
volatile bit GPIE                @ ((unsigned)&INTCON*8)+3;
volatile bit INTE                @ ((unsigned)&INTCON*8)+4;
volatile bit TMR0IE              @ ((unsigned)&INTCON*8)+5;
volatile bit PEIE                @ ((unsigned)&INTCON*8)+6;
volatile bit GIE                 @ ((unsigned)&INTCON*8)+7;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned GPIF                : 1;
        volatile unsigned INTF                : 1;
        volatile unsigned TMR0IF              : 1;
        volatile unsigned GPIE                : 1;
        volatile unsigned INTE                : 1;
        volatile unsigned TMR0IE              : 1;
        volatile unsigned PEIE                : 1;
        volatile unsigned GIE                 : 1;
    };
} INTCONbits @ 0x00B;
#endif

// Register: PIR1
volatile unsigned char           PIR1                @ 0x00C;
// bit and bitfield definitions
volatile bit TMR1IF              @ ((unsigned)&PIR1*8)+0;
volatile bit TMR2IF              @ ((unsigned)&PIR1*8)+1;
volatile bit C1IF                @ ((unsigned)&PIR1*8)+3;
volatile bit ECCPIF              @ ((unsigned)&PIR1*8)+5;
volatile bit ADIF                @ ((unsigned)&PIR1*8)+6;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned TMR1IF              : 1;
        volatile unsigned TMR2IF              : 1;
        volatile unsigned                     : 1;
        volatile unsigned C1IF                : 1;
        volatile unsigned : 1;
        volatile unsigned ECCPIF              : 1;
        volatile unsigned ADIF                : 1;
    };
} PIR1bits @ 0x00C;
#endif
// bit and bitfield definitions

// Register: TMR1L
volatile unsigned char           TMR1L               @ 0x00E;
// bit and bitfield definitions

// Register: TMR1H
volatile unsigned char           TMR1H               @ 0x00F;
// bit and bitfield definitions

// Register: TMR1
volatile unsigned int            TMR1                @ 0x00E;

// Register: T1CON
volatile unsigned char           T1CON               @ 0x010;
// bit and bitfield definitions
volatile bit TMR1ON              @ ((unsigned)&T1CON*8)+0;
volatile bit TMR1CS              @ ((unsigned)&T1CON*8)+1;
volatile bit nT1SYNC             @ ((unsigned)&T1CON*8)+2;
volatile bit T1OSCEN             @ ((unsigned)&T1CON*8)+3;
volatile bit TMR1GE              @ ((unsigned)&T1CON*8)+6;
volatile bit T1GINV              @ ((unsigned)&T1CON*8)+7;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned TMR1ON              : 1;
        volatile unsigned TMR1CS              : 1;
        volatile unsigned nT1SYNC             : 1;
        volatile unsigned T1OSCEN             : 1;
        volatile unsigned T1CKPS              : 2;
        volatile unsigned TMR1GE              : 1;
        volatile unsigned T1GINV              : 1;
    };
} T1CONbits @ 0x010;
#endif

// Register: TMR2
volatile unsigned char           TMR2                @ 0x011;
// bit and bitfield definitions

// Register: T2CON
volatile unsigned char           T2CON               @ 0x012;
// bit and bitfield definitions
volatile bit TMR2ON              @ ((unsigned)&T2CON*8)+2;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned T2CKPS              : 2;
        volatile unsigned TMR2ON              : 1;
        volatile unsigned TOUTPS              : 4;
    };
} T2CONbits @ 0x012;
#endif
// bit and bitfield definitions

// Register: CCPR1L
volatile unsigned char           CCPR1L              @ 0x013;
// bit and bitfield definitions

// Register: CCPR1H
volatile unsigned char           CCPR1H              @ 0x014;
// bit and bitfield definitions

// Register: CCPR1
volatile unsigned int            CCPR1               @ 0x013;

// Register: CCP1CON
volatile unsigned char           CCP1CON             @ 0x015;
// bit and bitfield definitions
volatile bit P1M                 @ ((unsigned)&CCP1CON*8)+7;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned CCP1M               : 4;
        volatile unsigned DCB                 : 2;
        volatile unsigned                     : 1;
        volatile unsigned P1M                 : 1;
    };
} CCP1CONbits @ 0x015;
#endif

// Register: PWM1CON
volatile unsigned char           PWM1CON             @ 0x016;
// bit and bitfield definitions
volatile bit PRSEN               @ ((unsigned)&PWM1CON*8)+7;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned PDC                 : 7;
        volatile unsigned PRSEN               : 1;
    };
} PWM1CONbits @ 0x016;
#endif

// Register: ECCPAS
volatile unsigned char           ECCPAS              @ 0x017;
// bit and bitfield definitions
volatile bit ECCPASE             @ ((unsigned)&ECCPAS*8)+7;
#ifndef _LIB_BUILD
union {
    struct {
        volatile unsigned PSSBD               : 2;
        volatile unsigned PSSAC               : 2;
        volatile unsigned ECCPAS              : 3;
        volatile unsigned ECCPASE             : 1;
    };
} ECCPASbits @ 0x017;
#endif

// Register: VRCON
volatile unsigned char           VRCON               @ 0x019;
// bit and bitfield definitions
volatile bit FBREN               @ ((unsigned)&VRCON*8)+4;
volatile bit VRR                 @ ((unsigned)&VRCON*8)+5;
volatile bit C1VREN              @ ((unsigned)&VRCON*8)+7;
#ifndef _LIB_BUILD

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -