How much voltage PIN_C0 needs for measuring oscilation?
Posted: Tue Oct 14, 2025 7:23 am
I have got an instuctance meter working, but it has only 1Vpp amplitude. I have a PIC16F886 microcontroller used as a measuring instrument with pin C0 as an input. I häve tried to adjust the level from 0 to 5V, but it doesn't work. How much does it need an amplitude? Or do I have ot make a comparison? Or another measuring device?
Pekka
gaugeguy
Joined: 05 Apr 2011 Posts: 350
Posted: Tue Oct 14, 2025 8:13 am
According to the data sheet with a 5V supply the low must be below 1.0V and the high must be above 4.0V on pin C0.
Ttelmah
Joined: 11 Mar 2010 Posts: 19958
Posted: Tue Oct 14, 2025 9:29 am
First thing, if the is an analogue signal it'll probably be +/- of the 0v line
not swinging just positive which a logic input will require. As gaugeguy says
the pin needs a much bigger swing too.
Now you could capacitively couple the signal and bias the voltage it swings
round to perhaps the centre of the 5v supply. Still too small though. Could you
not use one of the internal comparators instead pf C0?. This allows the
detection of much smaller voltage swings, but limits the frequency supported.
Realistically you need to add a high speed comparator, and use this to feed C0.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum