Maker Pro
Maker Pro

Generating waveforms using I2C


Jun 21, 2017
Jun 21, 2017
Hi, first time poster... sorry for the essay! (Essentials in bold :))

Working on an Android based product at the moment that requires me to generate a variety of waveforms (sine, spike, square, stepped... etc.) at up to 1KHz on 12 channels simultaneously.

Now at the moment we are using I2C to communicate with a DAC ( ).

To produce the waveforms we have built up byte arrays for each wave form and cycle through those arrays writing each byte to the DAC. However we are running into speed issues, this is understandable when you consider for example 600Hz...:

1/600 = 0.00166 - We need to complete a cycle every 1.66milliseconds

4*20 = 80 - there are 4 bytes for each I2C write [Address] [offset] [data] [data] and approx 20 writes per cycle

0.00166/80 = 0.0000208 - therefore we need to write 1 byte every 20 microseconds for each channel

0.0000208/12 = 0.0000017 - when all 12 channels are taken into account we need to write a byte every 1.7 microseconds

We can comfortably run a single waveform up to about 100Hz but beyond that you start seeing bytes being partially sent or not sent at all.

Now, my question is... Do you clever people out there know of any IC that can be programmed with custom waveforms and output them at a requested frequency up to 1kHz? Or does anyone have any suggestions? I have been able to find ICs that will produce sine, spike and square waves but unfortunately we need a variety of non standard waveforms.

Worst case we will have to make up some sort of interface board and use a second micro but we would like to avoid this if possible.

Thanks for any help, we're really stuck in the mud at the moment so any suggestions are welcome.

Kind regards,