How to disable input pullup on Arduino (Atmega1284p). Regular methods don't seem to work
<p>Using the "Mighty Mini" board which uses the Atmega1284p processor, with Arduino IDE 2:1.0.5 on Raspbian, with Mighty Mini "board" files installed.</p>

<p>I was having some erratic behavior on inputs, so I checked it with a 'scope and it seems that although I have not enabled the internal pullup, I have +3.3v appearing on the input pin.  I need the pin to float.</p>

<p>I ran a simple test to make sure it wasn't a coding issue:</p>

<pre><code>void setup() {
    pinMode(8, INPUT);
}

void loop() {
}
</code></pre>

<p>According to the docs, this should put the pin in a high impedance state.  But a scope shows ~3.2 volts on the pin even when I connect a 1K resistor to ground.  So the pin is definitely being driven.</p>

<p>I decided to try accessing the registers directly, eg:</p>

<pre><code>void setup() {
    DDRA = 0;
    DDRB = 0;
    DDRC = 0;
    DDRD = 0;

    PORTA = 0;
    PORTB = 0;
    PORTC = 0;
    PORTD = 0;
}

void loop() {
}
</code></pre>

<p>This didn't work either.. still +3.3v on the pin.
I've also tried different pins.</p>

<p>I thought that possibly the board definition for the Mighty Mini could have gotten the register defines wrong.. but it's worked perfectly in every other way.. my actual application uses SPI, I2C, Serial, Tone.. a lot of hardware I/O.. and other than this problem it works perfectly.. so I hesitate to blame the libraries when everything else seems to run correctly.</p>

<p>Thanks!</p>