[TriEmbed] Basic I2C Question

Charles McClelland chip at mcclellands.org
Thu Sep 11 10:28:01 CDT 2014


Adam, 

Thank you for the response your and Jon’s note raises another question:

Is there an advantage to putting resistors on the circuit board versus simply using the Arduino’s internal pull-ups?  Power savings or - as Jon mentioned - the ability to tune for performance?

On the RTC - here is my reader’s digest version of the bewildering variety that Maxim offers: 
	- DS1337 - Great but no battery backup to keep clock set when I change the batteries
	- DS1338 - Adds battery backup but drops alarms
	- DS1339 - Battery backup, alarms and an alarm pin - and it is cheaper than the DS1338.  

I am hoping the library / commands for all three will be similar and similar.  Thoughts?

thanks,

Chip


On Sep 11, 2014, at 8:50 AM, Adam Haile <email at adamhaile.net> wrote:

> There's no need for them at all.
> I2C only needs pull up resistors on the bus as a whole, NOT for each device.
> Also, the Wire library in Arduino automatically enables the internal pullup resistors when you call begin(). You can also do the same by setting a pin as an input and then writing HIGH to it, but Wire takes care of it for you.
> 
> Sure, having extra won't help but you certainly don't need more than one set.
> 
> For the RTC, check out the DS1337, it is the DS1307's big brother and includes alarms. However, there are no alarm pins, you just have to poll for if the alarm is "going off". But there is lots of code out there already for the DS1337. If you need alarm interrupts, I'm not sure what to use... nothing I'm familiar with that has separate alarm pins.
> 
> On Thu, Sep 11, 2014 at 8:28 AM, Charles McClelland <chip at mcclellands.org> wrote:
> First, I wanted to thank Paul for the excellent presentation on interrupts.  I now have a Watch Dog Timer routine which is saving me from having to put a clock on one project.
> 
> On my other project though, I still need a clock.  And since I am already using an I2C bus, I thought I could simply add one to that bus.  That way I will have two I2C sensors connected to an Arduino (ATMEGA328).  My question is how to best implement the pull-up the resistors.  Should I put resistors on each (perhaps 10k since they will effectively be in parallel) or should I put one set of pull up resistors on the main board for both?  It seems like the latter is the better approach but I did not know if there was some reason to do one over the other.
> 
> On a related note, I need a 3.3V I2C Real Time Clock with Alarms - I am looking at the DS1339 and hoping I can use some of the DS1307 library since they are both from Maxim.  Any other suggestions?
> 
> Thanks,
> 
> Chip
> 
> 
> 
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20140911/dc24adf5/attachment.htm>


More information about the TriEmbed mailing list