Trigger voltage for digital I/O

Hi,
hope I am in the right part of that forum. I read the ATMEGA328 datasheet in order to find the voltage the Arduino digital I/O pin triggers from high to low but did not succeed. Can anyone help me with that?

First page of the section titled "Electrical Characteristics."

First 2 rows of the table:
Low is 0.3 * Vcc
High is 0.6 * Vcc

As the ATMEGA is a 5V VCC this is:

LOW=<0,3VCC=0,35V=1,5V
HIGH=>0,5VCC=0,55V=2,5V

right?

Look at:

29.1.5 Pin Threshold and Hysteresis
Figure 29-11. I/O Pin Input Threshold Voltage vs. VCC (VIH, I/O Pin read as ‘1’).

and

Figure 29-12. I/O Pin Input Threshold Voltage vs. VCC (VIL, I/O Pin read as ‘0’)..

About 2.7V and 2.2V

soulid:
As the ATMEGA is a 5V VCC this is:

LOW=<0,3VCC=0,35V=1,5V
HIGH=>0,5VCC=0,55V=2,5V

right?

Those are the logic levels if the atmega has a Vcc of 5 volts, but that 5V is nominal and has some variance, so therefore the logic levels will have some variance as well. Further, if you happen to make those assumptions on a mega that has a Vcc of 3.3V the levels will be different! That is why logic level converters are needed when interfacing 3.3v logic circuits with 5V logic circuits.

wanderson:
Those are the logic levels if the atmega has a Vcc of 5 volts, but that 5V is nominal and has some variance, so therefore the logic levels will have some variance as well. Further, if you happen to make those assumptions on a mega that has a Vcc of 3.3V the levels will be different! That is why logic level converters are needed when interfacing 3.3v logic circuits with 5V logic circuits.

Would it be possible, in the reverse situation, to use analogRead() to determine if a 3v3 sensor is holding a line to its logical HIGH or LOW rather than adding a logic level converter to step it up for a 5V logic Uno?

Cheers ! Geoff

strykeroz:

wanderson:
Those are the logic levels if the atmega has a Vcc of 5 volts, but that 5V is nominal and has some variance, so therefore the logic levels will have some variance as well. Further, if you happen to make those assumptions on a mega that has a Vcc of 3.3V the levels will be different! That is why logic level converters are needed when interfacing 3.3v logic circuits with 5V logic circuits.

Would it be possible, in the reverse situation, to use analogRead() to determine if a 3v3 sensor is holding a line to its logical HIGH or LOW rather than adding a logic level converter to step it up for a 5V logic Uno?

Cheers ! Geoff

While that is certainly possible, it isn't very practical. Reading analog voltages to determine logic levels are little fuzzy since they are dependent upon both VCC values, and potentially the Aref value as well. Further, analog reads are several orders of magnitude slower than digital reads, so that is a potential problem. Logic level converters are cheap, readily available, and can be assembled from standard components (resisters) in a pinch...

strykeroz:

wanderson:
Those are the logic levels if the atmega has a Vcc of 5 volts, but that 5V is nominal and has some variance, so therefore the logic levels will have some variance as well. Further, if you happen to make those assumptions on a mega that has a Vcc of 3.3V the levels will be different! That is why logic level converters are needed when interfacing 3.3v logic circuits with 5V logic circuits.

Would it be possible, in the reverse situation, to use analogRead() to determine if a 3v3 sensor is holding a line to its logical HIGH or LOW rather than adding a logic level converter to step it up for a 5V logic Uno?

Cheers ! Geoff

3.3V will trigger a 5V atmega. The problem is that the write will be too high for the sensor.

The other issue regarding AnalogueRead() is that frequently I2C clock and data lines are bi-directional. There is an app note, AN10441 from NXP that describes a bidirectional 3V3 - 5V interface using a couple of 2N7000's and some pull-ups. I modeled it in Multisim 11 and it worked perfectly, I then built it and it works very well with my BMP085 sensor and my Uno. At the bottom of the note is a statement that says that it can be applied to "other" bus voltages... The example is a 2V bus to a 10V bus, So 2.5V to 5v or many others would work. I modeled a shifter based on a 2N3904... Needs a base pull-up and a 1N4148 but it also works very well and might work at 1.5 - .8V bus as well. This is a point where a Fet becomes a matter of careful selection due to Vgth considerations. Because the required Vbe for bi-polar transistor conduction is is only .6 - .7 volts the Bi-polar device might well be a better choice for LV applications. IMO

Doc

Doc