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

📄 pic16f87.h

📁 PS2 读取键盘数具,非常好的一个软件PCB
💻 H
📖 第 1 页 / 共 2 页
字号:
 /* header file for the MICROCHIP PIC microcontrollers
	PIC16F87
	PIC16F88
 */

#ifndef	__PIC16F87_H
#define	__PIC16F87_H

// Special function register definitions

static volatile       unsigned char	TMR0		@ 0x01;
static volatile       unsigned char	PCL		@ 0x02;
static volatile       unsigned char	STATUS		@ 0x03;
static                unsigned char	FSR		@ 0x04;
static volatile       unsigned char	PORTA		@ 0x05;
static volatile       unsigned char	PORTB		@ 0x06;
static volatile       unsigned char	PCLATH		@ 0x0A;
static volatile       unsigned char	INTCON		@ 0x0B;
static volatile       unsigned char	PIR1		@ 0x0C;
static volatile       unsigned char	PIR2		@ 0x0D;
static volatile       unsigned char	TMR1L		@ 0x0E;
static volatile       unsigned char	TMR1H		@ 0x0F;
static                unsigned char	T1CON		@ 0x10;
static volatile       unsigned char	TMR2		@ 0x11;
static                unsigned char	T2CON		@ 0x12;
static volatile       unsigned char	SSPBUF		@ 0x13;
static volatile       unsigned char	SSPCON		@ 0x14;
static volatile       unsigned char	CCPR1L		@ 0x15;
static volatile       unsigned char	CCPR1H		@ 0x16;
static volatile       unsigned char	CCP1CON		@ 0x17;
static volatile       unsigned char	RCSTA		@ 0x18;
static volatile       unsigned char	TXREG		@ 0x19;
static volatile       unsigned char	RCREG		@ 0x1A;
#if defined(_16F88)
static volatile       unsigned char	ADRESH		@ 0x1E;
static volatile       unsigned char	ADCON0		@ 0x1F;
#endif
static          bank1 unsigned char	OPTION		@ 0x81;
static volatile bank1 unsigned char	TRISA		@ 0x85;
static volatile bank1 unsigned char	TRISB		@ 0x86;
static          bank1 unsigned char	PIE1		@ 0x8C;
static          bank1 unsigned char	PIE2		@ 0x8D;
static volatile bank1 unsigned char	PCON		@ 0x8E;
static volatile bank1 unsigned char	OSCCON		@ 0x8F;
static          bank1 unsigned char	OSCTUNE		@ 0x90;
static          bank1 unsigned char	PR2		@ 0x92;
static          bank1 unsigned char	SSPADD		@ 0x93;
static volatile bank1 unsigned char	SSPSTAT		@ 0x94;
static volatile bank1 unsigned char	TXSTA		@ 0x98;
static          bank1 unsigned char	SPBRG		@ 0x99;
#if defined(_16F88)
static          bank1 unsigned char	ANSEL		@ 0x9B;
#endif
static volatile bank1 unsigned char	CMCON		@ 0x9C;
static volatile bank1 unsigned char	CVRCON		@ 0x9D;
#if defined(_16F88)
static volatile bank1 unsigned char	ADRESL		@ 0x9E;
static          bank1 unsigned char	ADCON1		@ 0x9F;
#endif
static volatile bank2 unsigned char	WDTCON		@ 0x105;
static volatile bank2 unsigned char	EEDATA		@ 0x10C;
static          bank2 unsigned char	EEADR		@ 0x10D;
static volatile bank2 unsigned char	EEDATH		@ 0x10E;
static          bank2 unsigned char	EEADRH		@ 0x10F;
static volatile bank3 unsigned char	EECON1		@ 0x18C;
static volatile bank3 unsigned char	EECON2		@ 0x18D;


/* Definitions for STATUS register */
static volatile       bit	CARRY		@ ((unsigned)&STATUS*8)+0;
static volatile       bit	DC		@ ((unsigned)&STATUS*8)+1;
static volatile       bit	ZERO		@ ((unsigned)&STATUS*8)+2;
static volatile       bit	PD		@ ((unsigned)&STATUS*8)+3;
static volatile       bit	TO		@ ((unsigned)&STATUS*8)+4;
static                bit	RP0		@ ((unsigned)&STATUS*8)+5;
static                bit	RP1		@ ((unsigned)&STATUS*8)+6;
static                bit	IRP		@ ((unsigned)&STATUS*8)+7;

/* Definitions for PORTA register */
static volatile       bit	RA0		@ ((unsigned)&PORTA*8)+0;
static volatile       bit	RA1		@ ((unsigned)&PORTA*8)+1;
static volatile       bit	RA2		@ ((unsigned)&PORTA*8)+2;
static volatile       bit	RA3		@ ((unsigned)&PORTA*8)+3;
static volatile       bit	RA4		@ ((unsigned)&PORTA*8)+4;
static volatile       bit	RA5		@ ((unsigned)&PORTA*8)+5;
static volatile       bit	RA6		@ ((unsigned)&PORTA*8)+6;
static volatile       bit	RA7		@ ((unsigned)&PORTA*8)+7;

/* Definitions for PORTB register */
static volatile       bit	RB0		@ ((unsigned)&PORTB*8)+0;
static volatile       bit	RB1		@ ((unsigned)&PORTB*8)+1;
static volatile       bit	RB2		@ ((unsigned)&PORTB*8)+2;
static volatile       bit	RB3		@ ((unsigned)&PORTB*8)+3;
static volatile       bit	RB4		@ ((unsigned)&PORTB*8)+4;
static volatile       bit	RB5		@ ((unsigned)&PORTB*8)+5;
static volatile       bit	RB6		@ ((unsigned)&PORTB*8)+6;
static volatile       bit	RB7		@ ((unsigned)&PORTB*8)+7;

/* Definitions for INTCON register */
static volatile       bit	RBIF		@ ((unsigned)&INTCON*8)+0;
static volatile       bit	INT0IF		@ ((unsigned)&INTCON*8)+1;
static volatile       bit	TMR0IF		@ ((unsigned)&INTCON*8)+2;
static                bit	RBIE		@ ((unsigned)&INTCON*8)+3;
static                bit	INT0IE		@ ((unsigned)&INTCON*8)+4;
static                bit	TMR0IE		@ ((unsigned)&INTCON*8)+5;
static                bit	PEIE		@ ((unsigned)&INTCON*8)+6;
static                bit	GIE		@ ((unsigned)&INTCON*8)+7;

/* Definitions for PIR1 register */
static volatile       bit	TMR1IF		@ ((unsigned)&PIR1*8)+0;
static volatile       bit	TMR2IF		@ ((unsigned)&PIR1*8)+1;
static volatile       bit	CCP1IF		@ ((unsigned)&PIR1*8)+2;
static volatile       bit	SSPIF		@ ((unsigned)&PIR1*8)+3;
static volatile       bit	TXIF		@ ((unsigned)&PIR1*8)+4;
static volatile       bit	RCIF		@ ((unsigned)&PIR1*8)+5;
static volatile       bit	ADIF		@ ((unsigned)&PIR1*8)+6;

/* Definitions for PIR2 register */
static volatile       bit	EEIF		@ ((unsigned)&PIR2*8)+4;
static volatile       bit	CMIF		@ ((unsigned)&PIR2*8)+6;
static volatile       bit	OSFIF		@ ((unsigned)&PIR2*8)+7;

/* Definitions for T1CON register */
static                bit	TMR1ON		@ ((unsigned)&T1CON*8)+0;
static                bit	TMR1CS		@ ((unsigned)&T1CON*8)+1;
static                bit	T1SYNC		@ ((unsigned)&T1CON*8)+2;
static                bit	T1OSCEN		@ ((unsigned)&T1CON*8)+3;
static                bit	T1CKPS0		@ ((unsigned)&T1CON*8)+4;
static                bit	T1CKPS1		@ ((unsigned)&T1CON*8)+5;
static                bit	T1RUN		@ ((unsigned)&T1CON*8)+6;

/* Definitions for T2CON register */
static                bit	T2CKPS0		@ ((unsigned)&T2CON*8)+0;
static                bit	T2CKPS1		@ ((unsigned)&T2CON*8)+1;
static                bit	TMR2ON		@ ((unsigned)&T2CON*8)+2;
static                bit	TOUTPS0		@ ((unsigned)&T2CON*8)+3;
static                bit	TOUTPS1		@ ((unsigned)&T2CON*8)+4;
static                bit	TOUTPS2		@ ((unsigned)&T2CON*8)+5;
static                bit	TOUTPS3		@ ((unsigned)&T2CON*8)+6;

/* Definitions for SSPCON register */
static                bit	SSPM0		@ ((unsigned)&SSPCON*8)+0;
static                bit	SSPM1		@ ((unsigned)&SSPCON*8)+1;
static                bit	SSPM2		@ ((unsigned)&SSPCON*8)+2;
static                bit	SSPM3		@ ((unsigned)&SSPCON*8)+3;
static                bit	CKP		@ ((unsigned)&SSPCON*8)+4;
static                bit	SSPEN		@ ((unsigned)&SSPCON*8)+5;
static volatile       bit	SSPOV		@ ((unsigned)&SSPCON*8)+6;
static volatile       bit	WCOL		@ ((unsigned)&SSPCON*8)+7;

/* Definitions for CCP1CON register */
static                bit	CCP1M0		@ ((unsigned)&CCP1CON*8)+0;
static                bit	CCP1M1		@ ((unsigned)&CCP1CON*8)+1;
static                bit	CCP1M2		@ ((unsigned)&CCP1CON*8)+2;
static                bit	CCP1M3		@ ((unsigned)&CCP1CON*8)+3;
static volatile       bit	CCP1Y		@ ((unsigned)&CCP1CON*8)+4;
static volatile       bit	CCP1X		@ ((unsigned)&CCP1CON*8)+5;

/* Definitions for RCSTA register */
static volatile       bit	RX9D		@ ((unsigned)&RCSTA*8)+0;
static volatile       bit	OERR		@ ((unsigned)&RCSTA*8)+1;
static volatile       bit	FERR		@ ((unsigned)&RCSTA*8)+2;
static                bit	ADDEN		@ ((unsigned)&RCSTA*8)+3;
static                bit	CREN		@ ((unsigned)&RCSTA*8)+4;
static                bit	SREN		@ ((unsigned)&RCSTA*8)+5;
static                bit	RX9		@ ((unsigned)&RCSTA*8)+6;
static                bit	SPEN		@ ((unsigned)&RCSTA*8)+7;

#if defined(_16F88)
/* Definitions for ADCON0 register */
static                bit	ADON		@ ((unsigned)&ADCON0*8)+0;
static volatile       bit	GODONE		@ ((unsigned)&ADCON0*8)+2;
static                bit	CHS0		@ ((unsigned)&ADCON0*8)+3;
static                bit	CHS1		@ ((unsigned)&ADCON0*8)+4;
static                bit	CHS2		@ ((unsigned)&ADCON0*8)+5;
static                bit	ADCS0		@ ((unsigned)&ADCON0*8)+6;
static                bit	ADCS1		@ ((unsigned)&ADCON0*8)+7;
/* Alternate definitions for ADCON0 register */
static volatile       bit	ADGO		@ ((unsigned)&ADCON0*8)+2;
#endif

/* Definitions for OPTION register */
static          bank1 bit	PS0		@ ((unsigned)&OPTION*8)+0;
static          bank1 bit	PS1		@ ((unsigned)&OPTION*8)+1;
static          bank1 bit	PS2		@ ((unsigned)&OPTION*8)+2;
static          bank1 bit	PSA		@ ((unsigned)&OPTION*8)+3;
static          bank1 bit	T0SE		@ ((unsigned)&OPTION*8)+4;
static          bank1 bit	T0CS		@ ((unsigned)&OPTION*8)+5;

⌨️ 快捷键说明

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