avr - How to disable input pullup on Arduino (Atmega1284p). Regular methods don't seem to work -
using "mighty mini" board uses atmega1284p processor, arduino ide 2:1.0.5 on raspbian, mighty mini "board" files installed.
i having erratic behavior on inputs, checked 'scope , seems although have not enabled internal pullup, have +3.3v appearing on input pin. need pin float.
i ran simple test make sure wasn't coding issue:
void setup() { pinmode(8, input); } void loop() { }
according docs, should put pin in high impedance state. scope shows ~3.2 volts on pin when connect 1k resistor ground. pin being driven.
i decided try accessing registers directly, eg:
void setup() { ddra = 0; ddrb = 0; ddrc = 0; ddrd = 0; porta = 0; portb = 0; portc = 0; portd = 0; } void loop() { }
this didn't work either.. still +3.3v on pin. i've tried different pins.
i thought possibly board definition mighty mini have gotten register defines wrong.. it's worked in every other way.. actual application uses spi, i2c, serial, tone.. lot of hardware i/o.. , other problem works perfectly.. hesitate blame libraries when else seems run correctly.
thanks!
it seems have wiring problem somewhere, or doing measurements wrong. internal pullups in atmega 10k, if connected pin gnd through 1k resistor, got voltage divider, output 0.3v.
my advice: double check connections. test pin output using blinky example code.
Comments
Post a Comment