timestamping in UART

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

Currently we are investigating whether we can use a Rabbit RCM3200 uC
to read in data on 4 serial ports (at 115200) and to write it to an
UDP port. The Rabbit only has a 1 byte 'FIFO', so it is most likely we
need an external UART. A complicating factor is that we need to
timestamp (1 byte) every single byte that is received.

What type/brand of UART do you guys advice and is it possible to write
this timestamp byte into the FIFO directly?

Any suggestion is most welcome.


Re: timestamping in UART
One possibility is to use a UART and a FIFO combined implemented
in an FPGA. The FIFO would be wide enough to store the character
and a timestamp. The width of the timestamp counter would depend
on the resolution needed.

At 115200 bps, characters could arrive every 86.8 microseconds or
so per UART. Multiply this by 4 receive streams and you get 21.7us.
This would be tough to do on a sustained basis, depending on the
processor and structure of your program.

Darcy Roberts

kotido wrote:
Quoted text here. Click to load it

Re: timestamping in UART
Quoted text here. Click to load it

 To timestamp correctly you need _NO_ HW fifo on RX, and
a fast SW routine that grabs the RXchar, and TimeByte,
and puts BOTH into a SW FIFO.
 Once the info is in the (4) FIFOs, unloading it
becomes an average data rate/packet size problem,
and the hard real time has been taken care of.


Re: timestamping in UART
I have written a timestamped serial acquisition
routine (only 2 serial ports was needed, though)
and I can safely tell you that off the shelf UARTs
can't do the timestamping -- it's the ISR that can
attach a timestamp to the data received.   I'm not
sure what 1 byte can do for you, I was attaching
a 16 bit tick (from the 8054) and a 24 bit time
from the BIOS timer.

I can think of  two HW solutions:
a) custom UART made out of an FPGA that does
time stamping
b) a regular UART with a dedicated uC that
can read and timestamp data very quickly and
reliably, then pass them to the host PC

though my favorite is
c) a DOS PC with my own proggy  ;-)

Quoted text here. Click to load it

Re: timestamping in UART
simplest way is I think: 4 ring buffers, ones will are filled by
hardware interrupt only received byte+timestamp; process(to UDP or
else) its in main loop by difference poiters for "for input" & "for


Site Timeline