IIRC, Roman Black had once commented there isn't memory space left in the 16F628A to include additional features. A PIC with larger memory space might be required for a piecewise linear lookup table or a correction polynomial.If the propagation delay is known, it might be possible to correct it's effect in software, at least to some degree?
Yes, its a bit difficult as Roman Black had hard coded the value in firmware.I don't think I'm up to modifying the PIC's code, but I'll have a go at re-building it with a superfast comparator!
; original File = D:\down\CapMeter_HiRes_V11.hex processor 16F628A #include <P16F628A.INC> __config 0x3F02 ; _CP_OFF & _DATA_CP_OFF & _LVP_OFF & _BODEN_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF ; & _HS_OSC ; ; The scaling factor 919(dec)= Hex 0x397 is found hard coded in firmware, ; therefore it has been replaced by a EQU constant statement PConst_H & PConst_L ; at all these locations, so changing the values would be easy by changing the ; next two lines ; ; To reduced the comparator toggle frequency to 1/10(1/5) of ; the design by RomanBlack, using a 100K(or 50K) resistor instead of a 10K one. ; ; As a result, the displayed value is 10(5 if uses 50K) times bigger as captured frequency is ; 0.1(0.2)times the design value. This however, can be rectified by changing the ; proportional constant from 919 to 9190(4595). i.e. from 0x397 to 0x23E6(0x11F3) ; ; Because of the now low toggling frequency, max. cap value measurable is 5uF(10uF) ; ; Proportional Constant ; ================================================== ; PConst_H equ 0x03 // as from RomanBlack original ; PConst_L equ 0x97 // PConst_H equ 0x03 ; PConst_L equ 0x97 ;
Schematic looks ok, but check it again.In effect I have checked it with oscilloscope and the comparator circuit is not oscillating . But Why?
Is my schematic wrong?