Quote Originally Posted by PaulMaker View Post
Greetings,

thank you Jerson for your reply.

Regarding "design your project with active low outputs to account for the High-Z input state at power on", what do you mean exactly?
If, for example, I only have LEDs on these I/Os, what can I do?




Many a times, I have used an I/O pin to drive a relay through a transistor. So, assuming I need an active high output to turn on the relay, I have observed (across microcontroller families) that the relay flicks on for the fraction of a second till the program code takes control and the pin get set to the off - state of the relay (0). So, the ideal way to resolve such a situation is to ensure that the relay turns on only when the I/O pin is made to output a LOW.

In case of driving an LED from an IO pin, my thinking is biased with the TTL logic output specificiation where the sinking current limit is larger than the sourcing current limit. So, I usually tend to use LEDS with an active low output configuration. The IO port has to be low for the LED to turn on. This spec thing is no longer true with the current generation of microcontrollers except the 8051 family dies from old.

So, as a best practice, I tend to use active low outputs for any device that needs to be turned on.