1
\$\begingroup\$

I would like to connect four output pins of a certain IC to four input pins of an AVR microcontroller (Atmega328).

I'm running the IC at VCC that varies between 3.50V and 4.00V. It outputs signals (for status indication) with an Output High spec of V_HIGH = VCC - 0.30, per the datasheet. Thus, in my case, minimum V_HIGH for an output signal from this IC will vary between 3.20V and 3.70V.

But I'm running my microcontroller at VCC = 3.30V, and I want it to read the inputs from the IC above (and not damage the microcontroller obviously).

What is a robust, hopefully simple, way to address this problem?

I am thinking perhaps a diode, to create a voltage drop, in series with each of the signals.

\$\endgroup\$
3
\$\begingroup\$

Well, the old fashioned way is using a resistor and a Zener diode of appropriate voltage (mind the polarity!), but if you really wamt a professional solution, I think this would cut it:

5V <-> 3.3V bidirectional level converter

EDIT: you wrote:

Thus, in my case, V_HIGH for an output from this IC will be 3.70V.

Which is not correct. I think that it is meant that it is at least 3.7V, but it might as well as be as high as VCC, which is 4V. (I'm not sure if this sentence is correct English though)

My experiences (ahem, mistakes, to be totally honest) show that these devices tolerate decent amounts of abuse, but I wouldn't intendedly run it under these conditions without level matching.

EDIT2: it's late, and I forgot the most obvious solution: a simple voltage divider on the pins. Especially as they are output only - this should be OK. Be careful with the values though, use resistors so that the lowest HIGH level on the output side should result in a voltage higher than the lowest HIGH level specified on the sensing side, but the highest levels shouldn't result in voltages higher than the specification on the receiver side.

\$\endgroup\$
  • \$\begingroup\$ Of the two, I'd like to try the level converter approach since it would allow just one part for all 4 signals (space is limited). But is a level shifter like that designed just for 5V levels or does it also work for an input side that might vary between 3.3V and 4.0V ? B/c the VCC on my IC can vary quite a bit, something I forgot to mention. \$\endgroup\$ – boardbite Oct 10 '12 at 6:21
  • \$\begingroup\$ If the voltage might vary, then the simple divider is not a viable option. The Zener diode + resistor approach would still be usable, and I definitely think that the BSS138 would still be usable, but as I hadn't tried it under these conditions, nor can I check the datasheet now, I'd vote a strong 'should work' on that option. \$\endgroup\$ – ppeterka Oct 10 '12 at 7:07
1
\$\begingroup\$

Consider optocouplers. They may also help reduce any signal noise.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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