📄 pic16f1828.h
字号:
volatile bit EEIF @ ((unsigned)&PIR2*8)+4;
volatile bit C1IF @ ((unsigned)&PIR2*8)+5;
volatile bit C2IF @ ((unsigned)&PIR2*8)+6;
volatile bit OSFIF @ ((unsigned)&PIR2*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned CCP2IF : 1;
unsigned : 1;
unsigned : 1;
unsigned BCL1IF : 1;
unsigned EEIF : 1;
unsigned C1IF : 1;
unsigned C2IF : 1;
unsigned OSFIF : 1;
};
} PIR2bits @ 0x012;
#endif
// Register: PIR3
volatile unsigned char PIR3 @ 0x013;
// bit and bitfield definitions
volatile bit TMR4IF @ ((unsigned)&PIR3*8)+1;
volatile bit TMR6IF @ ((unsigned)&PIR3*8)+3;
volatile bit CCP3IF @ ((unsigned)&PIR3*8)+4;
volatile bit CCP4IF @ ((unsigned)&PIR3*8)+5;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned : 1;
unsigned TMR4IF : 1;
unsigned : 1;
unsigned TMR6IF : 1;
unsigned CCP3IF : 1;
unsigned CCP4IF : 1;
};
} PIR3bits @ 0x013;
#endif
// Register: TMR0
volatile unsigned char TMR0 @ 0x015;
// bit and bitfield definitions
// bit and bitfield definitions
// Register: TMR1L
volatile unsigned char TMR1L @ 0x016;
// bit and bitfield definitions
// Register: TMR1H
volatile unsigned char TMR1H @ 0x017;
// bit and bitfield definitions
// Register: TMR1
volatile unsigned int TMR1 @ 0x016;
// Register: T1CON
volatile unsigned char T1CON @ 0x018;
// bit and bitfield definitions
volatile bit TMR1ON @ ((unsigned)&T1CON*8)+0;
volatile bit nT1SYNC @ ((unsigned)&T1CON*8)+2;
volatile bit T1OSCEN @ ((unsigned)&T1CON*8)+3;
volatile bit T1CKPS0 @ ((unsigned)&T1CON*8)+4;
volatile bit T1CKPS1 @ ((unsigned)&T1CON*8)+5;
volatile bit TMR1CS0 @ ((unsigned)&T1CON*8)+6;
volatile bit TMR1CS1 @ ((unsigned)&T1CON*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned TMR1ON : 1;
unsigned : 1;
unsigned nT1SYNC : 1;
unsigned T1OSCEN : 1;
unsigned T1CKPS0 : 1;
unsigned T1CKPS1 : 1;
unsigned TMR1CS0 : 1;
unsigned TMR1CS1 : 1;
};
struct {
unsigned : 4;
unsigned T1CKPS : 2;
unsigned TMR1CS : 2;
};
} T1CONbits @ 0x018;
#endif
// Register: T1GCON
volatile unsigned char T1GCON @ 0x019;
// bit and bitfield definitions
volatile bit T1GSS0 @ ((unsigned)&T1GCON*8)+0;
volatile bit T1GSS1 @ ((unsigned)&T1GCON*8)+1;
volatile bit T1GVAL @ ((unsigned)&T1GCON*8)+2;
volatile bit T1GGO @ ((unsigned)&T1GCON*8)+3;
volatile bit T1GSPM @ ((unsigned)&T1GCON*8)+4;
volatile bit T1GTM @ ((unsigned)&T1GCON*8)+5;
volatile bit T1GPOL @ ((unsigned)&T1GCON*8)+6;
volatile bit TMR1GE @ ((unsigned)&T1GCON*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned T1GSS0 : 1;
unsigned T1GSS1 : 1;
unsigned T1GVAL : 1;
unsigned T1GGO : 1;
unsigned T1GSPM : 1;
unsigned T1GTM : 1;
unsigned T1GPOL : 1;
unsigned TMR1GE : 1;
};
struct {
unsigned T1GSS : 2;
};
} T1GCONbits @ 0x019;
#endif
// Register: TMR2
volatile unsigned char TMR2 @ 0x01A;
// bit and bitfield definitions
// Register: PR2
volatile unsigned char PR2 @ 0x01B;
// bit and bitfield definitions
// Register: T2CON
volatile unsigned char T2CON @ 0x01C;
// bit and bitfield definitions
volatile bit T2CKPS0 @ ((unsigned)&T2CON*8)+0;
volatile bit T2CKPS1 @ ((unsigned)&T2CON*8)+1;
volatile bit TMR2ON @ ((unsigned)&T2CON*8)+2;
volatile bit T2OUTPS0 @ ((unsigned)&T2CON*8)+3;
volatile bit T2OUTPS1 @ ((unsigned)&T2CON*8)+4;
volatile bit T2OUTPS2 @ ((unsigned)&T2CON*8)+5;
volatile bit T2OUTPS3 @ ((unsigned)&T2CON*8)+6;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned T2CKPS0 : 1;
unsigned T2CKPS1 : 1;
unsigned TMR2ON : 1;
unsigned T2OUTPS0 : 1;
unsigned T2OUTPS1 : 1;
unsigned T2OUTPS2 : 1;
unsigned T2OUTPS3 : 1;
};
struct {
unsigned T2CKPS : 2;
unsigned : 1;
unsigned T2OUTPS : 4;
};
} T2CONbits @ 0x01C;
#endif
// Register: CPSCON0
volatile unsigned char CPSCON0 @ 0x01E;
// bit and bitfield definitions
volatile bit T0XCS @ ((unsigned)&CPSCON0*8)+0;
volatile bit CPSOUT @ ((unsigned)&CPSCON0*8)+1;
volatile bit CPSRNG0 @ ((unsigned)&CPSCON0*8)+2;
volatile bit CPSRNG1 @ ((unsigned)&CPSCON0*8)+3;
volatile bit CPSRM @ ((unsigned)&CPSCON0*8)+6;
volatile bit CPSON @ ((unsigned)&CPSCON0*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned T0XCS : 1;
unsigned CPSOUT : 1;
unsigned CPSRNG0 : 1;
unsigned CPSRNG1 : 1;
unsigned : 2;
unsigned CPSRM : 1;
unsigned CPSON : 1;
};
struct {
unsigned : 2;
unsigned CPSRNG : 2;
};
} CPSCON0bits @ 0x01E;
#endif
// Register: CPSCON1
volatile unsigned char CPSCON1 @ 0x01F;
// bit and bitfield definitions
volatile bit CPSCH0 @ ((unsigned)&CPSCON1*8)+0;
volatile bit CPSCH1 @ ((unsigned)&CPSCON1*8)+1;
volatile bit CPSCH2 @ ((unsigned)&CPSCON1*8)+2;
volatile bit CPSCH3 @ ((unsigned)&CPSCON1*8)+3;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned CPSCH0 : 1;
unsigned CPSCH1 : 1;
unsigned CPSCH2 : 1;
unsigned CPSCH3 : 1;
};
struct {
unsigned CPSCH : 3;
unsigned : 1;
};
} CPSCON1bits @ 0x01F;
#endif
//
// Special function register definitions: Bank 1
//
// Register: TRISA
// PORTA Data Direction Control Register
volatile unsigned char TRISA @ 0x08C;
// bit and bitfield definitions
volatile bit TRISA0 @ ((unsigned)&TRISA*8)+0;
volatile bit TRISA1 @ ((unsigned)&TRISA*8)+1;
volatile bit TRISA2 @ ((unsigned)&TRISA*8)+2;
volatile bit TRISA3 @ ((unsigned)&TRISA*8)+3;
volatile bit TRISA4 @ ((unsigned)&TRISA*8)+4;
volatile bit TRISA5 @ ((unsigned)&TRISA*8)+5;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned TRISA0 : 1;
unsigned TRISA1 : 1;
unsigned TRISA2 : 1;
unsigned TRISA3 : 1;
unsigned TRISA4 : 1;
unsigned TRISA5 : 1;
unsigned : 1;
unsigned : 1;
};
struct {
unsigned TRISA : 6;
unsigned : 2;
};
} TRISAbits @ 0x08C;
#endif
// Register: TRISB
volatile unsigned char TRISB @ 0x08D;
// bit and bitfield definitions
volatile bit TRISB4 @ ((unsigned)&TRISB*8)+4;
volatile bit TRISB5 @ ((unsigned)&TRISB*8)+5;
volatile bit TRISB6 @ ((unsigned)&TRISB*8)+6;
volatile bit TRISB7 @ ((unsigned)&TRISB*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned : 4;
unsigned TRISB4 : 1;
unsigned TRISB5 : 1;
unsigned TRISB6 : 1;
unsigned TRISB7 : 1;
};
struct {
unsigned : 4;
unsigned TRISB : 4;
};
} TRISBbits @ 0x08D;
#endif
// Register: TRISC
// PORTB Data Direction Control Register
volatile unsigned char TRISC @ 0x08E;
// bit and bitfield definitions
volatile bit TRISC0 @ ((unsigned)&TRISC*8)+0;
volatile bit TRISC1 @ ((unsigned)&TRISC*8)+1;
volatile bit TRISC2 @ ((unsigned)&TRISC*8)+2;
volatile bit TRISC3 @ ((unsigned)&TRISC*8)+3;
volatile bit TRISC4 @ ((unsigned)&TRISC*8)+4;
volatile bit TRISC5 @ ((unsigned)&TRISC*8)+5;
volatile bit TRISC6 @ ((unsigned)&TRISC*8)+6;
volatile bit TRISC7 @ ((unsigned)&TRISC*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned TRISC0 : 1;
unsigned TRISC1 : 1;
unsigned TRISC2 : 1;
unsigned TRISC3 : 1;
unsigned TRISC4 : 1;
unsigned TRISC5 : 1;
unsigned TRISC6 : 1;
unsigned TRISC7 : 1;
};
struct {
unsigned TRISC : 6;
unsigned : 2;
};
} TRISCbits @ 0x08E;
#endif
// Register: PIE1
// Peripheral Interrupt Enable Register 1
volatile unsigned char PIE1 @ 0x091;
// bit and bitfield definitions
// TMR1 Overflow Interrupt Enable bit
volatile bit TMR1IE @ ((unsigned)&PIE1*8)+0;
// TMR2 to PR2 Match Interrupt Enable bit
volatile bit TMR2IE @ ((unsigned)&PIE1*8)+1;
// CCP1 Interrupt Enable bit
volatile bit CCP1IE @ ((unsigned)&PIE1*8)+2;
// Master Synchronous Serial Port (MSSP) Interrupt Enable bit
volatile bit SSP1IE @ ((unsigned)&PIE1*8)+3;
// EUSART Transmit Interrupt Enable bit
volatile bit TXIE @ ((unsigned)&PIE1*8)+4;
// EUSART Receive Interrupt Enable bit
volatile bit RCIE @ ((unsigned)&PIE1*8)+5;
// A/D Converter Interrupt Enable bit
volatile bit ADIE @ ((unsigned)&PIE1*8)+6;
// Timer1 Gate Interrupt Enable bit
volatile bit TMR1GIE @ ((unsigned)&PIE1*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned TMR1IE : 1;
unsigned TMR2IE : 1;
unsigned CCP1IE : 1;
unsigned SSP1IE : 1;
unsigned TXIE : 1;
unsigned RCIE : 1;
unsigned ADIE : 1;
unsigned TMR1GIE : 1;
};
} PIE1bits @ 0x091;
#endif
// Register: PIE2
// Peripheral Interrupt Enable Register 2
volatile unsigned char PIE2 @ 0x092;
// bit and bitfield definitions
volatile bit CCP2IE @ ((unsigned)&PIE2*8)+0;
// MSSP Bus Collision Interrupt Interrupt Enable bit
volatile bit BCL1IE @ ((unsigned)&PIE2*8)+3;
// EEPROM Write Completion Interrupt Enable bit
volatile bit EEIE @ ((unsigned)&PIE2*8)+4;
// Comparator C1 Interrupt Enable bit
volatile bit C1IE @ ((unsigned)&PIE2*8)+5;
// Comparator C2 Interrupt Enable bit
volatile bit C2IE @ ((unsigned)&PIE2*8)+6;
// CCP2 Interrupt Enable bit
volatile bit OSFIE @ ((unsigned)&PIE2*8)+7;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned CCP2IE : 1;
unsigned : 1;
unsigned : 1;
unsigned BCL1IE : 1;
unsigned EEIE : 1;
unsigned C1IE : 1;
unsigned C2IE : 1;
unsigned OSFIE : 1;
};
} PIE2bits @ 0x092;
#endif
// Register: PIE3
volatile unsigned char PIE3 @ 0x093;
// bit and bitfield definitions
volatile bit TMR4IE @ ((unsigned)&PIE3*8)+1;
volatile bit TMR6IE @ ((unsigned)&PIE3*8)+3;
volatile bit CCP3IE @ ((unsigned)&PIE3*8)+4;
volatile bit CCP4IE @ ((unsigned)&PIE3*8)+5;
#ifndef _LIB_BUILD
volatile union {
struct {
unsigned : 1;
unsigned TMR4IE : 1;
unsigned : 1;
unsigned TMR6IE : 1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -