I'm working on a frequency counter coursework, where I use MSP430 MCU. I have to measure signals with specifications: frequency from 0.1 Hz to 1 MHz and signal's amplitude from 0.1V to 10V. The problem is with signal’s amplitude, I understand that the voltage of 10V is too high and 0.1V is too low for MCU input. Do you have any ideas how to reduce 10V signal's amplitude to 2.7V-3.6V level and how to amplify 0.1V signal to 2.7V-3.6V level? I tried to find information on the internet, but I found just voltage divider, which one isn’t suitable for me. Maybe, are there any chips which one can do this function?
I agree with Andy about using a comparator, but disagree about attenuating the input signal to fit into the comparator range. I would rather clip it than attenuate it.
Another possibility is to power the comparator from a wide supply range, and use the type that has a open collector output. 1 MHz isn't really all that high, and it's no problem to use a low enough pullup so that the rise time is still small compared to the 1 µs period. Since you're measuring (or possibly counting) periods, a little assymmetry in the digital signal doesn't matter. You just have to make sure that you still get solid edges with a 1 MHz 100 mV sine wave in.
I would also be very careful with hysteresis in this case. It can help to not get a bunch of fast edges with a slow input, but it must still be a small compared to the 100 mV minimum input signal. Perhaps AC couping 10 mV or so back to the positive input would be reasonable. I'd probably try it first without any hystersis.
Use a comparator - it has a reference input (set to some midrail value) and a "real" input. If the real input rises above the reference input the comparator's output goes high. When the real input falls below the reference input the comparator output falls low. MAX999 springs to mind - it's super fast, has built in hysterisis and works from 3.3V. It should drive your MCU perfectly.
All you have to do is restrict the 10v input signal to about 3.3volts using a potential divider of about 3:1. This will also reduce the smallest signal by the same amount i.e. 0.1 volt to 33mV but the chip will cope I believe.
Hysterisis is useful when the input signal gets close the the reference threshold - it prevents a series of quickly repeating retriggers due to noise being present or the signal wavering a bit.