; Super simple freq - voltage converter. RomanBlack Oct 2009
; connect input to PIC pin RA0
; connect output RC filter from PIC pin RB0
; 200uS delay means 1000Hz input = 1v DC output
start
btfsc PORTA.0 ; first wait for input to be low
goto $-1
btfss PORTA.0 ; now wait for input to go high
goto $-1
bsf PORTB.0 ; set output high
nop ; enough nop's here to make 200uS delay
nop ; or use your own 200uS delay code
nop ; (etc)
bcf PORTB.0 ; set output low again
goto start