Hi all, Apologies for using the -devel mailing list - I'm aware it should be used for development, but I simply don't know where else to try.
The first questions I've already posted here: https://electronics.stackexchange.com/questions/426287/range-for-raw-analog-import-in-pulseview-sigrok ... and after realizing I won't get a response there, I tried to "toot" here the same question here: https://fosstodon.org/web/statuses/101732125980629039 ... same result; as per "Getting in touch" on https://sigrok.org/ there is also IRC, which I've tried, but I have to close the IRC client eventually, and there are no IRC archives, so I wouldn't know if anyone answered. Anyways, from the above post:
* Why did PulseView decide to map (U8) byte value 0x00 to -500 mV, and (U8) byte value 0xFF to 500 mV? In other words, how did it decide on this default range - is this documented anywhere, and can I change the interpreted analog range (in volts)? * When I use Sample rate (Hz): 0, PulseView seemingly choses 10 ms as sample period by default. Why is this number chosen, and is this documented anywhere? (I expect if I enter a proper sampling rate, then I'll get the corresponding sampling period instead).
I also have these additional questions: Basically, I want to analyze a differential binary signal. I can import the analog captures of the non-inverting and inverting channel of this signal as analog data "tracks" in PulseView, which is great. I can also import the subtraction/difference between these two differential channels as analog data "track" in PulseView as well, - and on this track, I can do "Conversion": "to logic via threshold", "Conversion threshold(s)": "Signal average", with "Show traces for": "analog+converted", and I can view both the analog and interpreted binary/logic signal, which is fantastic. However, I've stumbled into one problem with the analysis of this signal: namely, it is tri-state - at certain points, the bus goes into high-impedance (Hi-Z) mode, which I need to take into account for proper analysis. The initial problem with this, is that the "Conversion": "to logic via threshold" does not support tri-state - as output, you can either get logic one, or logic zero, nothing else. So, I thought - OK; as far as I am aware, the VCD file format supports four logic states: zero, one, Z (high Z/impedance) and X (don't care), so I can in principle cook up a script that will go through the analog values and dump VCD instead; in my signal, I have say average of 2.5V for logic one, -2.5V for logic zero, and approx 0.4 to 0.6 V when the bus is in Hi-Z mode, and in principle I can easily set up thresholds for this, so I dump logic one, logic zero and Z to a VCD file based on the analog values. Thus, I tried a small experiment: I copy/pasted the example from: https://sigrok.org/wiki/File_format:Vcd ... and deleted the lines starting with `[...]` to the end; and I changed `#410 1!` to `#410 Z!`, and `#514 1!` to `#514 X!`. Now, when I import this file in gtkview, I do get these interpreted as Hi-Z and don't-care values respectively - however, if I import them in PulseView, they are simply ignored; see screenshot: https://imgur.com/gJ6xxcV So, apparently PulseView does not support Hi-Z as a logic state in a VCD file, but I'd still like to ask and confirm: * Does PulseView have any kind of support for Hi-Z as a logic state (in VCD or not)? * If not, is there a "cheap" way for me to quickly implement it (e.g. maybe there is an enum or something I could change in the source, so that Z would be interpreted from a VCD file as its own state; or maybe I could add another threshold conversion algo, with additional set of thresholds for Hi-Z when converting analog signal to logic - so I'd have something to work with, even without full support for Hi-Z throughout the program)? Another way around this, would be ability to "peek" into analog tracks at a given sample number/time. However, as far as I can tell, regardless of how many analog channels one has loaded in PulseView, one can only use a PulseView/sigrok decoder on a logic signal (so at least one of the loaded analog channels has to have "Conversion": "to logic via threshold", to be able to apply a decoder on it). And once the decoder has a reference to a logic channel, as far as I can see, from inside the decoder Python script, one can **only** read values from that (or other declared) logic channels. So, if I have CH3 as analog channel, and then also as logic channel via "Conversion": "to logic via threshold", from inside the decoder .py script, I only have access to the logic values of CH3 (let's say, through a definition like `channels = ( {'id': 'mysig', ...} )`). If in Python code, I could say something like `temp_analog_val = analog_source('mysig', self.samplenum)`, and get a floating point voltage value at that time, then I could determine when the bus goes into Hi-Z, even without direct support of Z as a logic level. So, again, I'd like to ask and confirm: * Is there a way, to peek into the analog source of a logic signal (at a given time/samplenum), from inside a PulseView/sigrok Python decoder? Many thanks in advance for any answers! _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel