![]() They use direct digital synthesis (DDS) techniques to generate any waveform that can be described by a table of amplitudes and time steps. More advanced function generators are called arbitrary waveform generators (AWG). Some function generators can also generate white or pink noise. This capability makes it very easy to evaluate the frequency response of a given electronic circuit. RF generators for higher frequencies are not function generators in the strict sense since they typically produce pure or modulated sine signals only.įunction generators, like most signal generators, may also contain an attenuator, various means of modulating the output waveform, and often the ability to automatically and repetitively “sweep” the frequency of the output waveform (by means of a voltage-controlled oscillator) between two operator-determined limits. Two such walking ring counters are perhaps the simplest way to generate the continuous-phase frequency-shift keying used in dual-tone multi-frequency signaling and early modem tones.Ī typical function generator can provide frequencies up to 20 MHz. This is perhaps the simplest numerically-controlled oscillator. Most function generators also contain a non-linear diode shaping circuit that can convert the triangle wave into a reasonably accurate sine wave by rounding off the corners of the triangle wave in a process similar to clipping in audio systems.Ī walking ring counter, also called a Johnson counter, and a (linear) resistor-only shaping circuit is an alternative way to produce an approximation of a sine wave. Other duty cycles (theoretically from 0% to 100%) can be obtained by using a comparator and the sawtooth or triangle signal. ![]() slow rise and fast fall, or fast rise and slow fall.Ī 50% duty cycle square wave is easily obtained by noting whether the capacitor is being charged or discharged, which is reflected in the current switching comparator output. Sawtooth waves can be produced by charging the capacitor slowly with low current, but using a diode over the current source to discharge quickly – the polarity of the diode changes the polarity of the resulting sawtooth, i.e. By varying the current and the size of the capacitor, different frequencies may be obtained. As the output voltage reaches upper or lower limits, the charging or discharging is reversed using a comparator, producing the linear triangle wave. This produces a linearly ascending and descending voltage ramp. The triangular wave is generated by repeatedly charging and discharging a capacitor from a constant current source. This triangular wave is used as the basis for all of its other outputs. Simple function generators usually generate triangular waveform whose frequency can be controlled smoothly as well as in steps. Function generators are primarily used for working with analog circuits, related pulse generators are primarily used for working with digital circuits. For example, they may be used as a signal source to test amplifiers or to introduce an error signal into a control loop. Some function generators can be phase-locked to an external signal source (which may be a frequency reference) or another function generator.įunction generators are used in the development, test and repair of electronic equipment. When those traits are required, other signal generators would be more appropriate. Another feature included on many function generators is the ability to add a DC offset.Īlthough function generators cover both audio and RF frequencies, they are usually not suitable for applications that need low distortion or stable frequency signals. The send() method is handy when writing coroutines or using generators for advanced purposes.In addition to producing sine waves, function generators may typically produce other repetitive waveforms including sawtooth and triangular waveforms, square waves, and pulses. The send() method lets you retrieve values from the generator and send values back into the generator function, effectively pausing it, and allowing you to control its execution. # Send 5 into generator, received at second yield # Send 10 into generator, received at first yield You can also pass values into a generator using send(): def generator_with_send (): When you call the next() function on the generator object, execution picks up from the previous yield point. Each yield statement in a function acts like a checkpoint. ![]() Generators can keep track of their state.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |