Post History
In general, when wanting to connect a digital output to a digital input, compare the guaranteed output levels of the output to the guaranteed threshold levels of the input. For example, let's say ...
#2: Post edited
- In general, when wanting to connect a digital output to a digital input, compare the guaranteed output levels of the output to the guaranteed threshold levels of the input.
- For example, let's say the output is guaranteed to be below 500 mV when low and above 2.5 V when high.
Now check the digital input specs. Let's say that's a 3.3 V part with guaranteed input thresholds at 20% and 80% of the power voltage. That would mean the input needs to be below (3.3 V)⋅20% = 660 mV to be interpreted as low, and (3.3 V)⋅80% = 2.64 V to be interpreted as high. In this example, the low level works directly, but the high level is a little too low.- Solutions might be a pullup resistor depending on details of the digital output, a different input of the micro that has different thresholds, or a level converter or transistor between the two devices.
- You have to read the datasheet of each device carefully.
- In general, when wanting to connect a digital output to a digital input, compare the guaranteed output levels of the output to the guaranteed threshold levels of the input.
- For example, let's say the output is guaranteed to be below 500 mV when low and above 2.5 V when high.
- Now check the digital input specs. Let's say that's a 3.3 V part with guaranteed input thresholds at 20% and 80% of the power voltage. That would mean the input needs to be below (3.3 V)⋅20% = 660 mV to be interpreted as low, and above (3.3 V)⋅80% = 2.64 V to be interpreted as high. In this example, the low level works directly, but the high output level is a little too low.
- Solutions might be a pullup resistor depending on details of the digital output, a different input of the micro that has different thresholds, or a level converter or transistor between the two devices.
- You have to read the datasheet of each device carefully.
#1: Initial revision
In general, when wanting to connect a digital output to a digital input, compare the guaranteed output levels of the output to the guaranteed threshold levels of the input. For example, let's say the output is guaranteed to be below 500 mV when low and above 2.5 V when high. Now check the digital input specs. Let's say that's a 3.3 V part with guaranteed input thresholds at 20% and 80% of the power voltage. That would mean the input needs to be below (3.3 V)⋅20% = 660 mV to be interpreted as low, and (3.3 V)⋅80% = 2.64 V to be interpreted as high. In this example, the low level works directly, but the high level is a little too low. Solutions might be a pullup resistor depending on details of the digital output, a different input of the micro that has different thresholds, or a level converter or transistor between the two devices. You have to read the datasheet of each device carefully.
