Error when Using #define to set pins

tms8c8:
In my application, I am storing data in the program memory because EEPROM isn't big enough for all the data and I want it to be there after a power cycle. However, the data is large enough that memory is an issue. That is why I started looking into using the #define method.

Sounds like you'd better go back to the beginning and describe your memory space problems, because #define won't be of any help one way or the other in that respect. It is really just a general method of expressing a literal string or numeric constants in a symbolic way, to aid readability and maintainability of a program.

It really is a text processor that rewrites your source file before the compiler proper sees it. So you write

#define PI 3.14159

and write

double theta1 = PI/2.0;
double theta2 = = PI/4.0;

what the compiler will see is

double theta1 = 3.14159/2.0;
double theta2 = 3.14159/4.0;

To the compiler, it's as if PI never existed.

You can see why it is useful to avoid the sort of errors you might get by writing out the literals explicitly each time. You will probably end up getting things like

double theta1 = 3.14159/2.0;
double theta2 = 3.14259/4.0;

and have a lot of fun trying to figure out why your circles aren't exactly round...