# Is that single triangle a tri-state logic symbol or an AND gate?

Currently I'm a bit confused about that single triangle from that schematics used by an AVR-Microcontroller. Currently I've figured out, that the:

• DDRx
is on the AVR an configuration-Register (What is IN, what is OUT)
• PORTx
is on the AVR a register for writing or setting the Pull-Up-Register.
• PINx
is on the AVR a register for read-only

So the next step for me is to understand that triangle. I've searched for that and found similar symbols. One was an AND-Gate and the otherone a tri-state-logic (buffer). Has somebody an idea what kind of job the triangle implements?

A triangle is basically an amplifier. In digital circuits it signifies a buffer (or inverter, if there's a small blob on its input or output).

In this case it's controlled (turned on or off) by DDRx.N. You would turn it OFF if you wanted to use the pin as an input. As the other answers say, this structure is called a tri-state buffer, where the three output states are '1', '0' and 'Z' (undriven, or off).

A triangle is just a (non-inverting) buffer. If it has a connection to the 'side' of the triangle, it is tri-state and the 'side' connection is the enable input. There may be a circle on the output or on the enable input to indicate inversion.

For example (from here):

The above represents four tri-state non-inverting buffers with common (inverting) enable inputs. When the EN4 input is high the outputs are high impedance. When EN4 is low the outputs will be driven to follow the inputs.

I would consider the triangle to be a tri-state buffer. When enabled by the Data Direction Register, it conneccts the PORT register to the I/O pin, so the pin will act as an output. When the buffer is disabled, it allows the PIN register to read the level of the I/O pin.

It is a tri-state buffer. If DDRx.n is set, PORTx.N register value is transferred to the output pin and the PINx.n register, thus making this port output. If it is unset, the value from the physical pin is transferred to the PINx.n register only, thus making the pin an input.