Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

PIC-Based Signal Generator --- help! ^__^

Status
Not open for further replies.

naj.cuizon

Junior Member level 2
Joined
Jul 4, 2005
Messages
23
Helped
9
Reputation
18
Reaction score
2
Trophy points
1,283
Activity points
1,585
pic signal generator

we are a group trying to create a PIC-Based Signal Generator ranging from 1Hz-1MHz that outputs both sine wave and square wave.

we need help in producing a clean sine wave output.

how can we produce a clean sine wave from a PIC?

need your help...

thanks.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
pic frequency generator

Generating sine wave in this range is not easy task ..
However, you can employ MAX038 function generator (see picture/file below), set S2 to SIN output, replace S1 switch with CD4066 CMOS switches controlled by a PIC (range selection), and, for fine tunning (you can use buttons for frequency increase/decrease), replace VR1 and VR3 by digitally controlled potentiometers controlled by the same PIC ..
For more details on the MAX038 IC goto:
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1257
(try to ask MAXIM for free samples)

Regards,
IanP
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
frequency generator pic

How clean is "clean"?

I would consider an inexpensive DDS chip such as AD9834, or one of these:
http://www.analog.com/en/subCat/0,2879,770%5F843%5F0%5F%5F0%5F,00.html

You will also need a clock oscillator, a low-pass filter (for the sinewave output), and a comparator (to convert the sinewave to square wave). The AD9834 includes a comparator.
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

naj.cuizon

Junior Member level 2
Joined
Jul 4, 2005
Messages
23
Helped
9
Reputation
18
Reaction score
2
Trophy points
1,283
Activity points
1,585
signal generator pic

by using the MAX038 function generator, how can we configure it to achieve a frequency resolution of 1Hz?

what circuit will be used in varying the frequency?

thanks! ^__^
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
ad9834 pic

The MAX038 is an analog oscillator with continuously variable frequency (by adjusting a capacitor or resistor), so its frequency resolution is infinite, but that also means it will be awkward to control from a microprocessor. Also, the frequency accuracy depends on component tolerances, and it will drift.

You requested "clean". I would never use the words "clean" and "MAX038" in the same sentence.

I like the DDS.
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

naj.cuizon

Junior Member level 2
Joined
Jul 4, 2005
Messages
23
Helped
9
Reputation
18
Reaction score
2
Trophy points
1,283
Activity points
1,585
signal generator with pic

what is DDS?
 
  • Like
Reactions: sehole

    sehole

    points: 2
    Helpful Answer Positive Rating

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
pic based function generator

Click the link I gave above, download a datasheet such as the AD9834, and read the Circuit Description. You will see!
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

naj.cuizon

Junior Member level 2
Joined
Jul 4, 2005
Messages
23
Helped
9
Reputation
18
Reaction score
2
Trophy points
1,283
Activity points
1,585
ad9834 pic

IanP,

I had looked at the example you've given. However, I am confused with the Frequency Range of the example which is written as 0.1-40MHz. Does it mean that the Frequency Range is 0.1MHz-40MHz(meaning 100kHz-40Mhz) or 0.1Hz-40Mhz?
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
генератор сигналов на pic

The AD9850 DDS has a 32-bit control word, and the example project has a 100 MHz clock, so the DDS frequency is settable from 0 Hz to 50 MHz (see note below) in steps of about 0.023283 Hz. That's 100 MHz / 2^32.

Note: You don't want to run a DDS at its maximum frequency because you can't build an infinitely sharp low-pass filter.

You can use a clock slower than 100 MHz. It would reduce your max frequency, and give you smaller frequency steps.
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

gentxtelmer2003

Junior Member level 1
Joined
Jun 27, 2005
Messages
16
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,475
pic rf signal generator

How can we configure the AD9850 if we use parallel loading using the PIC16F877A?
 

gentxtelmer2003

Junior Member level 1
Joined
Jun 27, 2005
Messages
16
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,475
pic16f84 function generator

can u help us in biasing the AD9850?

we are having trouble biasing it since in the replies link given it is loaded in a serial form.

we are also having problems in writing the program especially in parallel loading.

Added after 3 minutes:

Also we are having problem looking for a 100MHz reference clock since we have limited available components.

Any suggestion on how to generate the oscillator?
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
pic based signal generator

What do you mean by "biasing"? The AD9850 data sheet talks about biasing the clock voltage, but that doesn't sound like your question.

What problems are you having writing the program? (I don't know PIC programming, but other folks who can help you will need to know more details of your problem.)

You can use any frequency clock from 1 MHz to 125 MHz (110 MHz if running at 3.3 volts). Remember that decreasing the clock frequency will decrease the sinewave output frequency.
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

jhaavi_19

Newbie level 3
Joined
Feb 2, 2006
Messages
3
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,307
ad9850 dds

howw DDS chip registers can be controlled by microcontroller..........
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

_

Junior Member level 1
Joined
Jan 18, 2006
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,449
pic tv signal generator

Does the project have to use a micro?

Why not use the Exar XR2206.
 

gentxtelmer2003

Junior Member level 1
Joined
Jun 27, 2005
Messages
16
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,475
ad9834 c code

Micro controller is needed since it is the Heart of our project.

Anyone willing to help us writting the Program?
 

philba

Full Member level 2
Joined
Jan 26, 2006
Messages
132
Helped
13
Reputation
26
Reaction score
1
Trophy points
1,298
Activity points
3,102
dds frequency generator

Is this a school project?
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

gentxtelmer2003

Junior Member level 1
Joined
Jun 27, 2005
Messages
16
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,475
dds frequency generator projet

Yes, a project design in our school.
 

    naj.cuizon

    points: 2
    Helpful Answer Positive Rating

naj.cuizon

Junior Member level 2
Joined
Jul 4, 2005
Messages
23
Helped
9
Reputation
18
Reaction score
2
Trophy points
1,283
Activity points
1,585
frequency generator on pic

which would be more advisable, to use a higher or a lower frequency for our reference clock in AD9850??? I am aware that lower frequencies would give me a tighter frequency resolution, but, do the reference frequency affect the DAC? i have this weird feeling that using higher ref freq would give me a finer DAC output. i stand to be corrected.. heheh..

we only have this frequencies to choose from: 80MHz, 64MHz, 50MHz or 24MHz. we are only interested in having a maximum output frequency of 1MHz.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top