04-23-2025 02:48 PM
Henrik, THIS is the one I meant to reply to. I'm not sure what I did wrong. I need it to be Friday though. My brain usually doesn't shut down this early in the week!
04-24-2025 04:40 PM - edited 04-24-2025 04:47 PM
Oh.. after looking at my old code ....
So, I made some simplifications of a multiplexed input.
You define a samplerate SR, now for each channel 12 more 'subsamples' are calculated (so the simulation has a samplerate SR*12*<No of channels>)
during one nominal SR duration all channels are succesiv sampled , beginning with a switch delay (switch charge ingnored) of one subsample, 10 subsample while the capacitor of the S&H is charged from its current state to the value actual channel value following a RC time constant. The C is the C from the S&H and the R is build by the MUX resistance and the output impedance of the source. (all the same in my sim.. still room for improvements ;), so I simply used one RC timeconstant for all channels) , during the last remaining subsample the value stored.
So one can see the settletime error and crosstalk due to the remaining charge in S&H capacitor and the source impedance and the different phase delays of the channels due to the muxing