• 0

Digital Discovery - Constant Tristate Digital Output with SDK


Question

Hello,

I am having troubles setting a constant voltage level for a tristate digital out pin on the Digital Discovery using the SDK. I can easily set a constant voltage level for a push-pull configuration using the below code, but this does not work when the OutType is set to tristate.

dwf.FDwfDigitalOutTypeSet(hdwf, c_int(1), c_int(0))
dwf.FDwfDigitalOutCounterInitSet(hdwf, c_int(1), c_int(0), c_int(0))
dwf.FDwfDigitalOutCounterSet(hdwf, c_int(1), c_int(0), c_int(0))

 

Any suggestion on how to implement this for the tristate case?

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @akeener

I'm not sure I understand what you want to achieve.

1. The ThreeState output is supported with custom and random DwfDigitalOutType.
2. The high impedance output is almost floating, its level can fluctuate due to radiation...
The not enabled, disabled lines are in high impedance.
3. You may want to use the push/pull available for each DIO. Like pullup on DIO-25 and pulldown on DIO-24:
FDwfAnalogIOChannelNodeSet(hdwf, 0, 2, (1<<1)|(1<<0)) # DIOPE
FDwfAnalogIOChannelNodeSet(hdwf, 0, 3, (1<<1)) # DIOPP 

image.png.1b9a410b90fc0abd30e28cb386f968ac.png

image.png.adbb9316a221016ad24b9a944e2bcd4b.png

Link to post
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