Standard Defs for PIC12C5



//DEFS_12C.H
//
//12C509, 12ce519 DEFS

#define W  0
#define F  0

//----- Register Files -----------------------------------------------------

#byte INDF	=0x00
#byte TMR0      =0x01
#byte PCL       =0x02
#byte STATUS    =0x03
#byte FSR       =0x04
#byte OSCCAL    =0x05
#byte GPIO      =0x06

// Additional dedicated files
#byte OPTIONS   =0x07
#byte DIRS      =0x08

// I/O Bits
#bit scl	=0x06.7
#bit sda	=0x06.6
#bit gp5	=0x06.5
#bit gp4	=0x06.4
#bit gp3	=0x06.3
#bit gp2	=0x06.2
#bit gp1	=0x06.1
#bit gp0	=0x06.0

// Direction Bits

#bit dir_scl =0x08.7
#bit dir_sda =0x08.6
#bit dir5    =0x08.5
#bit dir4    =0x08.4
#bit dir3    =0x08.4
#bit dir2    =0x08.2
#bit dir1    =0x08.1
#bit dir0    =0x08.0


//----- STATUS Bits --------------------------------------------------------

#bit gpwuf 	=0x03.7
#bit pa0        =0x03.5
#bit not_to	=0x03.4
#bit not_pd	=0x03.3
//#bit z 	=0x03.2
//#bit dc       =0x03.1
//#bit c	=0x03.0


//----- OPTION Bits --------------------------------------------------------

//#bit not_gpwu
//#bit not_gppu
//#bit t0cs
//#bit t0se
//#bit psa
//#bit ps2
//#bit ps1
//#bit ps0

// for assembly language
#define SCL 7
#define SDA 6
#define GP5 5
#define GP4 4
#define GP3 3
#define GP2 2
#define GP1 1
#define GP0 0

#define Z	2
#define C	0