0
\$\begingroup\$

I have five Teensy 3.1 and I would like to interface them with I2C running at 2.4 MHz.

The maximum Line Length will be around 2 meters.

Will it work?

What's the best way I can wire this up?


update on Aug 25:

Regarding the manual saying 100kbit at page 1169; that's a generic note about I2C. If you go down a couple of pages, there is a table with the divider values needed to set the Clock speed of the bus. And the maximum is 240 (2.4 mhz).

Apart from this; I done a couple of test between two teensy 3.1 and the bus works flawlessy at 2.4 Mhz. Its still slower since (According to wikipedia) some devices can support up to 5Mhz Clock speed

I just want to link 5 Teensy 3.1 and not any other devices.

My problem is that I Don't have a scope and i cannot afford one at the moment; so I'm going by guess.

If 2 meters is too much; I could perhaps reduce the link length to 40 cm by using the second I2C port on each Teensy 3.1 to link to the next.

Should I use Cat5 cable? twisted pair?

\$\endgroup\$
  • \$\begingroup\$ Typically use for I2C is not that high speed. SPI can be 5 to 50MHz for many devices. Wiki en.wikipedia.org/wiki/I%C2%B2C I²C supports a limited range of speeds. Hosts supporting the multi-megabit speeds are rare. \$\endgroup\$ – EEd Aug 23 '14 at 18:10
  • 3
    \$\begingroup\$ 2.4 mhz or 2.4 mHz or possibly 2.4 MHz. 2.4 mHz isn't very fast at all! \$\endgroup\$ – Andy aka Aug 23 '14 at 18:17
  • \$\begingroup\$ I should clarify a) SPI is generally used for higher speed than I2C b) both I2C and SPI are more generally intended for communication with same PCB, rather than over long 2 meters. So, may or may not work. Need check data sheet. Not sure about the MK20DX256VLH7 used in your board, Atmel chips, like ATMgea2560, supports 2.5M bps UART. A popular design is to use proper multi drop driver with wired-or style multiple access control (same principle as I2C). This path worth exploring. \$\endgroup\$ – EEd Aug 23 '14 at 21:05
3
\$\begingroup\$

There is a highspeed specification for I2C, you can read about it here: http://www.i2c-bus.org/highspeed/

However, it needs special hardware and very few devices support it.

I2C fast mode supports up to 1MHz, but you have to be very careful about how much capacitance you have on the bus. Two meters of wire is likely a non-starter.

So I would consider other interfaces. SPI might be a good choice as EE developer mentioned.

All this assumes that you mean megahertz not millihertz :)

\$\endgroup\$
3
\$\begingroup\$

No. It's very unlikely that the proposed I2C bus would work.

  • Very few devices support high speed I2C, as John had mentioned in his post.
    The manual for K20 family mentions only 100 kbit/s for I2C (p. 1169 in the PDF).
  • I2C was designed only for communication over short distances (usually within a circuit board). It can be extended, but it usually comes at a cost of reduced data rate.

Teensy 3.1 has got CAN bus. It may be a better fit for your application. CAN bus was designed for operating through cables.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.