# Myhdl: how to set pin to 'high impedance'

**URL:** <https://discourse.myhdl.org/t/myhdl-how-to-set-pin-to-high-impedance/463>\
**Category:** FAQ\
**Created:** [May 17, 2021, 2:19pm UTC](https://discourse.myhdl.org/t/myhdl-how-to-set-pin-to-high-impedance/463 "2021-05-17T14:19:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stekar](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@stekar](https://discourse.myhdl.org/u/stekar)\
**Post date:** [May 17, 2021, 2:19pm UTC](https://discourse.myhdl.org/t/myhdl-how-to-set-pin-to-high-impedance/463/1 "2021-05-17T14:19:15Z")

</div>

I have a controller in a tinyfpga and during power up my pwm output pins are ‘high impedance’.

Now when a Fault condition occurs i want to set these pins back to ‘high impedance’ which can then be pulled up or down depending on the hardware used (straight or inverted drivers).

How can this be done?

---

<div class="post-metadata">

**Author:** ![josyb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/josyb/32/5_2.png) [@josyb](https://discourse.myhdl.org/u/josyb)\
**Post date:** [May 17, 2021, 4:50pm UTC](https://discourse.myhdl.org/t/myhdl-how-to-set-pin-to-high-impedance/463/2 "2021-05-17T16:50:47Z")

</div>

> <https://gist.github.com/josyb/c816d585e12ae397627b>

> <https://gist.github.com/cfelton/6119313>
