Teensy I2C hang

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
gondar
 
Posts: 1
Joined: Sat Jul 14, 2012 8:21 pm

Teensy I2C hang

Post by gondar »

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.

nocivus
 
Posts: 1
Joined: Thu Oct 25, 2012 5:46 am

Re: Teensy I2C hang

Post by nocivus »

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

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

Re: Teensy I2C hang

Post by mobilegps »

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.

Cheers

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”