Hello !
I really need help.
I am new to PIC. So i have been using pic16F877A microcontroller.
I have the next code and i get the next error:
Can't open include file "16F877A.h": No such file or directory
I don't find the 16F877A.h header file.
I am using Mplab IDE and HI-TECH compliler.
On C drive ("C:\Program Files (x86)\HI-TECH Software\PICC\9.83\include") into include folder i found
as16f877a.h header file.
Please help me!
Thank you!
Moderators note: used code tags
I really need help.
I am new to PIC. So i have been using pic16F877A microcontroller.
I have the next code and i get the next error:
Can't open include file "16F877A.h": No such file or directory
I don't find the 16F877A.h header file.
I am using Mplab IDE and HI-TECH compliler.
On C drive ("C:\Program Files (x86)\HI-TECH Software\PICC\9.83\include") into include folder i found
as16f877a.h header file.
Please help me!
Thank you!
C:
#include <16F877A.h>
#use delay(crystal=4000000)
byte i;
#INT_TIMER2
void timer2_isr(void)
{
clear_interrupt(INT_TIMER2);
i++;
if(i > 9)
{
i = 0;
output_toggle(PIN_B0);
}
}
void main()
{
setup_timer_2 (T2_DIV_BY_16, 0xF0, 13 ); // Timer2 prescaler 16,
// Preload value 0xF0, postoscaler 13
clear_interrupt(INT_TIMER2); // Clear Timer2 interrupt flag bit
enable_interrupts(INT_TIMER2); // Enable Timer2 interrupt
enable_interrupts(GLOBAL);
output_low(PIN_B0);
while(TRUE) ; // Endless loop
}
Last edited by a moderator: