[clug] HWR question

Alex Satrapa grail at goldweb.com.au
Sun Mar 1 15:33:06 MST 2015

On 1 Mar 2015, at 20:03, David Austin <david at d-austin.net> wrote:
> On 1 March 2015 at 19:57, Eyal Lebedinsky <eyal at eyal.emu.id.au> wrote:
>> I understand this. Yet, the mcu says it is not 5v tolerant, and the ds1307
>> will drive 5v to the SDA. I wonder what the risk is. Should I blow a full
>> $3 on testing this?

> Open-drain/pull-down only means that the device pulls the wire down only.
> Neither the I2C device or the MCU will actively drive *any* voltage onto
> the I2C wires.  The DS1307 will not (can not) "drive 5v to the SDA".
> The pullup resistors supply the positive voltage to SDA/SCL.

The two breakout boards I have, have pull-up resistors on them. I guess it’s trivial to add two resistors to a SMD board, the only decision left to make is whether to have the jumpers connected or disconnected by default.

The Freetronics RTC DS3232 break-outboard has bare solder-jumper pads for pull-up resistors on the battery side of the board. The current Sparkfun DS1307-based module has pull-up resistors connected to 5V by default, but they are easily disabled by removing the solder-jumpers located between the crystal and the mounting hole on the component side of the board). The older version of this board has a jumper between the chip and mounting hole.

Also note that Arduino typically has pull-up resistors enabled on the I2C bus. You can disable this by simply setting the appropriate flags after initialising with Wire.begin()[1]

Hope this helps!

[1] http://www.varesano.net/blog/fabio/how-disable-internal-arduino-atmega-pullups-sda-and-scl-i2c-bus

PS: my preference in RTC is for the DS3232 (on I2C) or the DS3234 (on SPI) since they have programmable alarms, which makes them more useful than the DS1307 which is only a clock.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.samba.org/pipermail/linux/attachments/20150302/565033d9/attachment.pgp>

More information about the linux mailing list