Help about square waveform generation!

Discussion in 'Embedded Systems and Microcontrollers' started by davidgrohl, Jun 18, 2014.

  1. davidgrohl

    Thread Starter New Member

    Jun 18, 2014
    2
    0
    Hi all,
    I'm a new forum user. I need your help. I would to generate a square waveform @1MHz or less more. I need to add this functionality to a board equipped with a STM32F107 CPU. I'm finishing board schematics but I can't find a way to generate a good waveform. The output voltage has to go from 0V to 3.0V. I try to search for a DAC but it seems to be too slow for what I need. Can you give me some indications about that.
    Thanks a lot.

    P.s. Sorry for my english :)
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,790
    davidgrohl likes this.
  3. davidgrohl

    Thread Starter New Member

    Jun 18, 2014
    2
    0
    Oscillator is 3.3V output. I need 3.0V
    I need a programmable output too. My square generation should be stoppable. Any suggestions?
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,790
    Sure. Read the specs carefully and note that they will work over a range of Vcc. Then look for an oscillator with an enable pin. So the four pins would be Vcc, GND, ENABLE, and CLKOUT.

    http://www.aextal.com/AE331.pdf

    Looking carefully, I see that Vdd can be in the range of 3.0V to 3.6V. Almost all parts are designed this way for a reason. It is very hard to control Vcc to an exact, to 2 decimal places, value.

    PS. Give me some credit for reading your original post and seeing that you needed a 3V supply.
     
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,387
    1,605
    "Stoppable" may be performed with an enable line.

    What sort of "programmable output" is required?
     
  6. BobTPH

    Active Member

    Jun 5, 2013
    782
    114
    3.3V to 3.0V = voltage divider. Zener diode if you want it more accurate.

    Bob
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,790
    Action of a voltage divider depends on load impedance and is very hard to control accurately and repeatedly. Using Vdd = 3.0 V is a far superior solution.
     
  8. BobTPH

    Active Member

    Jun 5, 2013
    782
    114
    And with a 3.0V supply the oscillator will be able to drive 3.0V into any load? Or does it also depend on load impedance?

    Bob
     
  9. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,361
    You can use the STM32F107 to generate the square wave. There are a whole bunch of timers built into that chip.
     
  10. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Someone has to ask...

    WHY do you need to make the micro generate a squarewave of 1MHz with some adjustability? What will that connect to?

    If you provide more information we can suggest more (and better) options. :)
     
  11. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,790
    Well I believe that a CMOS push pull driver will drive more loads, especially capacitive loads, than anything else I can imagine, but let's consult the datasheet.

    It will drive 5 TTL loads @ 1.6 mA per TTL load or 8 mA, or 15 pf of capacitive load with 6 ns rise and fall times.
     
Loading...