Jump to content
  • 0

Digital Discovery - Constant Tristate Digital Output with SDK


akeener

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 comment
Share on other sites

1 answer to this question

Recommended Posts

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 comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...