Interfacing a Oscillator to a processor

Discussion in 'The Projects Forum' started by GRC, Mar 10, 2012.

  1. GRC

    Thread Starter Member

    Apr 20, 2009
    21
    0
    I need to interface a microprocessor input to the output of a 16 - 20 Mhz oscillator. The output of the oscillator can be as high as 7.5 v p-p or down to 3 volts p-p all sitting on a 4.5 volt level. I am coupling to the oscillator with a 22 pf cap which at 18 Mhz is around 400 ohms. The spec from the datasheet is +/- 20 ma for the clamp current. I used 7.5 volts and the impedance of the cap and come out to 18 ma peak.

    Is it okay to couple this way using the internal clamp diodes or should i do it a different way. If not a good way what would be a better way

    Thanks
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    I've used the internal clamp diodes to limit 120V AC peaks off the line by just putting enough resistance in the path, so rather then depend on the reactance of the cap just put a resistor there to limit current. The cap may or may not help depending on the exact wave you get.

    Looking at your signal extremes it may not be enough to work as the min 3 VPP signal only gives you a -0.6 to 1.5V signal when clamped at the digital pin, which is not enough for a logic high.
     
  3. GRC

    Thread Starter Member

    Apr 20, 2009
    21
    0
    Good point, what about if I bias the input of the ic at 1.5 volts so if I have 3 v p-p it would swing from 0 - 3 volt and if I had a 7.5 v p-p signal it would swing from - .6 to 5.25.

    Thanks
    Geoff
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    The problem with such a "risky scheme" (sorry, couldn't resist) is if the oscillator stops you have a digital pin biased half way, which could turn the digital stage super on where both output transistors come on, lots of current flows, and the magic smoke escapes.

    If I was doing this I would add another transistor stage to give a 0-5V output. then the 1.5V is plenty to turn on a simple NPN common emitter inverting buffer.
     
  5. GRC

    Thread Starter Member

    Apr 20, 2009
    21
    0
    Thanks for the reply. I guess putting another buffer in is the best way to go,

    Geoff
     
Loading...