Electronic – Atmega8 input impedance

atmegacmos

What is the Atmega8 input impedance. I want to add a push button to an Atmega8 and my configuration would look something like this:

A +5V source, resistor, push button not pressed goes to Atmega8, pushed goes to ground.

From my understanding Atmega8 is a CMOS and therefor the input impedance would be very large, most likely in the 100MOhm. For a logical high the Amtega8 need 0.6Vcc, my Vcc is 5V, therefore a high will be considered for anything above 3V. Assuming that my assumption of very high input impedance is right, the resistor can be:

3V = 5*100M/(100M+R) ==>R = (500-300)/3 = 66.66MOhm.

Would that be the correct theoretical highest resistor value that I can use?

**The actual resistor used will be a 47kOhm but I really want to know how to find the maximum theoretical value.

Best Answer

Look in the datasheet and find the pin leakage current. CMOS digital inputs are usually specified as having a maximum leakage current as apposed to a minimum resistance. Now look at the minimum guaranteed logic high input voltage at your operating conditions. The supply voltage minus the minimum high voltage tells you the maximum voltage the pullup can drop and the input to still be interpreted as high. That drop voltage divided by the total leakage current is the maximum theoretical allowed pullup resistor.

Note that I said "total" leakage current. This is not only the pin input leakage but leakage from all other sources, like other pins of other devices connected to that node, whatever you think the leakage is accross the PC board at the worst case level of dirt and humidity, etc. In practise you can't know all these things. Do all the calculations you want, but I'd want a pullup at least a order of magnitude lower resistance than the maximum theoretical you calculate. When current consumption matters, I usually figure 100 kΩ is the maximum safe and reliable value. When it doesn't, I'll use 10 kΩ unless there is a good reason not to.