Reply by Stuart_Rubin November 6, 20112011-11-06
I have seen some part data sheets which describe "high speed mode" which is "compatible" with I2C, and they presecibe smaller resistors (like 1.5K or something). I believe they call is "high speed compatible" because it technically violates some old legacy Philips spec. Anyway, dig into the data sheets and they may give you some suggestions about R sizes based on your Vcc, data speed, etc.

If you're not battery powered, the impact on power will be negligible, but I'm not going to make a blanket statement! Caveat emptor!

Stuart

--- In m..., "merapcb" wrote:
> So you are suggesting that if my application does not care about power (i.e. not battery operated etc) then I lower it? To how much? 2K? 1K?
> --- In m..., "Stuart_Rubin" wrote:
> >
> > In general, lower pull-up resistor values will get you less noise, but higher power consumption. 4K7 doesn't sound too low, though, but it's something to think about.
> >
> > Stuart
>

Beginning Microcontrollers with the MSP430

Reply by Joerg November 4, 20112011-11-04
merapcb wrote:
>
> --- In m..., Joerg wrote:
>> Looks like the battery connection to the RTC isn't locally
>> bypassed. Not sure if required but if the battery hangs off of
>> wires I'd consider it.
>
> Locally bypassed? Meaning? The battery is on a holder on the PCB.
>

Like Emmett wrote, a 0.1uF ceramic right at the battery pins. But you
could ask Maxim if that's needed. My experience is this: Anything that
could form a loop and goes to an IC can damage that IC during a
thunderstorm. And I think you guys in India see a lot of those :-)

>
>> Looks like the problem is not an EEPROM like you said in the first
>> post but with thre realtime clock?
>> Why do you say that? Actually, it is true that I don't know if it is
> with RTC or EEPROM (or both). I assumed EEPROM but it may be RTC. I
> was not fortunate enough to capture that data on debugger (yet).
>

Here is one more suggestion: The I2C traces (where your red arrows are
in the layout) could be moved to the left. That makes them shorter.
Also, there should be a ground trace rounted in parallel with them. That
reduces the loop area.

Besides plain old device malfunction which happens a lot with I2C there
is always a chance that some significant EMI event happens in the field
and induces a spike in such loops. Doesn't have to be a thunderstorm, it
could also be guy next door with his arc welder. Or overhead powerlines
that get switched under load once in a while.

--
Regards, Joerg

http://www.analogconsultants.com/

Reply by "Redd, Emmett R" November 4, 20112011-11-04
Locally bypassed means to have bypass capacitors near the power pins of the RTC (like you should have near all digital chips).

Emmett Redd, Ph.D., Professor mailto:E...@MissouriState.Edu
Physics, Astronomy, and Materials Science Office: 417-836-5221
Missouri State University Dept: 417-838-5131
901 S NATIONAL AVENUE FAX: 417-836-6226
SPRINGFIELD, MO 65897 USA Lab: 417-836-3770

It is clear that thought is not free if the profession of certain opinions make it impossible to earn a living. -- Bertrand Russel

> -----Original Message-----
> From: m... [mailto:m...] On Behalf
> Of merapcb
> Sent: Friday, November 04, 2011 2:04 PM
> To: m...
> Subject: [msp430] Re: I2C hanging
>
> --- In m..., Joerg wrote:
> >
> > Looks like the battery connection to the RTC isn't locally bypassed.
> > Not sure if required but if the battery hangs off of wires I'd
> consider it.
>
> Locally bypassed? Meaning? The battery is on a holder on the PCB.
> > Looks like the problem is not an EEPROM like you said in the first
> > post but with thre realtime clock?
> > Why do you say that? Actually, it is true that I don't know if it is
> with RTC or EEPROM (or both). I assumed EEPROM but it may be RTC. I was
> not fortunate enough to capture that data on debugger (yet).
>
>
Reply by merapcb November 4, 20112011-11-04
--- In m..., Joerg wrote:
>
> Looks like the battery connection to the RTC isn't locally bypassed. Not
> sure if required but if the battery hangs off of wires I'd consider it.

Locally bypassed? Meaning? The battery is on a holder on the PCB.
> Looks like the problem is not an EEPROM like you said in the first post
> but with thre realtime clock?
>

Why do you say that? Actually, it is true that I don't know if it is with RTC or EEPROM (or both). I assumed EEPROM but it may be RTC. I was not fortunate enough to capture that data on debugger (yet).

Reply by Joerg November 4, 20112011-11-04
merapcb wrote:
> Just a small update. Firstly, I have read a lot and seem to get the pictures that I2C is or can be problematic (in general) and that SPI is preferred. Well, chalk it up for next design...
>
> Anyway, while implementing a software safeguard, I also feel it may very well be noise induced (don't know why, other than the fact that it happens in the field and not in lab). My present board is a dual layer board and I am not an expert on layout (someone else does it) but I gather some precautions could be taken. For example:
> a) should the I2C traces be as short as possible?
Yes.
> b) should they be "enclosed/surrounded" by ground plane?
On a two-layer board, yes.
> c) I have seen series resistors used, is that a good idea?
>

I don't see a use in that unless you have long lines and for some
reasons (such as power consumption) you can't place low resistance pull-ups.
> I have placed two images of the current PCB here:
> http://tech.groups.yahoo.com/group/msp430/files/Uploads/I2C%20issue/
>

The ground side of C26 goes to a long trace. That isn't a good thing, it
should run straight over to pin 4 of U8. Shoot a trace on the "green
layer" straight across. It's a clear shot, no obstacles in the way.

Same goes for C27 which should be moved north a bit and then provide a
straight path to pin 7. That can even be done on the "blue layer". Fill
out the ground a bit.

Looks like the battery connection to the RTC isn't locally bypassed. Not
sure if required but if the battery hangs off of wires I'd consider it.

Looks like the problem is not an EEPROM like you said in the first post
but with thre realtime clock?

--
Regards, Joerg

http://www.analogconsultants.com/

Reply by merapcb November 4, 20112011-11-04
So you are suggesting that if my application does not care about power (i.e. not battery operated etc) then I lower it? To how much? 2K? 1K?
--- In m..., "Stuart_Rubin" wrote:
>
> In general, lower pull-up resistor values will get you less noise, but higher power consumption. 4K7 doesn't sound too low, though, but it's something to think about.
>
> Stuart
>

Reply by Stuart_Rubin November 4, 20112011-11-04
In general, lower pull-up resistor values will get you less noise, but higher power consumption. 4K7 doesn't sound too low, though, but it's something to think about.

Stuart

--- In m..., "merapcb" wrote:
> The pull-ups are 4.7K (R28, R29)
>
> I have posted the circuit also:
> http://tech.groups.yahoo.com/group/msp430/files/Uploads/I2C%20issue/
> --- In m..., Matthias Weingart wrote:
> >
> > "merapcb" :
> >
> >
> > Please post the circuit diagram. How big are the pull-ups?
> >
> > M.
>

Reply by merapcb November 4, 20112011-11-04
The pull-ups are 4.7K (R28, R29)

I have posted the circuit also:
http://tech.groups.yahoo.com/group/msp430/files/Uploads/I2C%20issue/
--- In m..., Matthias Weingart wrote:
>
> "merapcb" :
> Please post the circuit diagram. How big are the pull-ups?
>
> M.
>

Reply by Matthias Weingart November 4, 20112011-11-04
"merapcb" :

> I have placed two images of the current PCB here:
> http://tech.groups.yahoo.com/group/msp430/files/Uploads/I2C%20issue/
>

Please post the circuit diagram. How big are the pull-ups?

M.

Reply by merapcb November 4, 20112011-11-04
To add to my previous post, I have also uploaded my entire I2C driver code here...

http://f1.grp.yahoofs.com/v1/YH-zTojdeE3Kq6QYsPdrcGtx9WNKxG2NUKmiGbVjxw-SDdrnna40LAz9NASbkmRFhx9LOUCMaXIdmYe9UInwZeFgSrKs/Uploads/I2C%20issue/I2C_Driver.txt

Please note that I am using both I2C and UART on the same USART0 (but not at the same time). When tha application wants to use a peripheral (EEPROM/RTC) it calls I2C_Init() and when it is finished it calls I2C_Exit() which restores the USART to UART mode.

--- In m..., "merapcb" wrote:

>
> I have placed two images of the current PCB here:
> http://tech.groups.yahoo.com/group/msp430/files/Uploads/I2C%20issue/
>
> Thanks
>