Hi all,
I am very new to microcontroller. I try to write my first program using PIC16F876A to trigger led 3 second interval. Code is
#include <pic.h>
#include "delay.h"
#include "delay.c"
main()
{
TRISB = 0x00;
PORTB = 0x00;
while (1)
{
PORTB=0x80;
DelayS(3);
PORTB=0x00;
DelayS(3);
}
}
And i compiled the code using Hi-TECH lite version
I programmed PIC16F876A using icprog(using JMD programmer option). Finally i connected power supply and LED(see the attached file), but nothing happen. Please help me.
Regards,
santhosh
I am very new to microcontroller. I try to write my first program using PIC16F876A to trigger led 3 second interval. Code is
#include <pic.h>
#include "delay.h"
#include "delay.c"
main()
{
TRISB = 0x00;
PORTB = 0x00;
while (1)
{
PORTB=0x80;
DelayS(3);
PORTB=0x00;
DelayS(3);
}
}
And i compiled the code using Hi-TECH lite version
picc --chip=16F876A port.c
I programmed PIC16F876A using icprog(using JMD programmer option). Finally i connected power supply and LED(see the attached file), but nothing happen. Please help me.
Regards,
santhosh