I2C pins left floating?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C pins left floating?

2,020 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cyberstudio on Tue Jun 14 10:55:55 MST 2011
On a LPC1114, all I/O pins default to pull-up at reset time - I think this is done to avoid floating inputs which causes increased power consumption or even instability.

But the SCL and SDA I2C pins are open drain pins. What are their initial condition if they are left floating but not used?
0 Kudos
8 Replies

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Thu Jun 16 23:40:19 MST 2011

Quote: atomicdog

NXP kind of developed a reputation for... uhmm... 'less then adequate' documentation.



And now just show me one supplier who did not make [I]any [/I]errors in the documentation...
I had a complete user manual with IC specs, programming specs and more about the (at that time) brand new Zilog Z800 series - a 8/16 bits processor that had both a Z80 mode and a true 16 bits mode.
But when I requested a quote for those parts I was laughed at ... This complete range of ICs never made it to the market :eek:


Quote: atomicdog

The user manual should have (but is missing) a picture of the circuit for the I2C pins, Like it has for some of the other pins. I would contact NXP and request the info from one of the engineers.



Good luck in getting the info. Alternatively, just place your thumb on the upper FET in the general I/O pin configuration :p
But if you did read the user manual then you will notice that on every occasion of the I2C pins being mentioned it is stated that these are open drain. So stop reading the user manual like it is a comic book and pay attention to the text.

And does NXP have to write that note to add a pull up on these pins when used as input? Are we just little rascals that have to be told everything we have to do? Or are we still able to read the documentation and deduce for ourselves how to create a proper design.

The only thing really missing (and I have been awaiting an answer on this for the last year or so) is where the I2C_PCLK comes from that is mentioned in the section about selecting the appropriate I2C data rate and duty cycle.
Somehow I seem to be the only one wondering...

Rob
0 Kudos

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by atomicdog on Thu Jun 16 17:36:55 MST 2011

Quote: cyberstudio
So, no, the issue is not about the cost of resistors, but the issue is we were never told to add resistors by the user manual (when I2C is not used). I trust NXP to have done their due diligence and has documented all precautions as necessary. So there is some other mechanism at work to prevent havoc at the SDA and SCL pins?


Wow, that's some seriously misplaced trust.:D
NXP kind of developed a reputation for... uhmm... 'less then adequate' documentation. For example the datasheet (and I use that term loosely) for the P89V6xx is an asinine attempt at documentation with plenty of missing and incorrect info.
The docs on the 8051 LPC's weren't all that great either.

The user manual should have (but is missing) a picture of the circuit for the I2C pins, Like it has for some of the other pins. I would contact NXP and request the info from one of the engineers.
0 Kudos

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jun 16 17:06:04 MST 2011
Just use
LPC_IOCON->PIO0_4 = 0x1c0;  //IO
LPC_IOCON->PIO0_5 = 0x1c0;  //IO
LPC_GPIO0->DIR   |= ((1<<4)|(1<<5));  //OUT
LPC_GPIO0->DATA  &=~((1<<4)|(1<<5));  //LOW
with or without pullup, SCL & SDA are LOW  :eek:
0 Kudos

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cyberstudio on Thu Jun 16 15:05:37 MST 2011
Maybe I shouldn't have used the word "most" as I couldn't back that up with hard data, but let's make that "a lot of".

Using the same logic, it is good microcontroller design to just supply power, leave all the rest of the pins unconnected, except where directed by documentation, and the chip shall not do unseemly things such as consuming excessive power or oscillating into instability.

So, no, the issue is not about the cost of resistors, but the issue is we were never told to add resistors by the user manual (when I2C is not used). I trust NXP to have done their due diligence and has documented all precautions as necessary. So there is some other mechanism at work to prevent havoc at the SDA and SCL pins?
0 Kudos

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by atomicdog on Tue Jun 14 15:26:56 MST 2011

Quote: cyberstudio

I think most applications don't use I2C, so they are left unconnected in  most applications. Problem is, unlike the other pins, there are no  pull-ups by default to make them not float.

A lot of embedded systems use I2C. It has been very popular for a long time. Most of the products I've worked on at all the jobs I've had used I2C. A lot of systems will also need an open drain output for other reasons.

Quote: cyberstudio
I think if a CMOS input is left floating, it may oscillate, leading to increased power consumption and maybe even instability affecting other parts of the chip.
...

Considering both, is it necessary to tie SCL and SDA to ground or Vdd when they are not used? If the answer is no, there must be some other mechanism to prevent oscillation from happening.

It's good design practice even if you're not worried about current draw.
Are resistors too expensive for you?:rolleyes:;)
0 Kudos

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Tue Jun 14 14:33:35 MST 2011
You can configure the pin as an output.
0 Kudos

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cyberstudio on Tue Jun 14 13:28:19 MST 2011
I think if a CMOS input is left floating, it may oscillate, leading to increased power consumption and maybe even instability affecting other parts of the chip.

I think most applications don't use I2C, so they are left unconnected in most applications. Problem is, unlike the other pins, there are no pull-ups by default to make them not float.

Considering both, is it necessary to tie SCL and SDA to ground or Vdd when they are not used? If the answer is no, there must be some other mechanism to prevent oscillation from happening.
0 Kudos

1,497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by atomicdog on Tue Jun 14 12:44:29 MST 2011
If there is not an external pull up/down resistor there is no way to know what value will be at the pin.
0 Kudos