12V on digital input pins?

nickn4:
I think your awnser lies in the IOREF pin on your board.

the digital pins knows that 5v is equal to HIGH. although, you can change this value through the IOREF pin if im correct.
i never used it myself before, here's some info i found on arduino page of your board:

"IOREF. This pin on the Arduino board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V"

whenever u connect 12V to IOREF, the reference to HIGH will be 12V.
i hope this helped, i sugest you look further into it before testing since im not 100% sure.

the reference voltage level should be changeable,
also for analog reference, that would be the AREF pin, maybe this page clears up a little about these two pins:
http://arduino.cc/en/Main/ArduinoBoardMega2560

nick

I wouldn't do that if I were you...

From the ATMega2560 data sheet:

Voltage on any Pin except RESET
with respect to Ground ................................-0.5V to VCC+0.5V

Putting 12V into IOREF will make the Magic Smokeā„¢ escape - unless there is some magic being done on the board that separates the pin drivers from the chip, and it would have to be so small that you can't see it.

The IOREF pin is there purely for switching between 5V and 3.3V on the IO pins.

DO NOT CONNECT 12V DIRECT TO ANY PIN EVER!!!