mikej wrote:
Yeah, it took me a while to find a suitable small switch.
It is eswitch ra tl1105-rf100q digikey EG1837-ND fits.
Thanks! I will update my PCB with it:-).
I prefer to use offset maths for DSP work, it is easier to see in the simulator.
Say your input is 8 bit 0 to 255.
This could mean the signal is -128 to 127 if the value 128 is taken as 0.
If you want to use signed numbers you can still use std_logic_vector (in VHDL) - just remember that the number is signed so invert and add one where appropriate.
In the SID, I generate the waveform with unsigned then, before multiplying it with the envelope, I flip the MSB.
Then, I mix the 3 voices (and the DC offset) together and multiply the result with the volume. Finally, I flip back the MSB to have unsigned for the 1-bit DAC.
The 1-bit DAC has a 64x oversampling (linear interpolation) and a first order sigma-delta. I will try a second order later.
It's just wires, so it's how you treat the value which matters.
/Mike