
; HI-TECH Software PICC Assembler header file.
; Definitions based on C header file: pic16f716.h.

; NOTE: PICC assembler option -P is required to preprocess assembler sources. 

; Special Function Register definitions
TMR0		equ	001h
PCL		equ	002h
STATUS		equ	003h
FSR		equ	004h
PORTA		equ	005h
PORTB		equ	006h
PCLATH		equ	00Ah
INTCON		equ	00Bh
PIR1		equ	00Ch
TMR1L		equ	00Eh
TMR1H		equ	00Fh
T1CON		equ	010h
TMR2		equ	011h
T2CON		equ	012h
CCPR1L		equ	015h
CCPR1H		equ	016h
CCP1CON		equ	017h
PWM1CON		equ	018h
ECCPAS		equ	019h
ADRES		equ	01Eh
ADCON0		equ	01Fh
OPTION		equ	081h
TRISA		equ	085h
TRISB		equ	086h
PIE1		equ	08Ch
PCON		equ	08Eh
PR2		equ	092h
ADCON1		equ	09Fh

; Bit variables associates within SFRs
#define CARRY	STATUS,0
#define DC	STATUS,1
#define ZERO	STATUS,2
#define PD	STATUS,3
#define TO	STATUS,4
#define RP0	STATUS,5
#define RP1	STATUS,6
#define IRP	STATUS,7
#define RA0	PORTA,0
#define RA1	PORTA,1
#define RA2	PORTA,2
#define RA3	PORTA,3
#define RA4	PORTA,4
#define RB0	PORTB,0
#define RB1	PORTB,1
#define RB2	PORTB,2
#define RB3	PORTB,3
#define RB4	PORTB,4
#define RB5	PORTB,5
#define RB6	PORTB,6
#define RB7	PORTB,7
#define RBIF	INTCON,0
#define INTF	INTCON,1
#define T0IF	INTCON,2
#define RBIE	INTCON,3
#define INTE	INTCON,4
#define T0IE	INTCON,5
#define PEIE	INTCON,6
#define GIE	INTCON,7
#define TMR1IF	PIR1,0
#define TMR2IF	PIR1,1
#define CCP1IF	PIR1,2
#define ADIF	PIR1,6
#define TMR1ON	T1CON,0
#define TMR1CS	T1CON,1
#define T1SYNC	T1CON,2
#define T1OSCEN	T1CON,3
#define T1CKPS0	T1CON,4
#define T1CKPS1	T1CON,5
#define T2CKPS0	T2CON,0
#define T2CKPS1	T2CON,1
#define TMR2ON	T2CON,2
#define TOUTPS0	T2CON,3
#define TOUTPS1	T2CON,4
#define TOUTPS2	T2CON,5
#define TOUTPS3	T2CON,6
#define CCP1M0	CCP1CON,0
#define CCP1M1	CCP1CON,1
#define CCP1M2	CCP1CON,2
#define CCP1M3	CCP1CON,3
#define DC1B0	CCP1CON,4
#define DC1B1	CCP1CON,5
#define P1M0	CCP1CON,6
#define P1M1	CCP1CON,7
#define PDC0	PWM1CON,0
#define PDC1	PWM1CON,1
#define PDC2	PWM1CON,2
#define PDC3	PWM1CON,3
#define PDC4	PWM1CON,4
#define PDC5	PWM1CON,5
#define PDC6	PWM1CON,6
#define PRSEN	PWM1CON,7
#define PSSBD0	ECCPAS,0
#define PSSBD1	ECCPAS,1
#define PSSAC0	ECCPAS,2
#define PSSAC1	ECCPAS,3
#define ECCPAS0	ECCPAS,4
#define ECCPAS2	ECCPAS,6
#define ECCPASE	ECCPAS,7
#define ADON	ADCON0,0
#define GODONE	ADCON0,2
#define CHS0	ADCON0,3
#define CHS1	ADCON0,4
#define CHS2	ADCON0,5
#define ADCS0	ADCON0,6
#define ADCS1	ADCON0,7
#define PS0	OPTION,0
#define PS1	OPTION,1
#define PS2	OPTION,2
#define PSA	OPTION,3
#define T0SE	OPTION,4
#define T0CS	OPTION,5
#define INTEDG	OPTION,6
#define RBPU	OPTION,7
#define TRISA0	TRISA,0
#define TRISA1	TRISA,1
#define TRISA2	TRISA,2
#define TRISA3	TRISA,3
#define TRISA4	TRISA,4
#define TRISB0	TRISB,0
#define TRISB1	TRISB,1
#define TRISB2	TRISB,2
#define TRISB3	TRISB,3
#define TRISB4	TRISB,4
#define TRISB5	TRISB,5
#define TRISB6	TRISB,6
#define TRISB7	TRISB,7
#define TMR1IE	PIE1,0
#define TMR2IE	PIE1,1
#define CCP1IE	PIE1,2
#define ADIE	PIE1,6
#define BOR	PCON,0
#define POR	PCON,1
#define PCFG0	ADCON1,0
#define PCFG1	ADCON1,1
#define PCFG2	ADCON1,2
