RS232 decode routines from raw scope data?

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/
Reply to
Joerg
Loading thread data ...

get a cheap logic usb analyser?

formatting link
ok-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?

Reply to
Lasse Langwadt Christensen

That sure would ne nice but I have to do this tomorrow.

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.

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/
Reply to
Joerg

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.

Reply to
Sjouke Burry

Sorry, I forgot the link.>

formatting link

Reply to
Sjouke Burry

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/
Reply to
Joerg

"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

Reply to
bitrex

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
Reply to
John Larkin

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/
Reply to
Joerg

ata

if

P

I.

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 eas y 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 t o 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 availabl e. It just needs to be coupled to the CSV data input or whatever you can p rovide. Oh, yeah, and do you know the serial port format? 8 bits, no pari ty, 1 stop?

Rick C.

- Get 6 months of free supercharging - Tesla referral code -

formatting link

Reply to
gnuarm.deletethisbit

sigrok-pulseview/all

do you have a sample file?

Reply to
Lasse Langwadt Christensen

On Jan 20, 2019, Joerg wrote (in article ):

CSV is a standard database forms. Many MathCad programs will accept CSV, such as Mathematica, Matlab, and of course MS Excel.

Excel will plot results, and actually has a FFT function, so Excel may be your only choice given the one-day limit.

Joe Gwinn

Reply to
Joseph Gwinn

formatting link
?

Tons of examples of software decode for embedded platforms, might take longer to refactor for a data series than to write one new though?

I'd gladly write one say in JavaScript and put it up on my website for all to use, but I don't need one, and I'm guessing you don't have the time/budget to do that on request.

Well, such is life :)

Tim

-- Seven Transistor Labs, LLC Electrical Engineering Consultation and Design Website:

formatting link

Reply to
Tim Williams

How abot sending it out the sound card and into a rs232 input and reading it ito Procomm or some DOS/Win serial program. You'll need to get the timing right for the baud rate to get it to work.

Cheers

Reply to
Martin Riddle

Joerg, from memory, RS-232 uses inverted logic and I think it is transmitte d LSB first. You'll definitely want to verify that before you get too far along.

Also, on your scope output, are the 25k samples synchronized (for lack of a better work) to the baud rate of the serial message? Or do you have a sit uation where you might have dozen of scope readings in the CSV file corresp onding with the single high (or low) transition of an individual bit of the serial message?

If the latter,... Ugh! Still manageable, but adds an extra layer of complexity to the task.

FWIW: A cheap RIGOL scope ($350-ish USD) can be had with built-in RS232 de coding, among other popular format. Not sure how deep the recording is, th ough since I've never really used that feature past a few dozen or so chara cters.

I sort of like the Martin's idea of running the file through a sound card o r maybe even a modem, and recover the data using a dumb terminal or termina l emulator (i.e., putty). If you ignore all the error correction, in the e nd it's just tones.

I wonder if there's a program out there that will decode RS232 when present ed as a wav or mp3 file?

Reply to
mpm

squirt it out the sound card, amplify it, schmitt it, and pull it back in through the UART.

else you'll need to write a software uart.

--
  When I tried casting out nines I made a hash of it.
Reply to
Jasen Betts

Sigrok can do it.

formatting link
That software supports cheap USB logic analysers (I know you don't have one, so no good for this time, but you should spend the $6.86 so that you have one ready for next time):
formatting link
I understand that Sigrok also supports many DSOs, and may support the one that you have, or some intermediate format that you can save to.

It is a while since I installed Sigrok (on linux). I seem to recall needing a fairly recent version of linux and Sigrok, though I didn't have to build anything from source. It was a pain to set up, but saved me a lot of time in the end. I think I used a nightly build appimage:

formatting link

Reply to
Chris Jones

It comes in the form of logic level inside a circuit. I can try to whip up some sauerkraut electronics to transfer that to bipolar RS232. One of the wee challenges would be to sync two streams, TX and RX. With a scope that's easy, I can just trigger on an event on the TX line and record what RX responds with.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

I just sent you one. Essentially a 25,000 sample run at a high enough rate from the scope.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

I'll probably do it by hand. For a non-programmer like me that's usually faster than trying to learn VBA and writing code.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

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.