📄 pic16f1938.h
字号:
struct {
volatile unsigned ADON : 1;
volatile unsigned GO_nDONE : 1;
volatile unsigned CHS0 : 1;
volatile unsigned CHS1 : 1;
volatile unsigned CHS2 : 1;
volatile unsigned CHS3 : 1;
volatile unsigned CHS4 : 1;
volatile unsigned : 1;
};
struct {
volatile unsigned : 1;
volatile unsigned ADGO : 1;
volatile unsigned CHS : 5;
};
} ADCON0bits @ 0x09D;
#endif
// Register: ADCON1
// Analog-to-Digital Control Register 1
volatile unsigned char ADCON1 @ 0x09E;
// bit and bitfield definitions
// A/D Positive Voltage Reference Configuration
volatile bit ADPREF0 @ ((unsigned)&ADCON1*8)+0;
// A/D Positive Voltage Reference Configuration
volatile bit ADPREF1 @ ((unsigned)&ADCON1*8)+1;
// A/D Negative Voltage Reference Configuration
volatile bit ADNREF @ ((unsigned)&ADCON1*8)+2;
// A/D Conversion Clock Select bits
volatile bit ADCS0 @ ((unsigned)&ADCON1*8)+4;
// A/D Conversion Clock Select bits
volatile bit ADCS1 @ ((unsigned)&ADCON1*8)+5;
// A/D Conversion Clock Select bits
volatile bit ADCS2 @ ((unsigned)&ADCON1*8)+6;
// A/D Result Format Select bit
volatile bit ADFM @ ((unsigned)&ADCON1*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned ADPREF0 : 1;
volatile unsigned ADPREF1 : 1;
volatile unsigned ADNREF : 1;
volatile unsigned : 1;
volatile unsigned ADCS0 : 1;
volatile unsigned ADCS1 : 1;
volatile unsigned ADCS2 : 1;
volatile unsigned ADFM : 1;
};
struct {
volatile unsigned ADPREF : 2;
volatile unsigned : 2;
volatile unsigned ADCS : 3;
};
} ADCON1bits @ 0x09E;
#endif
//
// Special function register definitions: Bank 2
//
// Register: LATA
volatile unsigned char LATA @ 0x10C;
// bit and bitfield definitions
volatile bit LATA0 @ ((unsigned)&LATA*8)+0;
volatile bit LATA1 @ ((unsigned)&LATA*8)+1;
volatile bit LATA2 @ ((unsigned)&LATA*8)+2;
volatile bit LATA3 @ ((unsigned)&LATA*8)+3;
volatile bit LATA4 @ ((unsigned)&LATA*8)+4;
volatile bit LATA5 @ ((unsigned)&LATA*8)+5;
volatile bit LATA6 @ ((unsigned)&LATA*8)+6;
volatile bit LATA7 @ ((unsigned)&LATA*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned LATA0 : 1;
volatile unsigned LATA1 : 1;
volatile unsigned LATA2 : 1;
volatile unsigned LATA3 : 1;
volatile unsigned LATA4 : 1;
volatile unsigned LATA5 : 1;
volatile unsigned LATA6 : 1;
volatile unsigned LATA7 : 1;
};
} LATAbits @ 0x10C;
#endif
// Register: LATB
volatile unsigned char LATB @ 0x10D;
// bit and bitfield definitions
volatile bit LATB0 @ ((unsigned)&LATB*8)+0;
volatile bit LATB1 @ ((unsigned)&LATB*8)+1;
volatile bit LATB2 @ ((unsigned)&LATB*8)+2;
volatile bit LATB3 @ ((unsigned)&LATB*8)+3;
volatile bit LATB4 @ ((unsigned)&LATB*8)+4;
volatile bit LATB5 @ ((unsigned)&LATB*8)+5;
volatile bit LATB6 @ ((unsigned)&LATB*8)+6;
volatile bit LATB7 @ ((unsigned)&LATB*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned LATB0 : 1;
volatile unsigned LATB1 : 1;
volatile unsigned LATB2 : 1;
volatile unsigned LATB3 : 1;
volatile unsigned LATB4 : 1;
volatile unsigned LATB5 : 1;
volatile unsigned LATB6 : 1;
volatile unsigned LATB7 : 1;
};
} LATBbits @ 0x10D;
#endif
// Register: LATC
volatile unsigned char LATC @ 0x10E;
// bit and bitfield definitions
volatile bit LATC0 @ ((unsigned)&LATC*8)+0;
volatile bit LATC1 @ ((unsigned)&LATC*8)+1;
volatile bit LATC2 @ ((unsigned)&LATC*8)+2;
volatile bit LATC3 @ ((unsigned)&LATC*8)+3;
volatile bit LATC4 @ ((unsigned)&LATC*8)+4;
volatile bit LATC5 @ ((unsigned)&LATC*8)+5;
volatile bit LATC6 @ ((unsigned)&LATC*8)+6;
volatile bit LATC7 @ ((unsigned)&LATC*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned LATC0 : 1;
volatile unsigned LATC1 : 1;
volatile unsigned LATC2 : 1;
volatile unsigned LATC3 : 1;
volatile unsigned LATC4 : 1;
volatile unsigned LATC5 : 1;
volatile unsigned LATC6 : 1;
volatile unsigned LATC7 : 1;
};
} LATCbits @ 0x10E;
#endif
// Register: CM1CON0
volatile unsigned char CM1CON0 @ 0x111;
// bit and bitfield definitions
// Comparator Output Synchronous Mode bit
volatile bit C1SYNC @ ((unsigned)&CM1CON0*8)+0;
// Comparator Hysteresis Enable bit
volatile bit C1HYS @ ((unsigned)&CM1CON0*8)+1;
// Comparator Speed/Power Select bit
volatile bit C1SP @ ((unsigned)&CM1CON0*8)+2;
// Comparator Output Polarity Select bit
volatile bit C1POL @ ((unsigned)&CM1CON0*8)+4;
// Comparator Output Enable bit
volatile bit C1OE @ ((unsigned)&CM1CON0*8)+5;
// Comparator Output bit
volatile bit C1OUT @ ((unsigned)&CM1CON0*8)+6;
// Comparator Enable bit
volatile bit C1ON @ ((unsigned)&CM1CON0*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned C1SYNC : 1;
volatile unsigned C1HYS : 1;
volatile unsigned C1SP : 1;
volatile unsigned : 1;
volatile unsigned C1POL : 1;
volatile unsigned C1OE : 1;
volatile unsigned C1OUT : 1;
volatile unsigned C1ON : 1;
};
} CM1CON0bits @ 0x111;
#endif
// Register: CM1CON1
volatile unsigned char CM1CON1 @ 0x112;
// bit and bitfield definitions
// Comparator Negative Input Channel Select bits
volatile bit C1NCH0 @ ((unsigned)&CM1CON1*8)+0;
// Comparator Negative Input Channel Select bits
volatile bit C1NCH1 @ ((unsigned)&CM1CON1*8)+1;
// Comparator Positive Input Channel Select bits
volatile bit C1PCH0 @ ((unsigned)&CM1CON1*8)+4;
// Comparator Positive Input Channel Select bits
volatile bit C1PCH1 @ ((unsigned)&CM1CON1*8)+5;
// Comparator Interrupt on Negative going edge Enable bits
volatile bit C1INTN @ ((unsigned)&CM1CON1*8)+6;
// Comparator Interrupt on Positive going edge Enable bits
volatile bit C1INTP @ ((unsigned)&CM1CON1*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned C1NCH0 : 1;
volatile unsigned C1NCH1 : 1;
volatile unsigned : 2;
volatile unsigned C1PCH0 : 1;
volatile unsigned C1PCH1 : 1;
volatile unsigned C1INTN : 1;
volatile unsigned C1INTP : 1;
};
struct {
volatile unsigned C1NCH : 2;
volatile unsigned : 2;
volatile unsigned C1PCH : 2;
};
} CM1CON1bits @ 0x112;
#endif
// Register: CM2CON0
volatile unsigned char CM2CON0 @ 0x113;
// bit and bitfield definitions
volatile bit C2SYNC @ ((unsigned)&CM2CON0*8)+0;
volatile bit C2HYS @ ((unsigned)&CM2CON0*8)+1;
volatile bit C2SP @ ((unsigned)&CM2CON0*8)+2;
volatile bit C2POL @ ((unsigned)&CM2CON0*8)+4;
volatile bit C2OE @ ((unsigned)&CM2CON0*8)+5;
volatile bit C2OUT @ ((unsigned)&CM2CON0*8)+6;
volatile bit C2ON @ ((unsigned)&CM2CON0*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned C2SYNC : 1;
volatile unsigned C2HYS : 1;
volatile unsigned C2SP : 1;
volatile unsigned : 1;
volatile unsigned C2POL : 1;
volatile unsigned C2OE : 1;
volatile unsigned C2OUT : 1;
volatile unsigned C2ON : 1;
};
} CM2CON0bits @ 0x113;
#endif
// Register: CM2CON1
volatile unsigned char CM2CON1 @ 0x114;
// bit and bitfield definitions
// Comparator Negative Input Channel Select bits
volatile bit C2NCH0 @ ((unsigned)&CM2CON1*8)+0;
// Comparator Negative Input Channel Select bits
volatile bit C2NCH1 @ ((unsigned)&CM2CON1*8)+1;
// Comparator Positive Input Channel Select bits
volatile bit C2PCH0 @ ((unsigned)&CM2CON1*8)+4;
// Comparator Positive Input Channel Select bits
volatile bit C2PCH1 @ ((unsigned)&CM2CON1*8)+5;
// Comparator Interrupt on Negative going edge Enable bits
volatile bit C2INTN @ ((unsigned)&CM2CON1*8)+6;
// Comparator Interrupt on Positive going edge Enable bits
volatile bit C2INTP @ ((unsigned)&CM2CON1*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned C2NCH0 : 1;
volatile unsigned C2NCH1 : 1;
volatile unsigned : 2;
volatile unsigned C2PCH0 : 1;
volatile unsigned C2PCH1 : 1;
volatile unsigned C2INTN : 1;
volatile unsigned C2INTP : 1;
};
struct {
volatile unsigned C2NCH : 2;
volatile unsigned : 2;
volatile unsigned C2PCH : 2;
};
} CM2CON1bits @ 0x114;
#endif
// Register: CMOUT
// Comparator Output Register
volatile unsigned char CMOUT @ 0x115;
// bit and bitfield definitions
volatile bit MC1OUT @ ((unsigned)&CMOUT*8)+0;
volatile bit MC2OUT @ ((unsigned)&CMOUT*8)+1;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned MC1OUT : 1;
volatile unsigned MC2OUT : 1;
};
} CMOUTbits @ 0x115;
#endif
// Register: BORCON
// Brown-out Reset Control Register
volatile unsigned char BORCON @ 0x116;
// bit and bitfield definitions
// Brown-out Reset Circuit Ready Status bit
volatile bit BORRDY @ ((unsigned)&BORCON*8)+0;
// Software Brown Out Reset Enable bit
volatile bit SBOREN @ ((unsigned)&BORCON*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned BORRDY : 1;
volatile unsigned : 6;
volatile unsigned SBOREN : 1;
};
} BORCONbits @ 0x116;
#endif
// Register: FVRCON
// Voltage Reference Control Register 0
volatile unsigned char FVRCON @ 0x117;
// bit and bitfield definitions
// A/D Converter Fixed Voltage Reference Selection
volatile bit ADFVR0 @ ((unsigned)&FVRCON*8)+0;
// A/D Converter Fixed Voltage Reference Selection
volatile bit ADFVR1 @ ((unsigned)&FVRCON*8)+1;
// Comparator and D/A Converter Fixed Voltage Reference Selection
volatile bit CDAFVR0 @ ((unsigned)&FVRCON*8)+2;
// Comparator and D/A Converter Fixed Voltage Reference Selection
volatile bit CDAFVR1 @ ((unsigned)&FVRCON*8)+3;
// Temperature Sensor Range Select
volatile bit TSRNG @ ((unsigned)&FVRCON*8)+4;
// Temperature Sensor Enable
volatile bit TSEN @ ((unsigned)&FVRCON*8)+5;
// Fixed Voltage Reference Ready Flag
volatile bit FVRRDY @ ((unsigned)&FVRCON*8)+6;
// Fixed Voltage Reference Enable
volatile bit FVREN @ ((unsigned)&FVRCON*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned ADFVR0 : 1;
volatile unsigned ADFVR1 : 1;
volatile unsigned CDAFVR0 : 1;
volatile unsigned CDAFVR1 : 1;
volatile unsigned TSRNG : 1;
volatile unsigned TSEN : 1;
volatile unsigned FVRRDY : 1;
volatile unsigned FVREN : 1;
};
struct {
volatile unsigned ADFVR : 2;
volatile unsigned CDAFVR : 2;
};
} FVRCONbits @ 0x117;
#endif
// Register: DACCON0
// Voltage Reference Control Register 1
volatile unsigned char DACCON0 @ 0x118;
// bit and bitfield definitions
// DAC1 Negative Source Select bits
volatile bit DACNSS @ ((unsigned)&DACCON0*8)+0;
// DAC1 Positive Source Select bits
volatile bit DACPSS0 @ ((unsigned)&DACCON0*8)+2;
// DAC1 Positive Source Select bits
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -