Assuming the "records" are something more complicated than just a single byte here clearly grinding thru a million bytes is not something that's going to tax a modern PC's main memory.
Assuming the "records" are something more complicated than just a single byte here clearly grinding thru a million bytes is not something that's going to tax a modern PC's main memory.
I'd agree, except that you don't have a scope or logic analyzer that's up to the task.
My logic analyzer is a model dating almost
I betcha you could inject the trigger into the stream and generate a sync or parity error. Or just terminate the data stream some appropriate number of seconds after the trigger.
Another kludge you could try is to use two serial ports and switch between them at the trigger event.
I have a Tektronix 308 that would probably do what you want if you can spit the acquired data out of the scope at the proper baud rate. Unfortunately, it maxes out at 9600 baud.
At some point, it becomes easier to program up an arduino to do exactly what you want. It's so easy to upload the microcode that you could hard code the whole thing without a complicated user interface. Patch the code as you zero in on the fault.
Is the data rate maxing out the serial baud rate? If it is, you can't inject characters to indicate the trigger.
ll out
Why would you need to know the size? This is not so much different from a two pass assembler, but three passes maybe if you want to be fancy.
Pass 1 - find the DC average for 1/0 decision.
Pass 2 - look for 1/0 transition timing to determine baud rate
Pass 3 - decode the bytes and generate output file.
Read the input file three times and don't store anything other than a few w ords for the Pass 1/Pass 2 measurements.
Rick C.
-+ Get 6 months of free supercharging -+ Tesla referral code -
it's only 25,000 bytes, for input sizes around that in C99 with variable length arrays you can just do everything with stack allocations something like:
static unsigned int fsize(char* file) { FILE* f = fopen(file, "rb"); fseek(f, 0, SEEK_END); unsigned int len = ftell(f); fclose(f); return len; }
int main(int argc, char *argv[]) { char* filename = //etc.... //then somewhere in main:
unsigned char file_buf[fsize(filename)*sizeof(unsigned char)];
/* Read in file contents to stack buffer and do what u want (probably using a bunch of "for" loops and 1970s ANSI C-stuff." }
But why? That's extra work even if it's small. Just read each line and process it in a loop until the end. Lather, rinse, repeat. Why make it more complicated than it needs to be?
Rick C.
+- Get 6 months of free supercharging +- Tesla referral code -
A large data set is any that's larger than available memory.
but a software UART is a loop with three integers 4 if you want to do noise filtering. data structures aren't needed.
-- When I tried casting out nines I made a hash of it.
No, that page is a bit misleading, it is just an example: the prolific chip is the "device under test" on that webpage, and "The logic analyzer used was a Saleae Logic (at 16MHz)"
It is definitely a software decoder, as I have used it on waveforms that I captured with a USB logic analyser and then saved to disk (as a VCD file), had the program crash, re-started it and then reloaded the waveforms and then decoded the bytes. The program that I had to run is called "pulseview". I do remember having to do some fiddly configuration to get it to access the USB logic analyser without being root, and also that to properly reboot the logic analyser after a crash, I had to remove both USB and also all logic signals that were powering it via ESD diodes.
I have used the $6-ish one that I linked above
Anyway sigrok / pulseview could very likely decode the data from your scope, if it is in a format that it can read:
On Jan 21, 2019, Joerg wrote (in article ):
h-sg
n . n ,Given that you have a CSV file, name the file something like data.csv, and ask Excel to open the file. It should just open. Nor will 25000 points be a problem. Select the data column (first to last sells, and all between being selected) and go to Charts in the menu. There will be a suitable plot type.
else.
Scroll through the plot to find the events. Then find the critical span of data samples.
Joe Gwinn
Am 20.01.19 um 21:52 schrieb Joerg:
Hello,
may be the Software for bitscope is capable for this job.
For testing purposes you don't need the hardware, you can use a bitscope over the internet.
Bernd Mayer
question to the OP,
is your serial data self clocking or do you have a separate clock and data line?
mark
I knew that and it works. Finding events is the key problem. Yesterday I did but that was a tedious job using a paper ruler on the screen, made to scale for the baud rate and zoom. Just like I did in the 90's.
-- Regards, Joerg http://www.analogconsultants.com/
Soon I might. I ordered the little USB logic analyzer that Lasse suggested, it just ain't here yet. In case there is a next time. I hope there won't be but one never knows.
Only if the scope has a fast enough trigger output. Mine doesn't, it only has a "go - no go" type alert output and that isn't true realtime.
That would be a problem because this set-up shifts gears. Once communication is established it steps on it and shifts from 9600bd to
19200bd, in the middle of the data stream.
Only if you are versed in programming stuff. That's why I couldn't compile Lasse's code, I am just not experienced in handling software jobs.
It ratchets up to 19200bd later and injecting characters would require some coding which I have no experience with. Once I get SigRok going on the little analyzer pod that is being shipped here I should be able to solve such puzzles easier.
-- Regards, Joerg http://www.analogconsultants.com/
I ordered a similar one after Lasse brought it up. We'll see, maybe I'll dive deeper into the digital world. I think I could get rid of my old Dolch LAM-3250 logic analyzer but probably nobody would want to have it. It's a nice-looking machine, pretty enclosure and all, but nowadays considered a boat anchor.
-- Regards, Joerg http://www.analogconsultants.com/
Interesting, thanks. I'd have to find out how to feed in a CSV file or some similar file. Converting the scope recordings into ones and zeroes is easy but I'd have to get into into a format that this software can read.
Anyhow, I have ordered a small 8-line logic analyzer which works with the SigRok environment. That ought to do the trick for next time.
I'd like to run it on a laptop that I just converted to Linux but that seems to be no problem with such software.
-- Regards, Joerg http://www.analogconsultants.com/
It's self-clocking. The usual 1-start, 1-stop and no parity on a single serial data line. Like RS232 and RS485.
-- Regards, Joerg http://www.analogconsultants.com/
Hello, bitscope can
hello,
bitscope is capable of capturing and replaying the data. If they use the same file-format then you can try to replay your data into the software and analyze it.
Bernd Mayer
hello,
bitscope is capable of capturing and replaying the data. If they use the same file-format then you can try to replay your data into the software and analyze it.
Bernd Mayer
The DDR files it uses are simple CSV which is easy but AFAICT they require a header with meta data in it (at about 75% scroll down):
My oscilloscope is similar. I writes files with meta data which I truncate when importing into Excel. However, reading such files back into the scope, for example to perform math on them, requires this meta data to be there. Else the scope can't know how to interpret the data such as the number of channels it represents, what the time base was, and so on.
-- Regards, Joerg http://www.analogconsultants.com/
I just tried it. The installed version on the Windows PC here at the office is missing the whole top menu bar and other stuff. It doesn't look quite ready yet :-)
-- Regards, Joerg http://www.analogconsultants.com/
if you are on linux I can send you an excutable, I'm not sure I have a windowsbox with a c compiler
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.