Electronic Sculpture Archive
Bruce Cannon

This site is an archive of my older interactive,  electronic and computer-controlled sculpture.  You can always find out about my latest projects via my gateway, brucecannon.com.

   

my_prefs.h

Code Listing

This is my standard header file, which contains convenience labels used in all my programs.  You will need this in order to compile any of the programs you find on my site.  Of course, you will also need the C compiler for the PIC from Custom Computer Services.  This won't work with other compilers.

As with all my code listings, you may need to copy them to an editor which supports 4-char tabs to see and print them correctly.

/*
my_prefs.H
05-26-99
Bruce Cannon
My labels for general use.
*/
#define RA0 pin_A0
#define RA1 pin_A1
#define RA2 pin_A2
#define RA3 pin_A3
#define RA4 pin_A4
#define RA5 pin_A5
#define RB0 pin_B0
#define RB1 pin_B1
#define RB2 pin_B2
#define RB3 pin_B3
#define RB4 pin_B4
#define RB5 pin_B5
#define RB6 pin_B6
#define RB7 pin_B7
#define RC0 pin_C0
#define RC1 pin_C1
#define RC2 pin_C2
#define RC3 pin_C3
#define RC4 pin_C4
#define RC5 pin_C5
#define RC6 pin_C6
#define RC7 pin_C7
#define BIT BOOLEAN
#define WORD LONG
#define ENABLE 0			//For pos. true control lines.
#define DISABLE 1
#define YES 1
#define NO 0
#define ON 1
#define OFF 0
#define UP 1
#define DOWN 0
#define HIGH 1
#define LOW 0
#define _ENABLE 0			//For neg. true control lines.
#define _DISABLE 1
#define _YES 0
#define _NO 1
#define NONE 0
#define EMPTY 0
#define NULL 0				//For ASCII stuff.
#byte PORTA = 5
#byte PORTB = 6
#byte PORTC = 7
#byte PORTD = 8
#byte PORTE = 9
#byte status = 3			//For setting the register page.
#bit RP0 = status.5			//		"
#define PORT 0				//		"
#define TRIS 1				//		"
#define IN 1				//For tris use:
#define OUT 0				//	"
#define ALL_INPUTS 255			//	"
#define ALL_OUTPUTS 0			//	"

 

Site contents licensed under a
Creative Commons License.

Creative Commons License