Jump to content
  • 0

TTL signal with mcc 152


nbv

Question

Hi

I'm using MCC 152 DO to send a TTL with a fixed pulse width (5 msec) and frequency (100 Hz). I use a Python script with a loop using time.sleep() for the "ON TIME" and "OFF time". when looking at the output with a scope it seems that the signal is not stable and with a lower actual frequency. is there a way to do that differently with a clock (I think the MCC 152 doesn't have one), perhaps from the pi? A small added complexity is that I need to synchronize an analogue read (using an MCC 118) with the TTL pulse.

thanks 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

The execution time to set and clear a TTL line on the MCC152 is at the mercy of the Raspberry PI operating system. This means at times, the function executes more quickly than at other times, which shows up as signal instability. I don't know if it is still available, but there was something called Pigpio for Python that gave you control over the GPIO and could generate precisely timed square waves.  If you go this route, make sure to review the MCC118 and MCC152 interface specifications so that you don't step on the wrong GPIO.

https://mccdaq.github.io/daqhats/_static/esmcc152.pdf

https://mccdaq.github.io/daqhats/_static/esmcc118.pdf

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...