problem on source code in PIC16F877

Status
Not open for further replies.

apple

Newbie level 5
Joined
Feb 21, 2005
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,370
#define wake , 0 ( can this define the wake variable to always be zero )

can the name.inc file be programmed into the PIC???

thanks for your help...
 

apple said:
#define wake , 0 ( can this define the wake variable to always be zero )...

Yes, but you don't need the comma, just
#define wake 0

apple said:
can the name.inc file be programmed into the PIC???

thanks for your help...

What compiler are you using?
If you wanna include a separate file in your main source code,
if you are using CCS compiler,you can include some header files with extension "h"
file.h, but you can't have more then one C source using the CCS compiler.
If you go for PIC18 series and use C18 compiler, then you can have number of C sources and split your code in different files
 

#define wake 0
it's just a macro for the compiler. Whenever the compiler see's 'wake' in your source code, it substitutes 0. wake is not a variable! you wont be able to see it in your debugger. If you need to see it in your debugger as a variable, you need,
const unsigned char wake = 0;
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…