pic16f877a.h中文注释
存放路径:在PICC软件hi-tech安装目录下,E:\Microchip\cc8.05\include,找到pic1687xa.h,里面即有
以下是头文件内容及详细注释:
/*
* Header file for the Microchip
* PIC 16F873A chip
* PIC 16F874A chip
* PIC 16F876A chip
* PIC 16F877A chip
* Midrange Microcontroller
*/
#if defined(_16F874A) || defined(_16F877A)
#define __PINS_40
#endif
static volatile unsigned char INDF @ 0x00; //间接寻址寄存器
static volatile unsigned char TMR0 @ 0x01; //定时器0
static volatile unsigned char PCL @ 0x02; //低8位程序计数器
static volatile unsigned char STATUS @ 0x03; //程序状态寄存器
static unsigned char FSR @ 0x04; //特殊功能寄存器
static volatile unsigned char PORTA @ 0x05; //端口A寄存器
static volatile unsigned char PORTB @ 0x06; //端口B寄存器
static volatile unsigned char PORTC @ 0x07; //端口C寄存器
#ifdef __PINS_40
static volatile unsigned char PORTD @ 0x08; //端口D寄存器
static volatile unsigned char PORTE @ 0x09; //端口E寄存器
#endif
static unsigned char PCLATH @ 0x0A; //高5位程序计数器
static volatile unsigned char INTCON @ 0x0B; //中断控制寄存器
static volatile unsigned char PIR1 @ 0x0C; //中断标志寄存器PIR1
static volatile unsigned char PIR2 @ 0x0D; //中断标志寄存器PIR2
static volatile unsigned char TMR1L @ 0x0E; //低字节计数寄存器
static volatile unsigned char TMR1H @ 0x0F; //高字节计数寄存器
static volatile unsigned char T1CON @ 0x10; //TMR1控制寄存器
static volatile unsigned char TMR2 @ 0x11; //定时/计数器TMR2
static volatile unsigned char T2CON @ 0x12; //TMR2控制寄存器
static volatile unsigned char SSPBUF @ 0x13; //收/发数据缓冲器
static volatile unsigned char SSPCON @ 0x14; //同步串口控制寄存器,对MSSP模块的功能和指标进行设置和定义
static volatile unsigned char CCPR1L @ 0x15; //捕获/比较/PWM寄存器低字节
static volatile unsigned char CCPR1H @ 0x16; //捕获/比较/PWM寄存器低字节
static volatile unsigned char CCP1CON @ 0x17; //CCP1CON寄存器
static volatile unsigned char RCSTA @ 0x18; //USART接收控制兼状态寄存器
static volatile unsigned char TXREG @ 0x19; //USART发生缓冲器
static volatile unsigned char RCREG @ 0x1A; //USART接收缓冲器
static volatile unsigned char CCPR2L @ 0x1B; //捕获/比较/PWM寄存器低字节
static volatile unsigned char CCPR2H @ 0x1C; //捕获/比较/PWM寄存器低字节
static volatile unsigned char CCP2CON @ 0x1D; //CCP2CON寄存器
static volatile unsigned char ADRESH @ 0x1E; //ADC转换结果寄存器高字节
static volatile unsigned char ADCON0 @ 0x1F; //A/D转换器开关位
/* bank 1 registers */
static unsigned char bank1 OPTION @ 0x81; //选择寄存器,用于配置TMR0/WDT预分频系数、外部INT中断、TMR0和端口B的弱上拉。
static volatile unsigned char bank1 TRISA @ 0x85; //A口方向寄存器
static volatile unsigned char bank1 TRISB @ 0x86; //B口方向寄存器
static volatile unsigned char bank1 TRISC @ 0x87; //C口方向寄存器
#ifdef __PINS_40
static volatile unsigned char bank1 TRISD @ 0x88; //D口方向寄存器
static volatile unsigned char bank1 TRISE @ 0x89; //E口方向寄存器
#endif
static volatile unsigned char bank1 PIE1 @ 0x8C; //中断允许寄存器PIE1
static volatile unsigned char bank1 PIE2 @ 0x8D; //中断允许寄存器PIE2