[Solved] Multi-purpose pins on microcontrollers

Hi folks,

atm i’m working on a symbol for the Z32F0642 Microcontroller by Zilog.
And it has multi-purpose pins. (Have a look on page 12 here: http://www.zilog.com/docs/PS0392.pdf)
When i edit the pins, what kind of electrical type do i have to use? Input, Output or Bidirectional?

Best Regards,

I would use bidirectional. The ERC is of limited use with these type of pins.


Or possibly “Passive” (even though they aren’t really passive)?

A typical microcontroller pin has so many options and so much flexibility that I typically create a custom schematic symbol for each application, reflecting the way I’m using the uC in that particular application. E.g., if I’m using a pin as an A/D input then I label it as “AD2” (or whatever the datasheet calls it). As far as the circuit design is concerned, I don’t care that the pin may also be configured as a reference voltage output, or a PWM driver, or a USART input, or any of a half dozen other functions.



Well, I guess the worst thing that could happen is that the circuit designer connects a pin directly to vcc or ground (because they are not used, or something), assuming that it will never be an output, then the programmer accidentally sets it to an output, maybe burning out a pin.

There is nothing to stop that, but setting the pin type to bidirectional lets the circuit guy/gal know it could be input or output and design accordingly. it also let’s the programmer know it should be ok to set as input or output without breaking anything, if the circuiteer did her bit.

I think in any case, the ERC can’t detect errors that depend on runtime config, but if everyone does their job properly nothing will go wrong… :pray: to engineering gods


If I have logic driving one of these multi-function pins, I often put a 470R resistor in series to prevent nasty programming accidents

1 Like

Well, i decided to go with “Bidirectional”.
Thanks for your replies!

I have used values in the 100 - 470 range, with the higher values used with 5V supplies and lower values for lower supply voltages. When the pins are inputs, the series resistance creates a single lopass pole with the input capacitance, theoretically improving noise immunity.

Then there is the practice of placing pullup or pulldown resistors on uC pins that will become logic outputs. The justification is that the pins will be inputs during the first few dozen machine cycles, before being initialized as outputs, and an unterminated input is an invitation to trouble.

As shown here, engineers often debate the merits of standard design practices such as these, during Design Reviews.