Logic analyzer data: Only receive triggered data (with timestamp) using Python
Logic analyzer data: Only receive triggered data (with timestamp) using Python
I am currently driving a 2205A MSO via python-script. The idea is, to create a sniffer for a custom UART-protocol for later interpretation of it. I was able to setup the two digital inputs D0 and D1 of port0 to receive data via block mode. With the function "splitMSODataFast", I was able to receive separate data for each digital input of port0 consistion of only 0 and 1. Now, I would first have to interpret received data considering the used sampling rate. e.g: If I use a sampling rate of 4*UART-Baudrate, ideally four zeros would mean 1 zero of the protocol. I don't really like this approach. Therefore I want to ask if it is possible for each channel to only receive data at a falling and rising edge of the input data. To determine whether the protocol data has sent e.g. 5 zeros or ones in a row, I'd need some kind of timestamp.
If I can provide any further information, please let me know.
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
Because then you do need to do the decoding yourselves.
If you do it in picoscope you can set alarms to save the data to a file and see the signal visually and export it to CSV or something to analyse in some program.
If you do it in python you need to build the visualizer and decoder self.
Benno
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
thanks for your advice. The decoder itself is already finished and will be used in an automated testing environment. My hope was that the picoscope could be integrated into this environment and what basically is only missing at that point is the data output from the scope which I mentioned.
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
I have done this for a CAN signal where we want to trigger on a specific message-corruption ant this was streaming at 4MS/sec.
I guess your UART baud rate is below 500kbps. If it is above a 2000 series scope will probably not handle this in streaming mode.
Benno
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
Then you can evaluate the data while it is streaming into your application and when you see the data pattern you want save the part from that point on or data before that point and the length you want as often as you want.
Then you never have gaps in your data. The only limit is the max streaming data speed of the scope.
If I remember correctly the 2000 series have a somewhat limited max streaming speed.
Benno
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
For information the 2205A MSO has a maximum sampling rate shared between active channels of 1MS/sec, one digital port of 8 digital channels is considered as a single active channel.
Technical Support Manager
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
It will be at 576000 baud."What baud rate is your signal"
That was my first try, yes. If I am not wrong, I can not exactly set the sampling rate to the value 576000."and have you tried setting the sampling rate to the baud rate?"
I am currently testing the scope measurement by creating rectangular signals with a Frequency of baud/2 and a duty cycle of 50%. The results' reliability is okay. With an oversampling x*baudrate, I receive x+-1 samples for each flank. My hope was to eliminate these x+-1 samples to exactly x because for testing the actual DUT later on, I want to be able to clarify if such bit errors are created by the DUT and not by the measuring system.
I will test two data lines, so I need to use two channels.For information the 2205A MSO has a maximum sampling rate shared between active channels of 1MS/sec, one digital port of 8 digital channels is considered as a single active channel.
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
Are you sure about that? The Picoscope 2000 Series Programmer's Guide shows a minimum sample interval of 10ns which would mean 100MS/secmaximum sampling rate shared between active channels of 1MS/sec
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
100MS/sec is available in block mode captures where the data is stored in the internal memory of the device before being transferred to the PC, the 2205A MSO only has a 48kSample memory buffer so wouldn't be able to capture much data.Are you sure about that? The Picoscope 2000 Series Programmer's Guide shows a minimum sample interval of 10ns which would mean 100MS/sec
The 1MS/sec refers to streaming mode where data is transferred directly to the PC over the USB bus, and it can do this continuously for extended periods of time. The 48kSample memory on the device is only used as a FIFO to prevent data loss.
Technical Support Manager
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
but 500kS/sec is more than sufficient for 57600 baud (or do you really mean 5.7mbaud)
can you post a psdata where you show what you want to trigger on.
Benno
Re: Logic analyzer data: Only receive triggered data (with timestamp) using Python
The protocol has a length of 32bytes and is being sent quite rapidly. So the Scope can buffer about 185 protocols. I am not sure this will be enough yet.
)but 500kS/sec is more than sufficient for 57600 baud (or do you really mean 5.7mbaud
It has a Baudrate of 576000 bit/s, so 0,576MBaud = 0,576MBit/s, whereas the maximum sampling rate I can get is 500kS/s.