Jump to content

av_disp

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by av_disp

  1. Hello, I decided to use Pi 3B (pigpio lib, python) as a I2C slave and AD2 as master just to learn more about AD2 features and I2C protocol in general. the script itself: var ddd = [] if(Clear()!=true) return "I2C bus error. Check the pull-ups." i_ret = Write(0x13, 116) if( i_ret != 0) return i_ret; // "Device NAK"; //wait(0.1); ddd = Read(0x13,10) FileWriteBinary("~/Desktop/data2.bin", ddd); return ddd A simple scenario: AD2 sends a command from a script (100 kHz freq) , in 10-100 ms Pi (I2C slave) responds with 10 bytes of data, I want to capture the request/response data. What can be simpler? But the problem is that I am limited by the number of samples (16K at best). First and foremost - I cannot use "Record" mode because I need to run the script (in "Record" mode this option is not available from I2C tab). So, I have 16K samples max (with noise turned on I have only 8K), the bus speed is 100 kHZ, therefore I need the sample rate faster than 2XX kHz. I noticed that the result greatly depends on the selected rate: odd numbers like 200, 300 kHz may/will yield some sensible results but 280 kHz, 310 kHz almost guarantied to lead to totally inadequate results. With 300kHz rate, 8K samples I can cover only (1 / 300000) * 8192 = 27.3 ms or for 16K => 54ms, which no enough for this example. What is more - many captures just contain incomplete/incorrect data but I think this is the result of low sampling rate (300 kHz). Some of them contain just captured request data, some - response data (and that is really weird since it means that request data _was sent but missed by AD2). So, what is the right way to achieve this simple goal with AD2? PS: I read about real-time sample compression used in different types of logic analyzers and I think that it could be a very nice solution to this type of problems and great improvement for AD2 - most of the time during that 10-100 ms time frame the state of signals don't change i.e. the state is static and therefore being compressed it would take very little space in the buffer. That would lead automatically to the longer observation period, using the same sampling rate. Simple and powerful... Thanks.
  2. Hello attila, >You can use Logic Analyzer I2C interpreter for such purpose. Thanks for the advice, I will try.
  3. Hello, I was wondering if there is a way to use AD2 as i2C slave ? It isn't a problem to use it as I2C master, it works as expected and is very useful for data exchange visualization. But somehow I have difficult time to figure out how to use it in slave mode, I assume it has to be some sort or script. But looking at the available script commands ( I am neither an expert in WF nor i2C communication) I cannot figure out how to do that. Thanks.
×
×
  • Create New...