problem with #include

Thread Starter

muhammad muhsin

Joined Mar 16, 2010
4
is it there is easiest programming?i mean im not study the programming with #include..it start with #define..
now my main problem is the programming part..
can anybody help me..i have 3 weeks to complete this robot..
could anybody send or teach me the source code..please...
 

BMorse

Joined Sep 26, 2009
2,675
#include and #define are 2 different statements used in assembly programming.

#include is used when you want the compiler to include an external file when it compiles your program: Example

#include pic16f628a.inc = means that you want the compiler to include this file when compiling your application or program into a hex file.

#define is used when you want to refer to a say a port bit or value with a specific name: example:

#define Button PORTA,0 = you are telling the compiler you want to refer to this port bit with the name Button, so now when you write code and you want to reference PORTA bit0, you will just refer to Button instead. (btfss Button, instead of writing btfss PORTA,0)

I hope this helps clear some things up for you.

B. Morse
 
Top