On Sat, Mar 13, 2010 at 4:03 PM, m...@watty <[email protected]> wrote:
> It'worth clarifying that with lower CPU clock on Slave, then the Slave > may not be as fast. > > The Master can go slower than max slave speed (down to Hz, near DC) > but can never go faster than whatever speed is the max of the slave. > You can choose between 100KHz, 400KHz or 1MHz. > > Also longer or narrower wiring, number of masters & slaves sharing bus > etc increases capacitance and thus reduces the speed. Correct value of > pull up resistors too. If the pull-up resistors are higher value than > is specified, the bus will still work at a slower speed. > Can you take a look at the rising edge of the clock? > > At slower speed and CAT5 pair (one wire ground of each pair), then two > pairs can do 100m if the speed is low enough. Shielded CAT5 > recommended :) There are two issues with the cable: -shielded cable is often associated with higher parasitic capacitance, meaning lower speed and/or lower distance - unshielded but twisted wire (signal + GND) has usually lower parasitical capacitance than identical shielded cable, but also is heavily radiating and receive radiation from the neighbour cables > For longer bus cables performance is improved by > lowest value pull up resistors allowed at twice value, but at BOTH > ends of bus. > ...or using active terminators. Passive terminators at both cable ends is a common practice, however is dissipating power on bus and may be used for lines with less than 200pF parasitic capacitance. As many devices on bus (1024 at 10 bit address as you've written in the tutorial) as higher the parasitic capacitance. A simple computation is 7pF(one device)x1024=7nF If you wish, an 1024 I2C devices can be equivalent with a specific cable of 500m or even more, that's why using such numbers in a tutorial (written for beginners) must be specifically avoided.The charging time of bus+device parasitic capacitance for a fast I2C is only 300nS. A hardware rule of good practice is not allowing connections on long wire as you've probably did without drivers (see the RS485 or CAN). This is an ancient rule, coming from the age of CMOS and 8080, when a CMOS board or a microprocessor was an expensive tool, killing it because of a stupid communication it was really painful. However killing a multi-microcontroller I2C master slave system, after it works, can be painful as well. Vasile > > > > > > On Mar 13, 11:43 pm, mattschinkel <[email protected]> wrote: > > Should this be noted in the library/sample? > > > > Matt. > > > > On Mar 13, 2:55 pm, "m...@watty" <[email protected]> wrote: > > > > > On Mar 13, 7:20 pm, mattschinkel <[email protected]> wrote: > > > > > > It's not working for me. I have compiled the I2C master/slave echo > > > > samples. Master is 20mhz, slave is 10mhz. Master is set to 400khz > I2C. > > > > > > I do not get the correct echo! > > > > > > If I change the master I2C rate to 100khz, it does work. > > > > > > Matt. > > > > > That makes sense. > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<jallib%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/jallib?hl=en. > > -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
