5V signal connected to a 3,3V Arduino

Hi!

Is it ok to connect a 5V signal to a Atmega328 running at 3,3V?

The reason is that I run my Atmega328 with 3,3V because I have connected a display that is only 3,3V tolerant.
I also have connected a radio module that work much better with 5V than 3,3V.

So: Atmega328@3,3V, Display@3,3V and a radio module@5V.

Everything seem to work but is it ok in the long term?

olof_n:
Is it ok to connect a 5V signal to a Atmega328 running at 3,3V?

Only under the right conditions.

Atmega328s have protection diodes to divert excess voltage from the pins. If the current is very small (less than 1mA) then they can cope with it.

The diodes are very small though, too many amps will destroy them. If you're unsure, put in a resistor (eg. 2k Ohms).

Ok, thanks.

I will add a resistor.

The people at Atmel connect chips directly to AC mains with just a resistor: Smart | Connected | Secure | Microchip Technology

Interesting document.
I downloaded the datasheet of the Atmega328 and cannot find a max voltage for the clamping diodes.

230V@1Mohm is 0.23mA.

Is a resistor reliable over time or could the resistance change after a couple of years?