Here is actual solution -
Basically WaveDAC generates sine, used just 64 sample, could have used up to 256.
Output is 4V, so R divider takes that down to 1V. A button is debounced and drives a
T F-F to select between .9V and 1V. You could have used a pot to make amplitude
variable. Then R divider is buffered via OpAmp follower.
When button is pushed that toggles .9V or 1V selection, and lights LED when in .9V.
The T F-F feeds and open drain driver to ground the additional divider R to drop the V
to .9V.
Single chip solution except for Rs, LED, button.
In this example only two lines of code needed. To start the WaveDAC8 and the OpAmp.
If you needed to burst N half sines in a single burst thats easily accomplished with onchip
resources.
Scope shot -
Again sample resolution could be raised to get a more continuous generation of the half sine.
This all used very few chip resources, leaving the rest available for use.
Regards, Dana.