View previous topic :: View next topic |
Author |
Message |
pattawongse
Joined: 07 Oct 2010 Posts: 1
|
" too many nested #include " help |
Posted: Thu Oct 07, 2010 4:55 am |
|
|
I using ccs with pic16f688
with this code
Code: |
"#include <16F688.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=20000000)
void main()
{
set_tris_c(0x00);
while(true)
{
output_c(0x3F);
delay_ms(1000);
output_c(0x00);
delay_ms(1000);
}
}
|
but when click compile it has error occur
***Error 17 "C:\pic\16F688.h Line (9,10); Too many nested #INCLUDEs
then it show .h file
Code: |
#include <16F688.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOBROWNOUT //No brownout reset
#FUSES MCLR //Master Clear pin enabled
#FUSES NOCPD //No EE protection
#FUSES NOPUT //No Power Up Timer
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#use delay(clock=20000000)
|
help please
|
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1941 Location: Norman, OK
|
|
Posted: Thu Oct 07, 2010 6:49 am |
|
|
Your first line <includes> the file 16F688.h then the 16F688.h file you
created <includes> the same name again. In addition the included file
repeats the fuses and #use delay lines.
Your fuses and #use delay are already in the main program so the best
course is to simply rename the file you created called 16F688.h and let the
program use the CCS provided 16F688.h device header file that should be in
your PICC/devices directory.
Add the #device adc=8 line just after the FUSES line in your main program.
Finally, delete the set_tris_c(0x00) line and let the compiler handle it. Since
you are not using fast_io (and you don't need it) the line has no real effect. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
|