jean12
Advanced Member level 2
Hello,I am trying to use the timer 1 in Timer mode for timing a determined time for blinking a LED ,but I am not coming out with this,could anyone help me to sort this out?
I am uisng MicroC
the the code below I was trying to use:
Please help,thank you!!
I am uisng MicroC
the the code below I was trying to use:
PHP:
//#include <16f877a.h>
int count=0;
void main(void)
{
T1CON=0x01;
TRISC.F7=0X00;
TRISD.F1=0X00;
while(1)
{
while(TMR1IF==1) ;
{
PIR1.TMR1IF=0;
count++;
if(count==15)
{
count=0;
PORTC.F7=1;
delay_ms(1000);
PORTC.F7=0;
}
}
}
}
Please help,thank you!!