Author Topic: serial terminal hex time stamped  (Read 4375 times)

0 Members and 1 Guest are viewing this topic.

Offline stern0m1Topic starter

  • Contributor
  • Posts: 44
  • Country: us
serial terminal hex time stamped
« on: August 26, 2018, 03:59:42 pm »
Hi,
Im looking for a serial terminal for windows that display and sends the raw bytes in hex with each byte time stamped.
Any ideas?
The most I could find was Realterm but I dont see how to time stamp each byte.
Thanks
 

Offline TomS_

  • Frequent Contributor
  • **
  • Posts: 845
  • Country: gb
Re: serial terminal hex time stamped
« Reply #1 on: August 26, 2018, 04:39:00 pm »
I get the feeling that this is quite a specialised requirement. I dont think there are too many out there that need such a fine grained record of every byte. Strings of text, e.g. those ending in CRLF style terminations maybe, but byte wise is pretty unusual.

Perhaps you would need to write your own custom terminal to do precisely this. I know for a fact that you should be able to get something going within a very short period of time using Visual Basic - the serial port library is very easy to use.

Give it a go.
 

Online ajb

  • Super Contributor
  • ***
  • Posts: 2652
  • Country: us
Re: serial terminal hex time stamped
« Reply #2 on: August 26, 2018, 11:18:34 pm »
HTerm will do timestamps, and can display Hex, Dec, Bin, and Ascii.  It hasn't been updated since 2008, but it works fine on Win10, and is still my preferred terminal actually.

However, it won't timestamp every byte.  How precise are you looking to get with these timestamps, and what data rate are you receiving at?  I think there's going to be a significant limit to what you can achieve at the OS level, especially if using a USB serial interface, where each transaction is generally going to be several bytes long.

If you need better precision and the data rate isn't too crazy, you could use an MCU with a UART and a hardware timer to capture timestamps for every byte and then package that data up to go to the PC in whatever format you want (USB CDC examples are readily available for most USB-enabled MCUs, or you could even fire the data out another UART port).
 
The following users thanked this post: r0d3z1

Offline r0d3z1

  • Regular Contributor
  • *
  • Posts: 116
  • Country: it
Re: serial terminal hex time stamped
« Reply #3 on: November 13, 2021, 01:53:43 pm »
HTerm really save me a lot of time thanks.
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: serial terminal hex time stamped
« Reply #4 on: November 14, 2021, 11:24:35 am »
Actually, there are some tradeoffs between using a desktop hard UART and a USB UART.
What you want generally is to get all the contiguous bytes in one chunk and anything separated with a gap in another chunk.
That's going to be difficult with a desktop OS hard UART.
With a USB UART there is a limit of buffer size and breaking long chunks into multiple chunks.

The FTDI USB UART has a variable timeout to identify a gap.
It can be set in milliseconds with FTDI_SET_LATENCY_TIMER vendor-specific USB control request.
In Linux, that makes it:
Code: [Select]
   struct serial_struct serial;
   code=ioctl(fd, TIOCGSERIAL, &serial);
   serial.flags|=ASYNC_LOW_LATENCY;
   code=ioctl(fd, TIOCSSERIAL, &serial);

I rolled my own fake FTDI UART once with a latency timer of 200 µS for Modbus at 115.2k.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10023
  • Country: nz
Re: serial terminal hex time stamped
« Reply #5 on: November 14, 2021, 11:28:31 am »
Keep in mind that windows doesn't send serial bytes one at a time or as you write them out from your app.
There is a buffer, when the buffer is full the entire buffer is sent over serial as one block.
There is also a timeout on the buffer, if some time has passed and data in the partially full buffer is getting old then the buffer is sent anyway.
At least that is usually how it works, various USB serial drivers and apps can work a bit different

Maybe what you really need is a USB logic analyzer. That will decode your serial bytes and tell you exactly when they were sent


« Last Edit: November 14, 2021, 11:34:42 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 
The following users thanked this post: OliverH

Offline OliverH

  • Newbie
  • Posts: 1
  • Country: de
Re: serial terminal hex time stamped
« Reply #6 on: March 10, 2022, 08:42:12 pm »
Quote
Im looking for a serial terminal for windows that display and sends the raw bytes in hex with each byte time stamped. Any ideas?

On Windows, Docklight can do that with accurate time stamps. It can also insert inter-character delays, but as the previous posters wrote, for modern USB-based connectivity it doesn't mean the data was on the serial line with this exact timing.

On Windows, the mentioned FTDI_SET_LATENCY_TIMER can be set in the Device Manager: Run devmgmt.msc, go to your COM port Properties, then Advanced, and set the "Latency Timer" to the minimum value 1.

The screenshots show a small loopback test I just made with an FTDI-based USB-to-RS232 and increasing delay between the TX characters: 10ms, 20ms, 30ms, 40ms, 50ms. Only with >= 30 ms delays the characters are received individual bytes.

For any precision-timing for transmitting data, I'd probably use a pyboard, Arduino or something. For any precise level & byte/bit timing diagnostics, the wonderful Picoscope!
« Last Edit: March 10, 2022, 08:44:04 pm by OliverH »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5970
  • Country: de
Re: serial terminal hex time stamped
« Reply #7 on: March 10, 2022, 08:44:45 pm »
I have a feeling that the OP has solved the problem after five months...

But interesting that one of the developers of Docklight is called:
Oliver Heggelbacher.
How low can you go?
« Last Edit: March 10, 2022, 08:49:46 pm by Benta »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7118
  • Country: ca
Re: serial terminal hex time stamped
« Reply #8 on: March 10, 2022, 08:54:44 pm »
What is so low? I don't understand. Is it referring to the product at https://docklight.de/ ?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5970
  • Country: de
Re: serial terminal hex time stamped
« Reply #9 on: March 10, 2022, 10:03:13 pm »
What is so low? I don't understand. Is it referring to the product at https://docklight.de/ ?

Well:
one post.
old thread.
OliverH(eggelbacher) plugs own product?

How desperate can you get?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf