CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Need help -- too many #includes

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Cable Guy



Joined: 09 Jan 2008
Posts: 4
Location: Malaysia

View user's profile Send private message Yahoo Messenger

Need help -- too many #includes
PostPosted: Sun Jan 27, 2008 10:11 am     Reply with quote

hi...

i need help for my line following robot program...
when i compile using CCS PIC C compiler...
there's error "too many # INCLUDEs"...
can someone help me...

this is my program....

#include <16f877.h>
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#fuses HS,NOPROTECT,NOWDT,BROWNOUT,PUT,NOLVP
#define motor2 PIN_E0 //MOTOR 1
#define motor1 PIN_E1 //MOTOR 2
#define enable1 PIN_c1// enb 1
#define enable2 PIN_c2 //enb 2
main()
{
while(1)
{
if(!input(PIN_E0)&&(!input(PIN_E1)))
{
output_high(enable1);
output_high(motor1);
output_high(enable2);
output_high(motor2);
delay_ms(1000);
}
else if(input(PIN_E0)&&(!input(PIN_E1)))
{
output_high(enable1);
output_high(motor1);
output_low(enable2);
output_high(motor2);
delay_ms(1000);
}

else if(!input(PIN_E0)&&(input(PIN_E1)))
{
output_low(enable1);
output_high(motor1);
output_high(enable2);
output_high(motor2);
delay_ms(1000);
}
else
{
output_high(enable2);
output_low(motor2);
output_high(enable1);
output_low(motor1);
delay_ms(1000);
}
}
_________________
Lets Rock n' Roll
JAA



Joined: 11 Nov 2007
Posts: 1

View user's profile Send private message

PostPosted: Sun Jan 27, 2008 10:31 am     Reply with quote

Hello Cable Guy,
In your code there is missing a close } .
By
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group