![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| hi friends what about Microcontroller based Function Generator project using some AT89c2051 or higher an DAC 0808 ,and LM741 for c/v conversion to generate Sine, square, triangle, and sawtooth waveforms , and it also have some capability like (1) To display the status on LCD whats going on at output (like what waveform at what freq) (2) Also it can produce variable frequency by pressing up and down button then start http://upload.wikimedia.org/wikipedi...eforms.svg.png | |
| |
| | (permalink) |
| You are here too? Bury the very old LM741 opamp and use a modern opamp that has enough power bandwidth.
__________________ Uncle $crooge | |
| |
| | (permalink) |
| Fast, fine frequency control isn't easy to do using micro controllers, you generally have issues with the clock rate the chip is running at being different than the frequency you're trying to generate. As long as the output signal is divisable by the MCU clock this can be avoided but this will limit your frequency output. You could use an adjustable clock source for the MCU, perhaps from an analog PLL. The MCU could adjust this PLL to get a desired running frequency by using some other external clock as a refrence on an interupt. It's basically a frequency counter in reverse. Instead of using a fixed sampling period to determine a variable external clocks frequency, you use the fixed external frequency pulse to determine the local oscilator's frequency.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) | |
| Quote:
A table and linear interpolation would give you any frequency required. Obviously, as the frequency increases then the CPU clock will have more of an effect. I would guess that for audio frequencies, this would be easily doable with a microcontroller. Mike. Edit, missed that sentence in the middle - "this can be avoided but this will limit your frequency output" Last edited by Pommie; 24th September 2007 at 03:51 AM. | ||
| |
| | (permalink) |
| The DAC referenced by the original post has a 150ns settling time for a rail to rail swing, that's over 6.5MHz's. An at89c2051 has a maximum clock frequency of 24mhz, so I'm assuming this is a real function generator not an audio one. TPS would need to specify his desired frequency range for each function (they're not all going to be the same) and desired resolution. I'm not sure of the jmp instructions execution speed on this chip, but it's either 2 or 4 cycles so you'd be limited to either 8mhz or 4.8mhz for a looping pattern, or the full 24mhz for a one shot that fit within flash space. Aliasing can and does occur on a CD player, but it's either filtered on the final output stage or it's not audioble to the human ear. If this is digital/analog electronics usage aliasing will make a function generator effectivtly useless.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." Last edited by Sceadwian; 24th September 2007 at 04:15 AM. | |
| |
| | (permalink) |
| I haven’t done that with a microcontroller. But the below readymade FUNCTION GENERATORS I have measured with a frequency counter done by a microcontroller. ICL8038, XR2206, MAX038 | |
| |
| | (permalink) | |
| Quote:
__________________ Uncle $crooge | ||
| |
| | (permalink) |
| I saw the ICL8038 surplus $4 I think, BGMICRO(?)... Anyway, search for 'AVR DDS', saw several done in software. Don't remember all the chips, but there was a Tiny2313, ATmega88, and ATmega8. Couple of PIC versions as well. | |
| |
| | (permalink) |
| It really all depends on the frequency range and resolution desired. The AVR ones are good to a couple hundred khz's the resolution is pretty good
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." Last edited by Sceadwian; 26th September 2007 at 01:06 AM. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| analog function generator theory schematic | walters | General Electronics Chat | 13 | 16th December 2005 05:28 PM |
| Function Generator question: What is GATE function? | Cifrocco | General Electronics Chat | 8 | 14th April 2005 04:11 AM |
| Function Generator output driver | evandude | General Electronics Chat | 6 | 31st January 2005 08:49 PM |
| Microcontroller based UPS | grandestlama | Micro Controllers | 6 | 23rd August 2004 05:00 PM |
| problem with function generator | samcheetah | General Electronics Chat | 0 | 17th April 2004 08:53 AM |