Cable Guy
Joined: 09 Jan 2008 Posts: 4 Location: Malaysia
|
Need help -- too many #includes |
Posted: Sun Jan 27, 2008 10:11 am |
|
|
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 |
|