Electronics-Related.com
Forums

RS232 decode routines from raw scope data?

Started by Joerg January 20, 2019
Is there a simple Windows or Linux program that can decode serial data 
out of raw data from an digital oscilloscope?

My old logic analyzer does not have any serial data decoding and neither 
does my scope. So I'd need something that can take in the ADC raw data, 
I set a threshold to turn that into H/L digital values and the software 
would fish out the data words. Not sure if it even exist. Not something 
expensive because I'll only need it once for a short time, to find if 
there's a bug visible in the data. It'll be a challenge because my scope 
only has 25,000 points recording length.

-- 
Regards, Joerg

http://www.analogconsultants.com/
søndag den 20. januar 2019 kl. 21.52.53 UTC+1 skrev Joerg:
> Is there a simple Windows or Linux program that can decode serial data > out of raw data from an digital oscilloscope? > > My old logic analyzer does not have any serial data decoding and neither > does my scope. So I'd need something that can take in the ADC raw data, > I set a threshold to turn that into H/L digital values and the software > would fish out the data words. Not sure if it even exist. Not something > expensive because I'll only need it once for a short time, to find if > there's a bug visible in the data. It'll be a challenge because my scope > only has 25,000 points recording length.
get a cheap logic usb analyser? https://learn.sparkfun.com/tutorials/using-the-usb-logic-analyzer-with-sigrok-pulseview/all else it would take long to program, just slice that data into 1/0 and grap/decode a frame worth of data after each start bit what's the format of the data from the scope?
On 2019-01-20 13:21, Lasse Langwadt Christensen wrote:
> søndag den 20. januar 2019 kl. 21.52.53 UTC+1 skrev Joerg: >> Is there a simple Windows or Linux program that can decode serial >> data out of raw data from an digital oscilloscope? >> >> My old logic analyzer does not have any serial data decoding and >> neither does my scope. So I'd need something that can take in the >> ADC raw data, I set a threshold to turn that into H/L digital >> values and the software would fish out the data words. Not sure if >> it even exist. Not something expensive because I'll only need it >> once for a short time, to find if there's a bug visible in the >> data. It'll be a challenge because my scope only has 25,000 points >> recording length. > > get a cheap logic usb analyser? > https://learn.sparkfun.com/tutorials/using-the-usb-logic-analyzer-with-sigrok-pulseview/all >
That sure would ne nice but I have to do this tomorrow.
> else it would take long to program, just slice that data into 1/0 and > grap/decode a frame worth of data after each start bit >
I thought there had to be some programs that already can do that. Many times people sit there and decode by hand. I used to do that in my olden days, using a ruler and stacks of Polaroid pictures from a scope screen. It should even be possible to do this in an Excel macro and then load in from the comma-delimited data file but I am not that great a programmer, I am an analog guy.
> what's the format of the data from the scope? >
It can store raw CSV for the data. Also BMP, JPEG and some others but those only per screen and not the whole recording. If there is nothing I'll just use the old print-out, ruler and counting method. -- Regards, Joerg http://www.analogconsultants.com/
On 20-1-2019 21:52, Joerg wrote:
> Is there a simple Windows or Linux program that can decode serial data > out of raw data from an digital oscilloscope? > > My old logic analyzer does not have any serial data decoding and neither > does my scope. So I'd need something that can take in the ADC raw data, > I set a threshold to turn that into H/L digital values and the software > would fish out the data words. Not sure if it even exist. Not something > expensive because I'll only need it once for a short time, to find if > there's a bug visible in the data. It'll be a challenge because my scope > only has 25,000 points recording length. >
For reading/writing the hardware ports, (for me in DOS) you can download my code. The exe can be loaded on both sides of a nul modem connection, and gives both screen access to the oher computer. It uses the hardware buffer in the rs232 chip, no interrupt used.
On 20-1-2019 22:51, Sjouke Burry wrote:
> On 20-1-2019 21:52, Joerg wrote: >> Is there a simple Windows or Linux program that can decode serial data >> out of raw data from an digital oscilloscope? >> >> My old logic analyzer does not have any serial data decoding and neither >> does my scope. So I'd need something that can take in the ADC raw data, >> I set a threshold to turn that into H/L digital values and the software >> would fish out the data words. Not sure if it even exist. Not something >> expensive because I'll only need it once for a short time, to find if >> there's a bug visible in the data. It'll be a challenge because my scope >> only has 25,000 points recording length. >> > For reading/writing the hardware ports, (for me in DOS) you > can download my code. > The exe can be loaded on both sides of a nul modem connection, > and gives both screen access to the oher computer. > > It uses the hardware buffer in the rs232 chip, no interrupt used. >
Sorry, I forgot the link.> http://home.planet.nl/~burry004/COMPORT.ZIP
On 2019-01-20 13:54, Sjouke Burry wrote:
> On 20-1-2019 22:51, Sjouke Burry wrote: >> On 20-1-2019 21:52, Joerg wrote: >>> Is there a simple Windows or Linux program that can decode serial data >>> out of raw data from an digital oscilloscope? >>> >>> My old logic analyzer does not have any serial data decoding and neither >>> does my scope. So I'd need something that can take in the ADC raw data, >>> I set a threshold to turn that into H/L digital values and the software >>> would fish out the data words. Not sure if it even exist. Not something >>> expensive because I'll only need it once for a short time, to find if >>> there's a bug visible in the data. It'll be a challenge because my scope >>> only has 25,000 points recording length. >>> >> For reading/writing the hardware ports, (for me in DOS) you >> can download my code. >> The exe can be loaded on both sides of a nul modem connection, >> and gives both screen access to the oher computer. >> >> It uses the hardware buffer in the rs232 chip, no interrupt used. >> > Sorry, I forgot the link.> http://home.planet.nl/~burry004/COMPORT.ZIP >
Thanks, Sjouke, but unfortunately this isn't coming from the harware port. It is raw data in the form of an oscilloscope data dump. Basically 25,000 data words of 8-bits each where a threshold needs to be set to turn this into high-low digital data, then the frames need to be found according to start/stop bits and the result output as ASCII. Similar to morse code decoding, just that instead of morse code it's RS232 data. Or in my case RS485 but it's the same thing. -- Regards, Joerg http://www.analogconsultants.com/
On 01/20/2019 05:26 PM, Joerg wrote:
> On 2019-01-20 13:54, Sjouke Burry wrote: >> On 20-1-2019 22:51, Sjouke Burry wrote: >>> On 20-1-2019 21:52, Joerg wrote: >>>> Is there a simple Windows or Linux program that can decode serial data >>>> out of raw data from an digital oscilloscope? >>>> >>>> My old logic analyzer does not have any serial data decoding and >>>> neither >>>> does my scope. So I'd need something that can take in the ADC raw data, >>>> I set a threshold to turn that into H/L digital values and the software >>>> would fish out the data words. Not sure if it even exist. Not something >>>> expensive because I'll only need it once for a short time, to find if >>>> there's a bug visible in the data. It'll be a challenge because my >>>> scope >>>> only has 25,000 points recording length. >>>> >>> For reading/writing the hardware ports, (for me in DOS) you >>> can download my code. >>> The exe can be loaded on both sides of a nul modem connection, >>> and gives both screen access to the oher computer. >>> >>> It uses the hardware buffer in the rs232 chip, no interrupt used. >>> >> Sorry, I forgot the link.> http://home.planet.nl/~burry004/COMPORT.ZIP >> > > Thanks, Sjouke, but unfortunately this isn't coming from the harware > port. It is raw data in the form of an oscilloscope data dump. Basically > 25,000 data words of 8-bits each where a threshold needs to be set to > turn this into high-low digital data, then the frames need to be found > according to start/stop bits and the result output as ASCII. > > Similar to morse code decoding, just that instead of morse code it's > RS232 data. Or in my case RS485 but it's the same thing. >
"Tomorrow" is a pretty tight deadline I'd have to charge a lot for but if you can post a set of example data I could whip up a softwares that might be usable for next time for 'bout $0
On Sun, 20 Jan 2019 13:43:12 -0800, Joerg <news@analogconsultants.com>
wrote:

>On 2019-01-20 13:21, Lasse Langwadt Christensen wrote: >> s&#4294967295;ndag den 20. januar 2019 kl. 21.52.53 UTC+1 skrev Joerg: >>> Is there a simple Windows or Linux program that can decode serial >>> data out of raw data from an digital oscilloscope? >>> >>> My old logic analyzer does not have any serial data decoding and >>> neither does my scope. So I'd need something that can take in the >>> ADC raw data, I set a threshold to turn that into H/L digital >>> values and the software would fish out the data words. Not sure if >>> it even exist. Not something expensive because I'll only need it >>> once for a short time, to find if there's a bug visible in the >>> data. It'll be a challenge because my scope only has 25,000 points >>> recording length. >> >> get a cheap logic usb analyser? >> https://learn.sparkfun.com/tutorials/using-the-usb-logic-analyzer-with-sigrok-pulseview/all >> > >That sure would ne nice but I have to do this tomorrow. > > >> else it would take long to program, just slice that data into 1/0 and >> grap/decode a frame worth of data after each start bit >> > >I thought there had to be some programs that already can do that. Many >times people sit there and decode by hand. I used to do that in my olden >days, using a ruler and stacks of Polaroid pictures from a scope screen. > >It should even be possible to do this in an Excel macro and then load in >from the comma-delimited data file but I am not that great a programmer, >I am an analog guy. > > >> what's the format of the data from the scope? >> > >It can store raw CSV for the data. Also BMP, JPEG and some others but >those only per screen and not the whole recording. > >If there is nothing I'll just use the old print-out, ruler and counting >method.
Why not connect your RS232 to a serial port on a PC or laptop? -- John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 2019-01-20 14:49, bitrex wrote:
> On 01/20/2019 05:26 PM, Joerg wrote: >> On 2019-01-20 13:54, Sjouke Burry wrote: >>> On 20-1-2019 22:51, Sjouke Burry wrote: >>>> On 20-1-2019 21:52, Joerg wrote: >>>>> Is there a simple Windows or Linux program that can decode serial data >>>>> out of raw data from an digital oscilloscope? >>>>> >>>>> My old logic analyzer does not have any serial data decoding and >>>>> neither >>>>> does my scope. So I'd need something that can take in the ADC raw >>>>> data, >>>>> I set a threshold to turn that into H/L digital values and the >>>>> software >>>>> would fish out the data words. Not sure if it even exist. Not >>>>> something >>>>> expensive because I'll only need it once for a short time, to find if >>>>> there's a bug visible in the data. It'll be a challenge because my >>>>> scope >>>>> only has 25,000 points recording length. >>>>> >>>> For reading/writing the hardware ports, (for me in DOS) you >>>> can download my code. >>>> The exe can be loaded on both sides of a nul modem connection, >>>> and gives both screen access to the oher computer. >>>> >>>> It uses the hardware buffer in the rs232 chip, no interrupt used. >>>> >>> Sorry, I forgot the link.> http://home.planet.nl/~burry004/COMPORT.ZIP >>> >> >> Thanks, Sjouke, but unfortunately this isn't coming from the harware >> port. It is raw data in the form of an oscilloscope data dump. >> Basically 25,000 data words of 8-bits each where a threshold needs to >> be set to turn this into high-low digital data, then the frames need >> to be found according to start/stop bits and the result output as ASCII. >> >> Similar to morse code decoding, just that instead of morse code it's >> RS232 data. Or in my case RS485 but it's the same thing. >> > > "Tomorrow" is a pretty tight deadline I'd have to charge a lot for but > if you can post a set of example data I could whip up a softwares that > might be usable for next time for 'bout $0 >
Thanks, but I can't post that publicly. One engineer from the UK wrote me a PM and wants to take a stab at it in Excel. I sent him a recorded CSV file. I don't yet have the data format info, probably one start and one stop bit though I won't know for sure until tomorrow. I can do this one using the old ruler and conting method, hoping I'll never need to do this again for the rest of my life. It just puzzles me that there isn't any software out there for such a decoding. I can't be the only one with an older DSO. Probably this can be done in VBA for Excel but it's been more than a decade since I tried anything like that and I am not really a programmer. -- Regards, Joerg http://www.analogconsultants.com/
On Sunday, January 20, 2019 at 6:06:40 PM UTC-5, Joerg wrote:
> On 2019-01-20 14:49, bitrex wrote: > > On 01/20/2019 05:26 PM, Joerg wrote: > >> On 2019-01-20 13:54, Sjouke Burry wrote: > >>> On 20-1-2019 22:51, Sjouke Burry wrote: > >>>> On 20-1-2019 21:52, Joerg wrote: > >>>>> Is there a simple Windows or Linux program that can decode serial data > >>>>> out of raw data from an digital oscilloscope? > >>>>> > >>>>> My old logic analyzer does not have any serial data decoding and > >>>>> neither > >>>>> does my scope. So I'd need something that can take in the ADC raw > >>>>> data, > >>>>> I set a threshold to turn that into H/L digital values and the > >>>>> software > >>>>> would fish out the data words. Not sure if it even exist. Not > >>>>> something > >>>>> expensive because I'll only need it once for a short time, to find if > >>>>> there's a bug visible in the data. It'll be a challenge because my > >>>>> scope > >>>>> only has 25,000 points recording length. > >>>>> > >>>> For reading/writing the hardware ports, (for me in DOS) you > >>>> can download my code. > >>>> The exe can be loaded on both sides of a nul modem connection, > >>>> and gives both screen access to the oher computer. > >>>> > >>>> It uses the hardware buffer in the rs232 chip, no interrupt used. > >>>> > >>> Sorry, I forgot the link.> http://home.planet.nl/~burry004/COMPORT.ZIP > >>> > >> > >> Thanks, Sjouke, but unfortunately this isn't coming from the harware > >> port. It is raw data in the form of an oscilloscope data dump. > >> Basically 25,000 data words of 8-bits each where a threshold needs to > >> be set to turn this into high-low digital data, then the frames need > >> to be found according to start/stop bits and the result output as ASCII. > >> > >> Similar to morse code decoding, just that instead of morse code it's > >> RS232 data. Or in my case RS485 but it's the same thing. > >> > > > > "Tomorrow" is a pretty tight deadline I'd have to charge a lot for but > > if you can post a set of example data I could whip up a softwares that > > might be usable for next time for 'bout $0 > > > > Thanks, but I can't post that publicly. One engineer from the UK wrote > me a PM and wants to take a stab at it in Excel. I sent him a recorded > CSV file. I don't yet have the data format info, probably one start and > one stop bit though I won't know for sure until tomorrow. > > I can do this one using the old ruler and conting method, hoping I'll > never need to do this again for the rest of my life. > > It just puzzles me that there isn't any software out there for such a > decoding. I can't be the only one with an older DSO. > > Probably this can be done in VBA for Excel but it's been more than a > decade since I tried anything like that and I am not really a programmer.
I am sure it is available somewhere. It's not really a hard coding problem. If you know the baud rate in terms of the sample rate the problem is easy in one pass. If you don't know the baud rate that is easy enough to find with an initial pass then a second pass to decode the data. If you want to email me a piece large enough to play with I'm willing to take a stab at it tonight. A software UART is the easy part and I know there are lots of them available. It just needs to be coupled to the CSV data input or whatever you can provide. Oh, yeah, and do you know the serial port format? 8 bits, no parity, 1 stop? Rick C. - Get 6 months of free supercharging - Tesla referral code - https://ts.la/richard11209