Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

X series DDK digital output

I have been working on the X series DDK digital output example dioex1.cpp. It seems working but not exactly what I expected. I have set it up for digital output and sent out the value on specific bit (pin) in dioex1.cpp and I did see the pin turned ON. However, it didn't hold ON all the time instead of toggling the bit On/Off all the time.

 

Any ideas why ?  Thanks.

 

Larry

0 Kudos
Message 1 of 3
(6,510 Views)

Hello,

 

Exactly what behavior are you seeing?

 

The expected behavior of the example is that it resets the dio subsystem, briefly outputs the expected state, and then resets the dio subsystem back to the default state as the application exits.  If you want the outputs to remain set after running the example, you can set the tristateOnExit to kFalse instead of kTrue.  However, when the example is run again, it will briefly reset the dio subsystem before outputting the next state that you want.

 

I would recommend creating a loop in the example so that it doesn't exit until it receives input to exit (and resetting the dio subsystem of the board).  This would make the output stay on the port as long as you need it there.

 

I hope this helps,

Steven T.

0 Kudos
Message 2 of 3
(6,495 Views)

Hi Steven,

 

Thanks for the reply. It helps a lot. I got better understanding the example and got it working as I wanted.

 

Thanks again.

Larry 

0 Kudos
Message 3 of 3
(6,489 Views)