login

online now

We have 87 guests and no members online

search

 
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Sine wave generation

Sine wave generation 3 years 3 months ago #498

Hello. I have a completed project which uses the Arduino Tone library. unfortunately and obviously, the library can only do square waves and I would like to have sine waves. Can I use my project, which is a simple 4x4 keypad/dtmf project to play two sine waves to create a DTMF tone programmatically? or does this product require the software to interface with it to generate the tones?

Thanks,
cbh

EDIT, oh I saw that you have presets for DTMF, but I would like to specify my own frequencies as this is a custom PBX.
Last Edit: 3 years 3 months ago by administrator.
The administrator has disabled public write access.

Re: Sine wave generation 3 years 3 months ago #499

Yes, the GinSing is capable of generating sine, square, ramp, and so on, with up to 6 simultaneous digitally control oscillators (DCOs). A simple example of generating simple tones might look something like this (from the sample code):
s->selectBank   ( BANK_A );		// select bank A ( can be A or B )
s->setPatch     ( OSC_1_TO_MIXER  );        // patch oscillator 1 to the mixer
s->setWaveform  ( OSC_ALL , SINE );      // set oscillastor to use a sinusoidal waveform
s->setAmplitude ( OSC_1 , 0.5f );         // set fixed output amplitude to 50%                                                                      
s->setFrequency ( OSC_1 , 100.0f );        // set the first oscillator to 100 Hz

This example is using the "synth" mode of the software interface, but you can also do it with the polyphonic mode; we encourage you to take a look at the user's guide to get an idea of how the interface works. The interface is an Arduino source code library that you include in your project that you make function calls to.

Another alternative is to send simple serial commands to the Babblebot IC directly, which is very low level but does not require the GinSing library. You can even download the source to see how the library does the serial calls if you want to go this route. The code is freely downloadable, as is all the documentation, so if you have any problems getting more information please let us know.

This might be a good place to start:

programming guide
Last Edit: 3 years 3 months ago by administrator.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.161 seconds