0
\$\begingroup\$

This question already has an answer here:

I'm programming my ATmega16A through LPT port using uisp -dprog=bsd. Although ATmega16A supports \$V_{CC}=2.7\,\mathrm V\,..\,5.5\,\mathrm V\$, to make logical levels compatible with LPT port, I have to supply 5V to the ATmega.

All works fine, but now I need to connect MAX44009 lux meter (working via I²C) to the controller. MAX44009 supports \$V_{CC}=1.7\,\mathrm V\,..\,3.6\,\mathrm V\$, which appears too low to safely input 5V to it.

For transmitting data I could use e.g. a voltage divider to supply a fraction of 5V to MAX44009, and pull-up the SDA and SCL lines to this power source. Since SDA & SCL are open drain, this would work fine as far as we're only driving MAX44009's input. But when we want to read data back, we have a problem: 3.6V doesn't seem to be good enough to be seen as high level input for 5V-powered ATmega.

So, how can I actually safely connect ATmega16A to MAX44009, without losing the ability to program ATmega via LPT port? Some web pages like this one simply suggest powering MAX44009 with 5V without explaining why. Others like this one say that working voltage is 3 ~ 5 V, which also looks strange.

\$\endgroup\$

marked as duplicate by Ruslan, Community Jan 24 at 20:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
\$\begingroup\$

This might just be the thing you are looking for: https://www.sparkfun.com/products/12009

Or maybe this might work as well: http://www.hobbytronics.co.uk/logic-level-i2c

The two modules that you have mentioned are both different, the pink module seems to sustain 5v. But to be on the safe side these logic level converters are better than having nothing.

\$\endgroup\$

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