hemnath
Advanced Member level 3
- Joined
- Jun 24, 2012
- Messages
- 702
- Helped
- 61
- Reputation
- 120
- Reaction score
- 57
- Trophy points
- 1,308
- Location
- Chennai
- Activity points
- 6,589
Hi, I'm using c18 compiler, 18F8722 microcontroller, cystal 20Mhz.
Trying to blink the led which is conneced on pin D0. But it is not blinking. What could be the problem?
Please help.
HTML:
#include<p18f8722.h>
#pragma config OSC = HS, IESO = OFF, FCMEN = OFF, WDT = OFF
/* *************** TIMER *************** */
void delayzz(void)
{
int i, j;
for(i=0;i<1000;i++)
{
for(j=0;j<2;j++)
{
/* Well its Just a Timer */
}
}
}
/* ****************** MAIN ****************** */
void main(void)
{
TRISD= 0x00; // PORT B Setting: Set all the pins in port B to Output.
while(1)
{
LATDbits.LATD0 = 1; // RB-1 to High
Delay10KTCYx(250);
// delayzz();
LATDbits.LATD0 = 0; // RB-0 to LOW
Delay10KTCYx(250);
// delayzz();
}
}
Trying to blink the led which is conneced on pin D0. But it is not blinking. What could be the problem?
Please help.