Test and Measurement Forum

UART Serial decoding - invert data

Forum for discussing PicoScope version 6 (non-automotive version)

UART Serial decoding - invert data

Postby Moonwalker » Tue Feb 11, 2014 6:56 pm

Is it possible to invert data in serial decoding?

I have attached a screen shot of my problem. The decoded data is showing 03,20.... while it must be 3F,FD... So the bits are inverted. I tried selecting Idel State as Low Voltage but then the decoding is not done correctly.
Any help?
Attachments
PicoUART2.jpg
Last edited by Moonwalker on Wed Feb 12, 2014 1:36 pm, edited 1 time in total.
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby Martyn » Wed Feb 12, 2014 9:08 am

If the signal is meant to be 3F,FD and not 03,20 then it looks like you are measuring it upside down.

This can be corrected in the software by applying a maths channel invert function to the signal, go to Tools->MathsChannels and select Invert A. You can then decode the maths channel, not the actual channel, but remembering that you will need to set Idle State low.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Postby Moonwalker » Wed Feb 12, 2014 1:28 pm

I tried the Math Invert channel and it still gives same reading.
The decoding is reading the Idle state as 1 and the other state as 0. How can this be inverted?
Attachments
PicoUART3.jpg
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby Moonwalker » Wed Feb 12, 2014 1:30 pm

I tried the Math invert channel but I still got same result. The serial decoder is taking the idle state as 1 and the other state as 0. So how can this be inverted?
Attachments
PicoUART3.jpg
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby Martyn » Wed Feb 12, 2014 6:39 pm

Can you post the psdata file and I can try the settings for you.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Postby Moonwalker » Thu Feb 13, 2014 10:15 am

Here is the file. The bausrate is 13.2kbaud.
Attachments
Serial Pico1.psdata
(258.72 KiB) Downloaded 52 times
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby Martyn » Thu Feb 13, 2014 11:42 am

Just looking at the data and bringing on cursors, set at 13.2kbaud, stepping through suggests that the decoded value is correct for LSB at 03 for the first byte, or C0 for MSB, as the bit pattern is 11000000 with the signal idle state set to high.

To see this as 3F you would need to decode MSB not LSB, have the idle state as high but have 0.5V data bits representing 0 (low) and 0V bits representing 1 (high).

Do you have the full specification for the generated data stream ?
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Postby Moonwalker » Thu Feb 13, 2014 12:50 pm

This is the ATR from an Smartcard reader (TTL). The bit pattern should be inverted (00111111) giving a value of 3F (MSB first). But how can I change the bits so that Idle (hi) = 0 and Low = 1?
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby Martyn » Thu Feb 13, 2014 3:10 pm

We are working on a custom serial decoding option that will come out in a future beta release of the software. This has the feature to InvertPacketContent which may work for this situation. If you would like to try out an early version of this software please contact us at support@picotech.com
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Postby Moonwalker » Mon Feb 17, 2014 10:25 pm

I have been testing the beta version and the serial decoding now works fine- Thanks.

However the data on the graph shows too many details (instead of the Hex value only) which I cannot find how to suppress.

Another good option is to be able to export the serial data only to a text file instead of excel format only.
Attachments
PicoUART4.jpg
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby Martyn » Tue Feb 18, 2014 9:13 am

If you wish to post your xml file or code, or email using the previous ticket, together with a psdata file with some data in then we can take a look for you.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Postby Moonwalker » Tue Feb 18, 2014 9:35 am

I mean the serial UART decoder is now showing too much details under the waveform as seen in the picture. I guess this was done for debugging. So what I would like is to have it show only the hex value under the waveform.
I dont think you need a psdata file as this is easy to verify.
PS - I tried to modify the XML file to remove this but did not work.
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby Martyn » Tue Feb 18, 2014 10:32 am

This extra text has only just been removed from the standard release of the software, this version will hopefully be going live on the web next week.

The next version of Beta software, including improved custom serial decoding, will be available later.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Postby Moonwalker » Wed Feb 19, 2014 12:49 am

Thanks for the great support that you give and for always improving your products!
Moonwalker
Newbie
 
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Postby chrisjruiz » Fri Apr 18, 2014 4:35 pm

I think my question is answered in this forum, but just want to make sure. With the Picoscope software, I will be able to connect a TTL level serial data line (0v =logical 0, 5v = logical 1) to my Com Port Rx line and be able to view the serial stream? Also, can I specify any baud rate within the baud rate field or do I have to use predefined baudrates?
chrisjruiz
Newbie
 
Posts: 0
Joined: Fri Apr 18, 2014 4:27 pm

Next

Return to PicoScope 6 for Windows

Who is online

Users browsing this forum: No registered users and 1 guest