[sdiy] Calibration procedures for digital CV modules?

Tom Wiltshire tom at electricdruid.net
Thu Apr 22 12:39:31 CEST 2021

> On 22 Apr 2021, at 11:29, Richie Burnett <rburnett at richieburnett.co.uk> wrote:
>> You can maybe get away with integer math by using fixed point?
> Fixed-point fractional was going to be my recommendation, instead of using floating point.
> For example if you want to scale a value down by 1.23% you would multiply the 16-bit ADC or DAC value by 64730 then shift the result right 16 bit positions and round up if necessary.  Really it is just integer maths as far as the CPU is concerned, but *you* imagine where the binary point is, and keep track of which bits are the whole part and which bits are fractional bits.

+1 agree. There’s certainly no need for floating point for a job like this. It’s just a question of working out how much calculation accuracy you need and giving yourself enough fractional bits to store it.

Spiros, I’m not really sure what the problem is that you’re asking for help with. Are you having trouble with a particular method, or asking for advice on a good method?

If the output DAC is not linear, you’d have to take plenty of calibration points and compensate the curve.
If the output DAC is reasonably linear, you only need work out a best-fit ‘scale/gain' and ‘offset' value.

More information about the Synth-diy mailing list