PA3040
Advanced Member level 3
Dear All
This is my first Hi-Tech C program with 16f877
This program working well but only fault is when delay value exceed 200 __delay_ms(200);
the program blink only one other wise blink forever
Thanks
Please advice
This is my first Hi-Tech C program with 16f877
This program working well but only fault is when delay value exceed 200 __delay_ms(200);
the program blink only one other wise blink forever
Code:
#include <htc.h>
#define _XTAL_FREQ 4000000 // 4 MHz clock
//__CONFIG(CP_OFF & BOREN_OFF & WDTE_OFF & PWRTE_ON & FOSC_XT );
__CONFIG(0X3F39);
main(){
TRISC = 0;
//TRISD = 0;
while(1){
PORTC = 0xff;
__delay_ms(150);
PORTC = 0x00;
__delay_ms(150);
}
}
Thanks
Please advice