I2C pullup too strong? - Page 1
Forum section: electronics / projects

author: miceuz
author_rank: Frequent Contributor
timestamp: November 26, 2014, 02:57:15 pm
content: I was doing a test fixture for the widget I make. The fixture has to communicate as a I2C master and is based on Attiny44 - it does not have a proper I2C hardware, just USI.I've spent a fair amount of the day poking around it trying to make it to work. SCL line just wouldn't go high after start condition (by manual pin manipulation) and sending the first data bit (the line is controlled by USI when sending data). Then I connected scope to both SCL and SDA pins - bam - it works, disconnect the scope - it's stuck low at the same place.Pullups I was using were 2.2k, after changing to 10k - bam, it works.Can someone explain this to me?

author: mikerj
author_rank: Super Contributor
timestamp: November 26, 2014, 07:08:38 pm
content: Sounds like you might have some marginal timing on the bus, and either the addition of capacitance (the scope probe) or increasing the pull-up resistor is slowing things down enough to make it work.

author: Zero999
author_rank: Super Contributor
timestamp: November 27, 2014, 06:29:12 pm
content: I don't know much about I2C in particular but any pull-up resistor on the bus will increase the loading and if there's too much load, the MOSFETs in the CMOS driver stage will saturate and be unable to produce valid logic levels. Too lower value of pull-up resistor will mean the output will fail to go low properly.

author: electr_peter
author_rank: Unknown
timestamp: November 27, 2014, 07:54:59 pm
content: The lower value pull up resistors have, the better resulting I2C signal should be (provided that circuitry is not overloaded).2.2kOhm does not sound like too low resistance. Have you checked I2C signals with scope and grounding of a device? Maybe logic level is too high or too low or driving circuitry is not strong enough.Some testing dataEffects of varying i2c pull up resistors

author: freker
author_rank: Newbie
timestamp: November 27, 2014, 08:01:35 pm
content: The I2C pull-ups must be calculated based on a number of parameters. See the I2C spec for details (section 7.1).http://www.nxp.com/documents/user_manual/UM10204.pdfOne pragmatic way of solving this is of course by trail and error. The point is that there is no specific recommended value.Cheers

author: miceuz
author_rank: Frequent Contributor
timestamp: November 27, 2014, 08:38:49 pm
content: Quote from: electr_peter on November 27, 2014, 07:54:59 pmFunny thing - the problem went away as soon as I've connected scope. Appearently additional capacitance helps somehow.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: November 27, 2014, 08:50:47 pm
content: Quote from: miceuz on November 27, 2014, 08:38:49 pmIf scoping fixes it you definitely have some fundamental problem going on.

author: nuno
author_rank: Frequent Contributor
timestamp: November 27, 2014, 09:08:25 pm
content: AVR USI has no slew rate control on the pins, so maybe you have a cable too long and causing ringing leading to extra unwanted line commutations. This also means the crosstalk between SDA and SCL can be high.There are other constrains such as a maximum system clock to I2C clock frequency ratio for it to work well. There's one or two quirks with the USI in I2C mode that can be taken care in sw, but I've used the USI before only as slave, never tried master (I think I eared about a hw problem with a potential race in multi-master mode).I2C must be the most implementation broken bus I've ever eared of or dealt with. I've worked in at least 4 different projects using 5 different I2C implementations and in all I've seen or had problems with buggy I2C hw, most often of the "happens once in a million" type.

author: eneuro
author_rank: Super Contributor
timestamp: July 01, 2015, 11:20:25 am
content: Sorry guys,I've moved this post to new topic there while it will be probably better place to discuss thisGood USI I2C master / slave ATTiny85 library (optionally master arbitration )https://www.eevblog.com/forum/microcontrollers/good-usi-i2c-master-slave-attiny85-library-%28optionally-master-arbitration-%29/