Go Down

Topic: Internal pullups on Leonardo, pins D2 and D3 (Read 3805 times) previous topic - next topic

xyzzy

I've got a Leonardo clone (Olimexino-32U4) and trying to use a button with an internal pullup on D2 - just the IDE/Examples/Digital/DigitalInputPullup. The example works as expected with other digital pins, but with D2 and D3 the line always reads LOW (thus it behaves as if the button was pressed all the time). Uno R2 works fine.
I couldn't find anything else connected to these two lines on the schematic (both Leonardo and Olimexino-32U4).

So my questions are:
- is this specific to the Olimexino or does the same happen with a Leonardo board?
- is the trouble coming from I2C? I mean when using I2C there need to be pullup resistors (but they might be external, although I think most I2C accessories to Arduino assume internal pullups).
- on the other hand, when I use standard firmata to check, it seems to work OK (putting the pin HIGH and then changing to INPUT on D2 or D3; doing the same in the DigitalInputPullup sketch doesn't help). What gives?

Thanks.

Grumpy_Mike

Yes if you look at the schematic of the Olimexino you will see if has pull up resistors on these two lines. By the resistors R12 & R13 is a round pad with a small link, you can cut this link to remove the pull up resistors.
There are no such resistors on the Leonardo.

Quote
although I think most I2C accessories to Arduino assume internal pullups

An arduino needs external pull up resistors as the internal ones are too high a value.

Quote
when I use standard firmata to check

These resistors will not affect what you see when the pins are outputs.

xyzzy


Yes if you look at the schematic of the Olimexino you will see if has pull up resistors on these two lines. By the resistors R12 & R13 is a round pad with a small link, you can cut this link to remove the pull up resistors.
There are no such resistors on the Leonardo.

AAh, thanks, my bad. They're there, I missed them the first couple of times. Well, with those resistors there, I guess I can use the pins for buttons using those pullups, not using the internal ones.

Quote

Quote
although I think most I2C accessories to Arduino assume internal pullups

An arduino needs external pull up resistors as the internal ones are too high a value.

Thanks, I didn't know that.

Go Up