Hey, eTobey, you seem friends with the OP. I'm curious, too, please ask him why TF it has to be a spreadsheet?
But here's how I would do it:
- First, you have to have the waveform sampled at the frequency of your PWM.
- Then paste (or import) the digitized samples in a spreadsheet column, let's say column A.
- Find the minimum and the maximum values of the column A, then in another cell, find the maximum between the abs(max) and abs(min). That would be the scaling factor for 100%
- Then prepare a formula in a second column, say column B, with the scaled value + waveform offset (if there is any), such that the resulting number in the column B is the PWM duty factor.
The duty factor column would be the one to export to CSV then convert to the format desired by the signal generator. It's a problem of scaling + applying a bias to the ADC samples.
Don't know how good are your spreadsheet skills. Does these steps make any sense? Is this what you want?
Another thing, the request is unusual. My generator imports waveform samples, not PWM duty factor samples. Is your generator different, or is the PWM request for some other unusual usecase?