You need to log in to create posts and topics.

PIC16 Comparator doesn't work

PreviousPage 2 of 2
Quote from electr0n on September 24, 2025, 7:57 pm

Check this interesting discussion around the comparator operaiton in this circuit. Apparently the comparator has a 300ns propagation delay.
The ASM source code is even given there, so the code can be inspected.

Well... 300 ns is not relevant, we are talking 7 kHz vs 435 Hz (140 us vs 2.3 ms period).
That is one order of magnitude...

I don't know what is the mystery here, but I just don't see how that circuit can oscillate at 435 Hz.

If you feed the PIC with 435 Hz sure it will print 10000 ps in the LCD.

 

But... where is the source code?

I can't find it.

 

Also there is a guy that comments this:
https://www.electro-tech-online.com/threads/pic-based-high-resolution-cap-meter.119900/page-7#post-1086668

If the frequency is 1516Hz RA3, display shows 45.612 nF
if the frequency is 474Hz to RA3 it shows 146.4nF

That doesn't fit with 435 Hz 10 nF

Seems that something changed at some point...

Quote from arcachofo on September 24, 2025, 8:38 pm

But... where is the source code?

I can't find it.

 

On the same page, post #228. Direct link here.

Quote from arcachofo on September 24, 2025, 8:48 pm

Also there is a guy that comments this:
https://www.electro-tech-online.com/threads/pic-based-high-resolution-cap-meter.119900/page-7#post-1086668

If the frequency is 1516Hz RA3, display shows 45.612 nF
if the frequency is 474Hz to RA3 it shows 146.4nF

That doesn't fit with 435 Hz 10 nF

Seems that something changed at some point...

Well... I honesty don't know. The only plausible explanation is that the schematic shown on the site is an older version which firmware has been updated since. Maybe something in the ASM file can confirm it. The only way to know for sure is to get in touch with the author. I tried contacting him to know how he implemented the capacitance measurement, but got no reply.

On the same page, post #228. Direct link here.

Thank you.

That looks like a disassemble of the hex file, it is something, but lacks original label and variable names and maybe comments, etc.

I was concerned because it could be some problem in the simulator, but calculations and 2 other simulators agree with simulide, so I don't know what else to do.

Maybe somebody else has some ideas...

PreviousPage 2 of 2