Hello, I have simple code:

Code:
CIKLI:
count portc.3,15, batvolt
if batvolt<>0 then
lcdout $FE, $C0,#BATVOLT, "   "
endif
GOTO CIKLI
The input sequence consists of series of pulses, which look like this:

First pulse lasts for 10ms then pause 1.8ms then 2nd pulse 0.8ms then pause 0.6ms and then again pulse 0.8ms
it takes about 15ms all this together

Hardware is 16F870, 4mhz clock. The "COUNT" statements returns any value, from 7 to 33, on each run. Any idea, how to fix?