10 years, 9 months ago.

Tri-state DigitalOut (0,1,Hight impedance) ?

Hello

To configure dynamically a componant (DRV8834 Stepper driver) I need a pin to "output" hight level, low level and hight impedence level (as if it was left opened).

A pin is configured as DigitalOut so the I can configure it at Hight or Low level but not at Z level.

Is there a way to do this ?

2 Answers

10 years, 9 months ago.

You can use DigitalInOut to make tri-state pins: http://mbed.org/handbook/DigitalInOut. You just need to manually switch it between input and output.

Accepted Answer

But if you want to change the mode of the slave SPI pins .. this method will not work. You cannot change the type .. It seems that there is no way to tri-state the SPI-Slave.

posted by M J. 24 Jul 2018
10 years, 9 months ago.

Ok, I'll try that.

Thanks