Here is my program
void delay(int);
#include<p18f452.h>
void main(void)
{
LATCbits.LATC4=0;
LATCbits.LATC5=0;
delay(100);
LATCbits.LATC5=1;
delay(100);
LATD=0x38;
LATCbits.LATC4=0;
LATCbits.LATC5=0;
delay(100);;
LATCbits.LATC5=1;
delay(100);
LATD=0x01;
LATCbits.LATC4=1;
LATCbits.LATC5=0;
delay(100);;
LATCbits.LATC5=1;
delay(100);
LATD='w';
}
void delay(int a)
{
int j;
for(j=0;j<a;j++)
{
}
}
& here is a schematic for reference
View attachment 63764
the program neither works on PIC Board, nor on Proteus sim
& this is not just about this particular program. no program (even as simple as led blinking didn't run). Any reasons? Ic does get programmed though.
void delay(int);
#include<p18f452.h>
void main(void)
{
LATCbits.LATC4=0;
LATCbits.LATC5=0;
delay(100);
LATCbits.LATC5=1;
delay(100);
LATD=0x38;
LATCbits.LATC4=0;
LATCbits.LATC5=0;
delay(100);;
LATCbits.LATC5=1;
delay(100);
LATD=0x01;
LATCbits.LATC4=1;
LATCbits.LATC5=0;
delay(100);;
LATCbits.LATC5=1;
delay(100);
LATD='w';
}
void delay(int a)
{
int j;
for(j=0;j<a;j++)
{
}
}
& here is a schematic for reference
View attachment 63764
the program neither works on PIC Board, nor on Proteus sim
& this is not just about this particular program. no program (even as simple as led blinking didn't run). Any reasons? Ic does get programmed though.