Hi
I'm trying to understand how to make the timer1 work
I have input on PORTA.4 and it pulses, and I want to check if there's more or less than 10 seconds between the pulses
Then I thought I could do something like
I know the above code wont work and this is where I need your help, cause I just can't seem to find any info about how to set up Timer1 and then check how far it's counted.
Please write if I should supply more code
I'm trying to understand how to make the timer1 work
I have input on PORTA.4 and it pulses, and I want to check if there's more or less than 10 seconds between the pulses
Code:
TMR1CS = 0; //internal clock
TMR1ON = 1; //enables TIMER1
T1OSCEN = 0; //oscillator is shut-off
TMR1H = 0x00;
TMR1L = 0x00;
Then I thought I could do something like
Code:
if(Timer1 > 10)
{
//Do Stuff
}else{
//Do something else
}
I know the above code wont work and this is where I need your help, cause I just can't seem to find any info about how to set up Timer1 and then check how far it's counted.
Please write if I should supply more code