Paul__B:
capicoso:
Anyhow, I really need to have a range from 0-5v. It's not for audio. I generate DC signals and control analog synthesisers. Each volt is an octave, so to have 5 octaves I need 5vNot a problem.
Two solutions - use a DAC chip which is specified to go "rail to rail", or (what is, or should have been, perfectly obvious from the start), "scale" the gain on your op-amp (potentiometer and resistor on the feedback to the inverting input) so that whatever the maximum voltage is, becomes 5V.
What you have apparently not understood in respect of DACs or indeed, ADCs, it that the binary value of your 8-bit number ranges from 0 to 255, not 256 so your voltage will never get to 5V. If you reference the end of the resistor chain to 5V instead of ground, you can get the equivalent of a 1 to 256 range which would correspond to 5V except for loading by the following amplifier - but of course, then not a zero. You need an extra bit to reach both ends of the range.
In practice, your five octaves (61 notes) does not map neatly into 256 values at all, so "scaling" with the gain adjustment on the op-amp so that 255 corresponds to 5V is the way to go.
I see, thanks.
I was thinking of building it like this(from musicfromouterspace):
see attachment
how does it look?
