This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
openbench_fgen [2007/04/12 22:12] ladyada |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== what ====== | ||
- | A completely open design for a function/waveform generator: hardware, firmware, software | ||
- | ====== Notes & stuff ====== | ||
- | |||
- | ===== Waveform generation ===== | ||
- | |||
- | Waveforms we want (in order of importance) | ||
- | * Sine wave | ||
- | * Square wave (with variable PWM) | ||
- | * Triangle wave | ||
- | * Sawtooth (possibly a modification of triangle wave???) | ||
- | * arbitrary waveform (sync, envelopes, etc) | ||
- | |||
- | Frequency range: | ||
- | * 1 Hz or lower | ||
- | * 100 KHz or higher (must cover audio ranges) | ||
- | * 1mHz -> 10MHz is ideal (digital/analog ranges) | ||
- | |||
- | |||
- | |||
- | ==== Generator tech ==== | ||
- | |||
- | Two options for chip 'styles' is the all-in-one oscillator (ICL3038, etc) +PLL or DDS | ||
- | |||
- | === Oscillators === | ||
- | |||
- | All-in-one is nice, except that the [[http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1257|MAX038]] is completely unavailable. And the [[http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=34972|XR2206]] kinda sucks. Also you'll need a PLL system to tune it. | ||
- | |||
- | === DDS === | ||
- | |||
- | Direct-Digital-Synthesis, currently popular. Basically: wavetable + 24 or 32 bit adder and sampling above nyquist to get precision waveforms. | ||
- | |||
- | Pros: digital, precise, no PLL needed | ||
- | Cons: hard to get high frequencies because of oversampling | ||
- | |||
- | Either roll your own or buy off the shelf ([[http://www.analog.com/en/subCat/0,2879,770%255F843%255F0%255F%255F0%255F,00.html|basically from AD]]) | ||
- | |||
- | == Off the shelf, AD parts == | ||
- | |||
- | They come with sync out, very very high speeds. But only sine and square out, and in small packages (TSSOP). | ||
- | |||
- | == Roll your own == | ||
- | |||
- | **Idea #1**: Get a chunk of SRAM (like, say, CY7C1399B-12VXC), fill it with your wavetable, then clock it with a variable clock ([[http://www.linear.com/pc/productDetail.do?navId=H0,C1,C1010,C1096,P2415|LTC6903]] 1KHz->68MHz !!) maybe use along with adder/scaler to provide more range at high/low freq. We could get up to 4MHz, nice! | ||
- | * Pros: high frequency range | ||
- | * Cons: complex, lots of glue and fiddling, but might be a good solution | ||
- | |||
- | **Idea #2**: SRAM + 32 bit adder, just like AD. Maybe make the adder in a CPLD or something else that can be clocked super-fast (See [[http://elm-chan.org/works/asg/report_e.html|ELM's DDS generator]] | ||
- | * Pros: the ideal solution | ||
- | * Cons: ugh CPLD, dont even know if there's a good solution available for the price/package we need | ||
- | |||
- | Idea #3: Hand-roll the adder code into a microcontroller, and use onboard memory. Lots of examples: [[http://www.scienceprog.com/avr-dds-signal-generator-in-line-asm-explained/|9 Cycles of ASM w/LPM]] | ||
- | * Pros: ultra-cheap/simple | ||
- | * Cons: 8-9 cycles @ 20MHz -> low frequency output |