Sine wave generator


Closed Thread
Results 1 to 14 of 14
  1. #1
    Mario's Avatar
    Mario Guest

    Default Sine wave generator

    Can I use the Pic to generate me 10 MHz pure sine wave.IF it is possible can someone help me with the code.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yes, but only if you use a 16F84 @ 4Mhz

    Well, actually, No.

    If you had an 18F running at 40mhz, you could execute 1 instruction per cycle of that 10mhz. That's not enough to add 2 numbers, let alone generate a sine wave.

    Now, if you really meant 10khz, then Yes, you can get close with FREQOUT. But it won't be "Pure".

    .
    DT

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Is the frequency of 10MHZ may change or you want it fix?
    1. Some Wein bridge Op-Amp circuit are possible.. at 10MHZ.. may work or not, never tried it before.
    2. MAX038 will work... not cheap, do too much things
    3. 10MHZ square wave TTL or CMOS based and integrated twice (or more) with low pass/bandpass/highpass filter using op-amp.
    4. If your project will use a PIC.. why not choosing a 10MHZ Crystal and send the sgnal to a buffer... then send it to those low-pass filter?
    Last edited by mister_e; - 14th March 2006 at 02:43.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Mario's Avatar
    Mario Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    Is the frequency of 10MHZ may change or you want it fix?
    1. Some Wein bridge Op-Amp circuit are possible.. at 10MHZ.. may work or not, never tried it before.
    2. MAX038 will work... not cheap, do too much things
    3. 10MHZ square wave TTL or CMOS based and integrated twice (or more) with low pass/bandpass/highpass filter using op-amp.
    4. If your project will use a PIC.. why not choosing a 10MHZ Crystal and send the sgnal to a buffer... then send it to those low-pass filter?
    Actually why I 'm thinking in that way, because I'm restricted with 9 v battery so you can't use opamp and it's is not simple to design it using transistors (I'm not good in that).

    As MR. Darrel Taylor said it's not possible with PIC , then help me with any circuits.

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Mario,

    Search DDS (Direct Digital Synthesis).
    Search with Google: DDS 16f84

    Examples with an AVR:
    http://www.myplace.nu/avr/minidds/
    http://www.geocities.com/leon_heller/minidds.html

    Best regards,

    Luciano

  6. #6
    Mario's Avatar
    Mario Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano
    Hi Mario,

    Search DDS (Direct Digital Synthesis).
    Search with Google: DDS 16f84

    Examples with an AVR:
    http://www.myplace.nu/avr/minidds/
    http://www.geocities.com/leon_heller/minidds.html

    Best regards,

    Luciano
    thank you for ur co-operation but that will not work with me. My project should be portable (not connected PC).what I want exactly is simple (sinewave) oscillator circuit with a single supply (not more than 9v) at 10 MHz or more.

  7. #7
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    The two links I posted run with a 9V battery.
    You don't need a PC. Add a keyboard and
    an LCD if you need the ability to enter
    a user selectable frequency.

    Luciano

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    why are you thinking that it will not work with OPAMP even @9V?

    What else the project do? Do you need a variable frequency?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Mario's Avatar
    Mario Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    Quote Originally Posted by mister_e
    why are you thinking that it will not work with OPAMP even @9V?

    What else the project do? Do you need a variable frequency?
    ..............

    I know there are a single supply op-amp's but it might not give me acceptable sine wave ( amplitude )....and frequency...... if I can do it by op-amp just help me with good one I can use.

    For me no need for variable frequency......... I wana connect it to power amplifier. I need my frequency to be stable that's why I need crystal.

    I think it should be done in more simple way (n. of Chip used ,cost,....) than what they advice me to do..

  10. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    How about my favourite LT1722?

    Maybe i'll try to figure out something. So if i correctly undrstand, the only thing you need is a simple 10MHZ SineWave generator... nothing else, no PIC, no LCD nothing else?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  11. #11
    Mario's Avatar
    Mario Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    How about my favourite LT1722?

    Maybe i'll try to figure out something. So if i correctly undrstand, the only thing you need is a simple 10MHZ SineWave generator... nothing else, no PIC, no LCD nothing else?
    That's what I'm trying to tell.

    I will try with LT1722 thanxx

  12. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Something that spring to mind using a PIC.

    Use a 12F629 or else with an external Crystal. Fed the CLKOUT signal to those OpAmp Filter.

    The PIC will manage the Power-on/Off AND monitor the battery voltage. Could be interesting now... well just an idea.

    One other using a 12F683.
    This one Will produce a PWM signal on GP2 to generate a negative voltage for the OpAmp and do the same things as the previous suggestion.

    Unfortunately those baby 10F can't run with an external OSC... that would be perfect here...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  13. #13
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmpfff, forget the PWM stuff. We can even have +V and -V by designing the power supply another way...just by moving the Ground reference you can have +4V, kinda gnd and -5V if you're using a fix 5Volt regulator.

    The main problem will be when the battery voltage will drop... mmm i still prefer the PWM stuff after all
    Last edited by mister_e; - 15th March 2006 at 18:56.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  14. #14
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Smile #12

    #12 Of Steve will do the trick

Similar Threads

  1. To Generate Sine Wave Using PCPWM of PIC18F4331 (Issue)
    By Cyborg in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd March 2014, 13:39
  2. Sine wave
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 18th May 2009, 03:31
  3. Generating 3-phase sine wave..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 6th November 2008, 14:07
  4. square to sine wave help
    By TONIGALEA in forum General
    Replies: 6
    Last Post: - 2nd July 2006, 09:32
  5. PBP Dampened Sine Wave
    By Keith55555 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd April 2004, 20:01

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts