What are the voltages on a ATmega32u4 (eg Arduino Leonardo) such that a HIGH or LOW is read?

I want to ensure that I'm reading the chip reference manual correctly, where Table 29-1 says:

VIL: Input Low Voltage, Except XTAL1 and Reset pin

  • Min: -0.5
  • Max: 0.2VCC-0.1V (LVTTL)

VIH: Input High Voltage, Except XTAL1 and RESET pins

  • Min: 0.2VCC+0.9V (LVTTL)
  • Max: VCC + 0.5V

My questions:

  1. What is LVTTL?
  2. How do I interpret the VIL Max and VIH Min?
  3. Is the input undefined between those two values?

1 Answer 1

  1. LVTTL is Low Voltage Transistor-Transistor Logic. In general, the term "TTL" is used for a digital signal. The "Low Voltage" part is special, the ATmega32U4 switches from low to high (and vice versa) at low voltages.
  2. Just as it is written. For example, when the ATmega32U4 runs at 5V, then:
    VILmax = 0.2 * 5 - 0.1 = 0.9 V.
    VIHmin = 0.2 * 5 + 0.9 = 1.9 V.
  3. Between those values the input signal is seen as low or high, but the exact voltage when it switches from low to high may vary.
    When the microcontroller is running at 5.0 V and is used within the specifications of the datasheet, then a voltage below 0.9 V is always seen as low and a voltage above 1.9 V is always seen as high (guaranteed).
    Those voltages is what a electronics designer must consider.

In the datasheet of the ATmega32U4 at page 403 is paragraph 30.7 "Pin Threshold and Hysteresis" with figure 30-22 and 30-23.
The figures show that at 25°C and 5V, the input switches from low to high typical at 1.55 V and it switched from high to low at maybe a slightly lower voltage.
The hysteresis is almost none and the voltage depends on VCC and the temperature.

pin input threshold voltage

(Thanks to Edgar Bonet for the correction/addition)

  • Re “it switches from low to high at an average of 1.4 V”: the average threshold voltages are not specified. The datasheet, however, provides graphs with the typical thresholds as a function of temperature and Vcc. Both VIH and VIL are typically between 1.5 and 1.6 V at 25 °C and Vcc = 5 V. Commented Feb 10, 2019 at 11:47
  • @EdgarBonet, thanks! I found the graphs and I will add it to my answer.
    – Jot
    Commented Feb 10, 2019 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.