📄 pic12lf1822.h
字号:
};
struct {
volatile unsigned ADFVR : 2;
volatile unsigned CDAFVR : 2;
};
} FVRCONbits @ 0x117;
#endif
// Register: DACCON0
// Voltage Reference Control Register 0
volatile unsigned char DACCON0 @ 0x118;
// bit and bitfield definitions
// DAC1 Positive Source Select bits
volatile bit DACPSS0 @ ((unsigned)&DACCON0*8)+2;
// DAC1 Positive Source Select bits
volatile bit DACPSS1 @ ((unsigned)&DACCON0*8)+3;
// DAC1 Voltage Output Enable bit
volatile bit DACOE @ ((unsigned)&DACCON0*8)+5;
// DAC 1 Low Power Voltage State Select bit
volatile bit DACLPS @ ((unsigned)&DACCON0*8)+6;
// DAC 1 Enable bit
volatile bit DACEN @ ((unsigned)&DACCON0*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned : 1;
volatile unsigned : 1;
volatile unsigned DACPSS0 : 1;
volatile unsigned DACPSS1 : 1;
volatile unsigned : 1;
volatile unsigned DACOE : 1;
volatile unsigned DACLPS : 1;
volatile unsigned DACEN : 1;
};
struct {
volatile unsigned : 2;
volatile unsigned DACPSS : 2;
};
} DACCON0bits @ 0x118;
#endif
// Register: DACCON1
// Voltage Reference Control Register 1
volatile unsigned char DACCON1 @ 0x119;
// bit and bitfield definitions
// DAC1 Voltage Output Select bits
volatile bit DACR0 @ ((unsigned)&DACCON1*8)+0;
// DAC1 Voltage Output Select bits
volatile bit DACR1 @ ((unsigned)&DACCON1*8)+1;
// DAC1 Voltage Output Select bits
volatile bit DACR2 @ ((unsigned)&DACCON1*8)+2;
// DAC1 Voltage Output Select bits
volatile bit DACR3 @ ((unsigned)&DACCON1*8)+3;
// DAC1 Voltage Output Select bits
volatile bit DACR4 @ ((unsigned)&DACCON1*8)+4;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned DACR0 : 1;
volatile unsigned DACR1 : 1;
volatile unsigned DACR2 : 1;
volatile unsigned DACR3 : 1;
volatile unsigned DACR4 : 1;
volatile unsigned : 1;
};
struct {
volatile unsigned DACR : 5;
};
} DACCON1bits @ 0x119;
#endif
// Register: SRCON0
// SR Latch Control Register 0
volatile unsigned char SRCON0 @ 0x11A;
// bit and bitfield definitions
// Pulse Reset Input of the SR Latch
volatile bit SRPR @ ((unsigned)&SRCON0*8)+0;
// Pulse Set Input of the SR Latch
volatile bit SRPS @ ((unsigned)&SRCON0*8)+1;
// SR Latch Q Output Enable bit
volatile bit SRNQEN @ ((unsigned)&SRCON0*8)+2;
// SR Latch Q Output Enable bit
volatile bit SRQEN @ ((unsigned)&SRCON0*8)+3;
// SR Latch Clock divider bits
volatile bit SRCLK0 @ ((unsigned)&SRCON0*8)+4;
// SR Latch Clock divider bits
volatile bit SRCLK1 @ ((unsigned)&SRCON0*8)+5;
// SR Latch Clock divider bits
volatile bit SRCLK2 @ ((unsigned)&SRCON0*8)+6;
// SR Latch Enable bit
volatile bit SRLEN @ ((unsigned)&SRCON0*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned SRPR : 1;
volatile unsigned SRPS : 1;
volatile unsigned SRNQEN : 1;
volatile unsigned SRQEN : 1;
volatile unsigned SRCLK0 : 1;
volatile unsigned SRCLK1 : 1;
volatile unsigned SRCLK2 : 1;
volatile unsigned SRLEN : 1;
};
struct {
volatile unsigned : 4;
volatile unsigned SRCLK : 3;
};
} SRCON0bits @ 0x11A;
#endif
// Register: SRCON1
// SR Latch Control Register 1
volatile unsigned char SRCON1 @ 0x11B;
// bit and bitfield definitions
// SR Latch C1 Reset Enable bit
volatile bit SRRC1E @ ((unsigned)&SRCON1*8)+0;
// SR Latch Reset Clock Enable bit
volatile bit SRRCKE @ ((unsigned)&SRCON1*8)+2;
// SR Latch Peripheral Reset Enable bit
volatile bit SRRPE @ ((unsigned)&SRCON1*8)+3;
// SR Latch C1 Set Enable bit
volatile bit SRSC1E @ ((unsigned)&SRCON1*8)+4;
// SR Latch Set Clock Enable bit
volatile bit SRSCKE @ ((unsigned)&SRCON1*8)+6;
// SR Latch Peripheral Set Enable bit
volatile bit SRSPE @ ((unsigned)&SRCON1*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned SRRC1E : 1;
volatile unsigned : 1;
volatile unsigned SRRCKE : 1;
volatile unsigned SRRPE : 1;
volatile unsigned SRSC1E : 1;
volatile unsigned : 1;
volatile unsigned SRSCKE : 1;
volatile unsigned SRSPE : 1;
};
} SRCON1bits @ 0x11B;
#endif
// Register: APFCON0
// Alternate Pin Function Control Register
volatile unsigned char APFCON0 @ 0x11D;
// bit and bitfield definitions
volatile bit CCP1SEL @ ((unsigned)&APFCON0*8)+0;
volatile bit P1BSEL @ ((unsigned)&APFCON0*8)+1;
volatile bit TXCKSEL @ ((unsigned)&APFCON0*8)+2;
volatile bit T1GSEL @ ((unsigned)&APFCON0*8)+3;
// Timer1 Gate Input Pin Selection
volatile bit SS1SEL @ ((unsigned)&APFCON0*8)+5;
// CCP3 Input/Output Pin Selection
volatile bit SDO1SEL @ ((unsigned)&APFCON0*8)+6;
volatile bit RXDTSEL @ ((unsigned)&APFCON0*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned CCP1SEL : 1;
volatile unsigned P1BSEL : 1;
volatile unsigned TXCKSEL : 1;
volatile unsigned T1GSEL : 1;
volatile unsigned : 1;
volatile unsigned SS1SEL : 1;
volatile unsigned SDO1SEL : 1;
volatile unsigned RXDTSEL : 1;
};
} APFCON0bits @ 0x11D;
#endif
//
// Special function register definitions: Bank 3
//
// Register: ANSELA
volatile unsigned char ANSELA @ 0x18C;
// bit and bitfield definitions
volatile bit ANSA0 @ ((unsigned)&ANSELA*8)+0;
volatile bit ANSA1 @ ((unsigned)&ANSELA*8)+1;
volatile bit ANSA2 @ ((unsigned)&ANSELA*8)+2;
volatile bit ANSA4 @ ((unsigned)&ANSELA*8)+4;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned ANSA0 : 1;
volatile unsigned ANSA1 : 1;
volatile unsigned ANSA2 : 1;
volatile unsigned : 1;
volatile unsigned ANSA4 : 1;
volatile unsigned : 1;
volatile unsigned : 1;
volatile unsigned : 1;
};
struct {
volatile unsigned ANSELA : 5;
volatile unsigned : 1;
};
} ANSELAbits @ 0x18C;
#endif
// bit and bitfield definitions
// Register: EEADRL
volatile unsigned char EEADRL @ 0x191;
// bit and bitfield definitions
// Register: EEADRH
volatile unsigned char EEADRH @ 0x192;
// bit and bitfield definitions
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned EEADRH : 7;
};
} EEADRHbits @ 0x192;
#endif
// Register: EEADR
volatile unsigned int EEADR @ 0x191;
// bit and bitfield definitions
// Register: EEDATL
volatile unsigned char EEDATL @ 0x193;
volatile unsigned char EEDATA @ 0x193;
// bit and bitfield definitions
// Register: EEDATH
volatile unsigned char EEDATH @ 0x194;
// bit and bitfield definitions
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned EEDATH : 6;
};
} EEDATHbits @ 0x194;
#endif
// Register: EEDAT
volatile unsigned int EEDAT @ 0x193;
// Register: EECON1
volatile unsigned char EECON1 @ 0x195;
// bit and bitfield definitions
// Read Control bit
volatile bit RD @ ((unsigned)&EECON1*8)+0;
// Write Control bit
volatile bit WR @ ((unsigned)&EECON1*8)+1;
// Program/Erase Enable bit
volatile bit WREN @ ((unsigned)&EECON1*8)+2;
// Sequence Error Flag bit
volatile bit WRERR @ ((unsigned)&EECON1*8)+3;
// Program FLASH Erase Enable bit
volatile bit FREE @ ((unsigned)&EECON1*8)+4;
// Load Write Latches Only bit
volatile bit LWLO @ ((unsigned)&EECON1*8)+5;
// FLASH Program / Data EEPROM or Configuration Select bit
volatile bit CFGS @ ((unsigned)&EECON1*8)+6;
// FLASH Program / Data EEPROM Memory Select bit
volatile bit EEPGD @ ((unsigned)&EECON1*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned RD : 1;
volatile unsigned WR : 1;
volatile unsigned WREN : 1;
volatile unsigned WRERR : 1;
volatile unsigned FREE : 1;
volatile unsigned LWLO : 1;
volatile unsigned CFGS : 1;
volatile unsigned EEPGD : 1;
};
} EECON1bits @ 0x195;
#endif
// Register: EECON2
volatile unsigned char EECON2 @ 0x196;
// bit and bitfield definitions
// Register: RCREG
volatile unsigned char RCREG @ 0x199;
// bit and bitfield definitions
// Register: TXREG
volatile unsigned char TXREG @ 0x19A;
// bit and bitfield definitions
// Register: SPBRGL
volatile unsigned char SPBRGL @ 0x19B;
volatile unsigned char SPBRG @ 0x19B;
// bit and bitfield definitions
// Register: SPBRGH
volatile unsigned char SPBRGH @ 0x19C;
// bit and bitfield definitions
// Register: RCSTA
// Receive Status and Control Register
volatile unsigned char RCSTA @ 0x19D;
// bit and bitfield definitions
// 9th bit of received data (can be parity bit)
volatile bit RX9D @ ((unsigned)&RCSTA*8)+0;
// Overrun Error bit
volatile bit OERR @ ((unsigned)&RCSTA*8)+1;
// Framing Error bit
volatile bit FERR @ ((unsigned)&RCSTA*8)+2;
// Address Detect Enable bit
volatile bit ADDEN @ ((unsigned)&RCSTA*8)+3;
// Continuous Receive Enable bit
volatile bit CREN @ ((unsigned)&RCSTA*8)+4;
// Single Receive Enable bit
volatile bit SREN @ ((unsigned)&RCSTA*8)+5;
// 9-bit Receive Enable bit
volatile bit RX9 @ ((unsigned)&RCSTA*8)+6;
// Serial Port Enable bit
volatile bit SPEN @ ((unsigned)&RCSTA*8)+7;
#ifndef _LIB_BUILD
union {
struct {
volatile unsigned RX9D : 1;
volatile unsigned OERR : 1;
volatile unsigned FERR : 1;
volatile unsigned ADDEN : 1;
volatile unsigned CREN : 1;
volatile unsigned SREN : 1;
volatile unsigned RX9 : 1;
volatile unsigned SPEN : 1;
};
} RCSTAbits @ 0x19D;
#endif
// Register: TXSTA
// Transmit Status and Control Register
volatile unsigned char TXSTA @ 0x19E;
// bit and bitfield definitions
// 9th bit of transmit data; can be used as parity bit
volatile bit TX9D @ ((unsigned)&TXSTA*8)+0;
// Transmit Operation Idle Status bit
volatile bit TRMT @ ((unsigned)&TXSTA*8)+1;
// High Baud Rate Select bit
volatile bit BRGH @ ((unsigned)&TXSTA*8)+2;
// Send BREAK character bit
volatile bit SENDB @ ((unsigned)&TXSTA*8)+3;
// USART Mode Select bit
volatile bit SYNC @ ((unsigned)&TXSTA*8)+4;
// Transmit Enable bit
volatile bit TXEN @ ((unsigned)&TXSTA*8)+5;
// 9-bit Transmit Enable bit
volatile bit TX9 @ ((unsigned)&TXSTA*8)+6;
// Clock Source Select bit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -