Voltage range for logic level

Just a quick question: what voltage rnge can I apply to digital input for HIGH on a 5V or a 3.3V Arduino? I would like to use a RTC using 5V and a OLED display using 3.3V
If the RTC takes 3.3V as HIGH and the microcontroller@3.3V takes 5V as HIGH without problems, I needn't use a logic level shifter ...

Almost all CMOS logic chips require the input voltage to be > -0.5V and < Vdd+0.5V - Certainly the microcontrollers used in Arduinos are no exception.

If the RTC is reliable with 3V3 signals you can connect it using I2C bus with pull-up resistors to 3V3 (not 5V) - the I2C bus is open-drain so only the pull-ups define the high voltage level. The DS1307 will work with signals above 2.2V, for instance.

The microcontroller in the Arduino will work with 3V3 input signals when powered at 5V (the threshold is 3.0V)

This has been linked before but it is well worth adding to your bookmarks if you haven't yet:

ElCaron:
Just a quick question: what voltage rnge can I apply to digital input for HIGH on a 5V or a 3.3V Arduino? I would like to use a RTC using 5V and a OLED display using 3.3V

What OLED is it? A lot of the 'modules' take 5V, no problem.

This one:
http://www.ebay.de/itm/Error?errid=5&item=251110441587pt=Bauteile&var=550175401939&hash=item3a797823c2

I removed two resistors in the back to make it work via SPI. It does work with 5V when testing, but I am not sure it won't reduce the lifetime.

There's not a lot of information there ... but I don't see a regulator on the board and at that price I wouldn't expect any extras. It's just a bare SSD1306+display.

Best to stick to 3.3V.

The Arduino has a 3.3V output for power and you can use a simple resistor divider to bring 5V down to 3.3V for the SPI clock/data lines. The arduino should be happy with 3.3V on its input pins (it will see "HIGH" at that level).

PS: These are a lot nicer/easier to use and have a regulator plus a secondary controller chip with some high-level functions for things like drawing text (no need to mess around with font data - the chip already has it): http://www.ebay.com/itm/170842973484

Thanks ... ok, I'll just add a voltage devider.

I know there are other displays, but those come at nearly two times the cost. For abstraction, the Adafruit Library works very well for my purpose. Don't see any problem there.

ElCaron:
For abstraction, the Adafruit Library works very well for my purpose. Don't see any problem there.

Fair enough.

It's a bit resource hungry though - more than 1K RAM, a load of flash, a lot of CPU/SPI bus time ... not suitable for everybody.

ElCaron:
those come at nearly two times the cost

Pedant: One's in dollars, the other's in Euros. It's only 40% more (about four Euros).