Winter Storm Juno: Blizzard Warning! All shipping and UPS service guarantees are suspended due to weather and blizzard conditions.

Teensy I2C hang
Moderators: adafruit_support_bill, adafruit

Teensy I2C hang

by gondar on Sun Jul 29, 2012 6:37 pm

I'm trying to replicate the Delorean Time Machine project. So far I'm blocked trying to get any I2C communications. I've boiled the project down to the simplest wiring talking directly to either one of the seven-segment LCDs or the RTC clock. In either case when I make any I2C call indirectly with a call like clock.adjust(...) or clock.isrunning() or matrix.writeDigitNum(...), the code just hangs.

I can execute other simple code, blinking the onboard LED and printing debug messages via USB fine. Is there an easy way to diagnose the issue short of getting some sort of oscilloscope (for Windows)? Are there known gotchas with the libraries like differences between Arduino and Teensy that might not be reflected? I could just try getting another teensy board if necessary...

Thanks for any help here.
Posts: 1
Joined: Sat Jul 14, 2012 8:21 pm

Re: Teensy I2C hang

by nocivus on Thu Nov 08, 2012 4:21 pm

Hi Gondar, did you have any luck figuring it out? I'm having the same problem with a couple of barometric sensors :(

Thanks in advance
Posts: 1
Joined: Thu Oct 25, 2012 5:46 am

Re: Teensy I2C hang

by mobilegps on Sun Nov 11, 2012 9:38 pm

Watch out for long I2C wires to your slave.

Also if you are using Arduino IDE, I have a strong feeling that the library when used slowly, it is all ok. But when fast, there seems to be spike generated. I am sure it is software because the spike is not random and always happens at the same place.

Get a scope and see, logic analyser that is sampling the I2C signal might not be able to capture these spikes. Also the spike could be legal (end of a I2C cycle) or real noise, without seeing it, its a bit hard to diagnose.

Posts: 3
Joined: Sun Nov 11, 2012 9:16 pm