I have a PIC16F877A I need to program for a project. I am completely lost on how to get/setup an IDE to work with. I can't even get this bit of example code to compile correctly on MPLAB.
#include <16f877A.h>
#device ICD=TRUE
#fuses HS,NOLVP,NOWDT
#use delay (clock=20000000)
#define GREEN_LED PIN_A5
void main ()
{
while (TRUE)
{
output_low (GREEN_LED);
delay_ms (1000);
output_high (GREEN_LED);
delay_ms (1000);
}
}
I think I specified which type of PIC I was using, but I'm not sure if I did it right. If anyone could hold my hand to help me get an environment I can work in correctly, I would much appreciate it.
#include <16f877A.h>
#device ICD=TRUE
#fuses HS,NOLVP,NOWDT
#use delay (clock=20000000)
#define GREEN_LED PIN_A5
void main ()
{
while (TRUE)
{
output_low (GREEN_LED);
delay_ms (1000);
output_high (GREEN_LED);
delay_ms (1000);
}
}
I think I specified which type of PIC I was using, but I'm not sure if I did it right. If anyone could hold my hand to help me get an environment I can work in correctly, I would much appreciate it.