1 Reply Latest reply on Oct 2, 2015 4:27 AM by user_14586677

    How to use a Sample And Hold Component at arbitrary times

    peli.fidelman

      Hi, 

         

      I am trying to use a Sample and hold component to hold constant a voltage in a circuit at certain times. The time period to hold the voltage isn't repetitive and is controlled from the API C code.

         

      I tried doing this by setting the Sample and hold block "Sample clock edge" to "Negative" and the 'Sample mode" to "Sample and Hold".

         

      I can't use use  a clock entrance for "sclk" because I don't want to sample in a repeatative interval. For the sclk input I created a logical control signal that is logical high before I need to hold the signal and is changed to logical low when I need to to Hold constant a new Value from the Vin input. 

         

      This process repeats itself using a code loop that set the logical control signal to '1' in the beginning of each loop iteration

         

      Unfortunately this doesn't seem to work and the Sample and Hold output seems to be stuck at a voltage close to 0V.

         

       

         

      Do you have Any Idea how should I use the Sample and hold Component so that it would work properly?

         

       

         

      Thanks