Hello.
Does anyone has some code?
Just want to have look, how it should be done properly.
Hello.
Does anyone has some code?
Just want to have look, how it should be done properly.
Most hardware timers can be setup as counters with external clock input.
Here's a snippet using TMR1 on a 16F88. (Not verified to work but should do so....)/Henrik.Code:TRISB.6 = 1 ' T1CKI is on RB6, make sure it's an input T1CON = %00000111 ' Enable TMR1 as a counter, 1:1 prescale, no sync. Main: LCDOUT $FE, 1, "Pulsecount: ", DEC TMR1H*256 + TMR1L Pause 250 Goto Main
Bookmarks