Go Down

Topic: I2C wire.write() question (Read 374 times) previous topic - next topic

chucktodd

Thanks for the quick reply Chuck.
But I guess that with timeout condition the freeze state will not going to happen but the ms5611 can stay for a long time without providing real-time information?
I really suspect that is the MS5611 because in setup() it is the first i2c comm established and many times in the startup it does not initialize thus the program just freezes there. The other arduino I believe is working like it should.
It will be preferable to use a modded OneWire or try another ms5611, or other solution?
If I had an oscilloscope that would be much easy to debug.

If you have an extra Arduino UNO or MEGA you can have yourself a Logic analyzer that you can uses to identify this problem.
Gillham OLS implementation

It works pretty good.
Here is a image of I2C traffic I captured with it. :smiley-confuse: PostImage.org is having a problem so I'll just append it.

 Chuck.

HF_ATL

#16
Aug 24, 2015, 10:08 pm Last Edit: Aug 24, 2015, 10:08 pm by HF_ATL
I have an extra arduino uno and mega so it will be good to visualize the I2C traffic.
Following that link I couldn't find the process of implementing it.
It is like installing logic sniffer, upload the sketch to arduino and communicate via serial between arduino and logic sniffer?

chucktodd

I have an extra arduino uno and mega so it will be good to visualize the I2C traffic.
Following that link I couldn't find the process of implementing it.
It is like installing logic sniffer, upload the sketch to arduino and communicate via serial between arduino and logic sniffer?
Download the three .ino files, put them in a folder named logic_analyzer in you Arduino projects folder.
Select the correct Arduino board, to match the one you are using(from the Tools/board)

compile and upload the code to you Arduino

from Gillham's readme: pins and options
Code: [Select]


This SUMP protocol compatible logic analyzer for the Arduino board supports
5 channels consisting of digital pins 8-12, which are the first 5 bits (0-4)
of PORTB. Arduino pin 13 / bit 5 is the Arduino LED, bits 6 & 7 are the
crystal oscillator pins.

Uncomment CHAN5 below if you want to use the LED pin as an input and have
6 channels.

On the Arduino Mega board 8 channels are supported and 7k of samples.
Pins 22-29 (Port A) are used by default.



SUMP protocol Client web page

Here is a direct link to the SUMP Client download 0.9.7.2

unzip this packing, I put it in Documents\logic.   inside this folder it will create a ols-0.9.7.2 folder.
Under this is a plugins folder, copy the two .cfg from Gillham's github.

To start it double click on the run.bat from the ols-0.9.7.2 folder.

Select Capture/device -> open Bench
Select Capture/begin capture
  Connection type -> serial port
  analyzer port -> your arduino Serial port
  Devicetype -> Arduino generic (uno) or Arduino Mega (mega)
  Select show device metadat, this will talk to the Arduino, verify comms
  Select Acquisition
    Sampling rate -> your choice
    recording size -> your choice, limited by which Arduino you have.
  Select Triggers
    Uncheck trigger enabled, this will start sampling as soon as you click capture
    With the Arduino, only SIMPLE type is possible, and you can only use bits 0..4 or 5 for Uno, 0..7 for mega Mask select which 'channels' to monitor for trigger, Value is check=High unchecked=LOW

Chuck.
   

Go Up