
Originally Posted by
blueroomelectronics I was thinking on doing a PCB for the might be popular LC meter. There is a better 16F628A version. I'd like a frequency & duty counter too if I did it. Might base it on a 16F88 instead. Would also like to see if it's possible to get the internal comparator working in the design.

I got the internal comparator working as an oscillator on a '628A Bill. It ties up the TMR0 T0CKI pin (RA4) though so I had to setup TMR1 as the frequency counter and I fed the comparator output to the T1CKI pin (RB6). Here's how I setup the comparator;
Code:
MAIN movlw b'00000110' ; |B0
; b7 = C2OUT |B0
; b5 = C2INV |B0
movwf CMCON ; turn comparator on |B0
bsf STATUS,RP0 ; bank 1 |B1
movlw b'00001111' ; RA4=output, RA0-RA3=inputs |B1
movwf TRISA ; |B1
movlw b'01000000' ; RB6 = input (T1CKI) |B1
movwf TRISB ; |B1
bcf STATUS,RP0 ; bank 0 |B0
Just need to fabricate a new prototype and finish the software. I was using the serial port and Hyperterminal instead of an LCD.