How to use a Sample And Hold Component at arbitrary times

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
1 Reply
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Dupe post, being handled here -

   

 

   

http://www.cypress.com/forum/psoc-creator-software/how-use-sample-and-hold-component-arbitrary-times...

   

 

   

Regards, Dana.

0 Likes