UART Serial decoding - invert data

Forum for discussing PicoScope version 6 (non-automotive version)
Moonwalker
Newbie
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

UART Serial decoding - invert data

Post by Moonwalker »

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.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Post by Martyn »

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 Support Manager

Moonwalker
Newbie
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Post by Moonwalker »

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

Post by Moonwalker »

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

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Post by Martyn »

Can you post the psdata file and I can try the settings for you.
Martyn
Technical Support Manager

Moonwalker
Newbie
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Post by Moonwalker »

Here is the file. The bausrate is 13.2kbaud.
Attachments
Serial Pico1.psdata
(258.72 KiB) Downloaded 495 times

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Post by Martyn »

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 Support Manager

Moonwalker
Newbie
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Post by Moonwalker »

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?

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Post by Martyn »

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 Support Manager

Moonwalker
Newbie
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Post by Moonwalker »

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

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Post by Martyn »

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 Support Manager

Moonwalker
Newbie
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Post by Moonwalker »

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.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: UART Serial decoding - invert data

Post by Martyn »

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 Support Manager

Moonwalker
Newbie
Posts: 0
Joined: Tue Feb 11, 2014 6:36 pm

Re: UART Serial decoding - invert data

Post by Moonwalker »

Thanks for the great support that you give and for always improving your products!

chrisjruiz
Newbie
Posts: 0
Joined: Fri Apr 18, 2014 4:27 pm

Re: UART Serial decoding - invert data

Post by chrisjruiz »

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?

Post Reply