Hey,
I basically want to trigger the mosfets in a DC-DC converter.I simply want to program the PIC16F877A to generate PWM signals with a certain delay for triggering the mosfets.However,when i tried to run the program i got an error-"22 304 error: End of input within #if (#ifdef) section started at line 1 } 1 error in preprocessor. D:\PIC\final.c" .I have attached the code below too,
I basically want to trigger the mosfets in a DC-DC converter.I simply want to program the PIC16F877A to generate PWM signals with a certain delay for triggering the mosfets.However,when i tried to run the program i got an error-"22 304 error: End of input within #if (#ifdef) section started at line 1 } 1 error in preprocessor. D:\PIC\final.c" .I have attached the code below too,
Rich (BB code):
#if defined (__PCB__)
#include <16f877a.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=20000000)
#elif defined(__PCM__)
#include <16F877a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
void main()
{
while(1)
{
output_d(0x55);
delay_us(10);
output_d(0x00);
delay_us(2);
output_d(0xaa);
delay_us(10);
output_d(0x00);
delay_us(2);
}
}
Last edited by a moderator: