electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

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


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> PIC-Based Signal Generator --- help! ^__^
Author Message
naj.cuizon



Joined: 04 Jul 2005
Posts: 23
Helped: 7


Post29 Dec 2005 6:56   

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.
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6490
Helped: 1542
Location: West Coast


Post29 Dec 2005 7:29   

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



Sorry, but you need login in to view this attachment

Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post29 Dec 2005 7:41   

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%255F843%255F0%255F%255F0%255F,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.
Back to top
naj.cuizon



Joined: 04 Jul 2005
Posts: 23
Helped: 7


Post08 Jan 2006 14:38   

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! ^__^
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post08 Jan 2006 15:02   

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.
Back to top
naj.cuizon



Joined: 04 Jul 2005
Posts: 23
Helped: 7


Post11 Jan 2006 7:51   

signal generator with pic


what is DDS?
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6490
Helped: 1542
Location: West Coast


Post11 Jan 2006 8:26   

pic based function generator


DDS = Direct Digital Synthesis

Have a look at this example:
http://www.qsl.net/pa3ckr/signalgenerator/

Regards,
IanP
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post11 Jan 2006 8:31   

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!
Back to top
naj.cuizon



Joined: 04 Jul 2005
Posts: 23
Helped: 7


Post12 Jan 2006 13:32   

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?
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post12 Jan 2006 17:01   

генератор сигналов на 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.
Back to top
gentxtelmer2003



Joined: 27 Jun 2005
Posts: 17
Helped: 1


Post31 Jan 2006 15:08   

pic rf signal generator


How can we configure the AD9850 if we use parallel loading using the PIC16F877A?
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post31 Jan 2006 15:41   

frequency generator with pic


Refer to "Programming the AD9850" on page 9 of the AD9850 data sheet:
http://www.analog.com/en/prod/0,,770_843_AD9850%2C00.html

Is that the answer you need, or do you need help writing a PIC program?
Back to top
gentxtelmer2003



Joined: 27 Jun 2005
Posts: 17
Helped: 1


Post31 Jan 2006 16:02   

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?
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post31 Jan 2006 17:29   

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.
Back to top
jhaavi_19



Joined: 02 Feb 2006
Posts: 3
Helped: 1


Post02 Feb 2006 7:50   

ad9850 dds


howw DDS chip registers can be controlled by microcontroller..........
Back to top
_



Joined: 18 Jan 2006
Posts: 15


Post02 Feb 2006 15:45   

pic tv signal generator


Does the project have to use a micro?

Why not use the Exar XR2206.
Back to top
gentxtelmer2003



Joined: 27 Jun 2005
Posts: 17
Helped: 1


Post08 Feb 2006 18:15   

ad9834 c code


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

Anyone willing to help us writting the Program?
Back to top
philba



Joined: 26 Jan 2006
Posts: 133
Helped: 12


Post08 Feb 2006 18:20   

dds frequency generator


Is this a school project?
Back to top
gentxtelmer2003



Joined: 27 Jun 2005
Posts: 17
Helped: 1


Post09 Feb 2006 0:50   

dds frequency generator projet


Yes, a project design in our school.
Back to top
Google
AdSense
Google Adsense




Post09 Feb 2006 0:50   

Ads




Back to top
naj.cuizon



Joined: 04 Jul 2005
Posts: 23
Helped: 7


Post21 Feb 2006 9:18   

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.
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6490
Helped: 1542
Location: West Coast


Post22 Feb 2006 9:11   

pic based signal gnerator


For 1MHz output any of these frequencies can be used ..
Even with the lowest clock from your list (24MHz) the resultant frequency resolution will be better than 0.005Hz (see the formula below) ..

"do the reference frequency affect the DAC" - I wouldn't worry about it ..

Regards,
IanP



Sorry, but you need login in to view this attachment

Back to top
naj.cuizon



Joined: 04 Jul 2005
Posts: 23
Helped: 7


Post22 Feb 2006 18:28   

pic timer1 signal generator


IanP:

"do the reference frequency affect the DAC" - I wouldn't worry about it ..


sir, it worries me coz we are having a hard time fining the DAC sine wave to a smooth sine wave (analog like)..

also, the datasheet suggest that we use a five pole elliptical low pass filter 42MHz 200ohm impedance.. is this not to be taken consideration in choosing a reference clock?
Back to top
bobcat1



Joined: 10 Jul 2002
Posts: 1118
Helped: 48


Post25 Feb 2006 18:11   

pic based dds generator


Hi

Any one have C code for FM modulating the AD9850 ?


thanks


Bobi
Back to top
shedeed



Joined: 26 Sep 2004
Posts: 70
Helped: 1
Location: Egypt


Post27 Feb 2006 0:02   

max038 ic details


You can use a simple diagram of consists of PIC ucontroller and a DAC, you may program it as follows:
Use either matlab or any program to generate the hexadecimal numbers of a sine wave and store it in the memory of the ucontroller
Program the ucontroller to output those values to PortA.
Use any suitable DAC to convert the number to analog level-but make sure that the frequency is also suitable for 1MHz operation.
You can simulate the circuit using Proteus which allow simulation of programmable ICs.
Back to top
William At MyBlueRoom



Joined: 26 Feb 2006
Posts: 9
Location: Toronto, Canada


Post27 Feb 2006 12:43   

ad9834 programa


Here's a link to a man that's been in electronics longer than I can remember.

http://www.tinaja.com/

I've attached an article from his site on Magic Sinewaves using a PIC processor.

Hope you find it of use.

Bill

www.myblueroom.com My PIC projects



Sorry, but you need login in to view this attachment

Back to top
elcielo



Joined: 13 Jun 2002
Posts: 854
Helped: 6


Post28 Feb 2006 1:19   

max038 function generator microprocessor


http://www.tinaja.com/glib/stepsynt.pdf
Back to top
naj.cuizon



Joined: 04 Jul 2005
Posts: 23
Helped: 7


Post07 Mar 2006 12:27   

ad9834 basic code


when we say PIC-Based, what does this imply? When we say PIC-Based Signal Generator, must the signal come from the PIC?

what is your idea on this?
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> PIC-Based Signal Generator --- help! ^__^
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
looking for a pic-based signal generator (4)
HELP on PIC PROGRAMING with AD9850 SIGNAL GENERATOR (30)
PIC based video character generator (6)
A Reconfigurable FPGA-Based Readback Signal Generator For Ha (3)
Sending signal to PIC 16f877a thru GUI (MFC dialog based) (1)
PLC BASED DIESEL GENERATOR AUTOMATION HELP (1)
ture random number generator based chaotic design help me (8)
EPROM/PIC Sinewane generator help (6)
i need help for pic 16f877 about sine generator (5)
AVR / 89 free Programmer based on PIC Help (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS