Prev: MAKE UPTO $5000 PER MONTH! $2000 IN FIRST 20 DAYS!
Next: Dexcel Electronics Designs is Hiring in Chennai
From: rowan.bradley on 20 Jun 2010 19:34 Anyone know the quickest or easiest way of recording a serial data stream and timestamping each byte with a resolution of at least 1ms (preferably finer)? I can only find cheap or free programs with less resolution, or very expensive solutions, often involving special hardware. I only need to monitor one port, and I don't need to send any characters (actually I'm snooping on an RS485 bus). I'm prepared to use an old PC with a "real" serial port, run MSDOS, Linux or whatever other OS will do the job, use some sort of microprocessor to capture the data (preferably one I'm familiar with, such as 8051 family or PIC) or anything else so long as it's quick and cheap. I just need to get the job done, preferably tomorrow! If possible I'd like it to run at a non-standard baud rate (62,500 baud). Thanks - Rowan --------------------------------------- Posted through http://www.EmbeddedRelated.com
From: Grant Edwards on 20 Jun 2010 20:08 On 2010-06-20, rowan.bradley <rowan(a)n_o_s_p_a_m.sylvester-bradley.org> wrote: > Anyone know the quickest or easiest way of recording a serial data > stream and timestamping each byte with a resolution of at least 1ms > (preferably finer)? I can only find cheap or free programs with less > resolution, or very expensive solutions, often involving special > hardware. > > I only need to monitor one port, and I don't need to send any > characters (actually I'm snooping on an RS485 bus). > > I'm prepared to use an old PC with a "real" serial port, run MSDOS, > Linux or whatever other OS will do the job, use some sort of > microprocessor to capture the data (preferably one I'm familiar with, > such as 8051 family or PIC) or anything else so long as it's quick > and cheap. I just need to get the job done, preferably tomorrow! Greeleaf used to sell a serial data analyzer program for DOS. It even came with a Y-cable so that you could monitor two data lines. In my experience, it's either that or something hardware-based. If you find a good solution let us know. > If possible I'd like it to run at a non-standard baud rate (62,500 baud). -- Grant
From: Paul Probert on 20 Jun 2010 22:31 On 06/20/2010 06:34 PM, rowan.bradley wrote: > Anyone know the quickest or easiest way of recording a serial data stream > and timestamping each byte with a resolution of at least 1ms (preferably > finer)? I can only find cheap or free programs with less resolution, or > very expensive solutions, often involving special hardware. > > I only need to monitor one port, and I don't need to send any characters > (actually I'm snooping on an RS485 bus). > > I'm prepared to use an old PC with a "real" serial port, run MSDOS, Linux > or whatever other OS will do the job, use some sort of microprocessor to > capture the data (preferably one I'm familiar with, such as 8051 family or > PIC) or anything else so long as it's quick and cheap. I just need to get > the job done, preferably tomorrow! > > If possible I'd like it to run at a non-standard baud rate (62,500 baud). > > Thanks - Rowan > > --------------------------------------- > Posted through http://www.EmbeddedRelated.com If I had to do it I would grab a serial to USB board such as DLP Designs sells (has an ftdi chip on it). Then get a dev board with an atmega128 (or any micro with 2 serial ports). Hook up the rs485 to a transceiver such as a 75176, then to one of the micro's serial ports. The other port you connect to your usb board. Write a small program that receives the bytes, adds the timestamp, then writes it out over the second port (which you can run at a few hundred kilobaud to keep up). On the pc side, my favorite way to do it is to write a python program, using pyserial to read the port. This can easily keep up with 1 megabaud on a reasonable PC. This system would be able to generate the timestamp within a few microseconds of the byte's arrival, limited by your micro's (and C compiler's, if you use C) interrupt latency. Paul Probert
From: Chris Burrows on 20 Jun 2010 23:20 "rowan.bradley" <rowan(a)n_o_s_p_a_m.sylvester-bradley.org> wrote in message news:EpmdnWB348YFOIPRnZ2dnUVZ_qGdnZ2d(a)giganews.com... > Anyone know the quickest or easiest way of recording a serial data stream > and timestamping each byte with a resolution of at least 1ms (preferably > finer)? How much data do you need to store at a time? >, use some sort of microprocessor to > capture the data (preferably one I'm familiar with, such as 8051 family or > PIC) If I was doing it I would use a low-cost (< $100) off-the-shelf ARM development board - but that is because I could program it much more quickly and easily than an 8051 or a PIC as I already have most of the code written. > or anything else so long as it's quick and cheap. define 'cheap' > I just need to get > the job done, preferably tomorrow! > Doesn't sound too difficult - unless I'm missing something? > If possible I'd like it to run at a non-standard baud rate (62,500 baud). > I'm not certain that is possible with what I have in mind but am optimistic. -- Chris Burrows CFB Software Astrobe: ARM Oberon-07 Development System http://www.astrobe.com
From: Paul Keinanen on 21 Jun 2010 00:39
On Sun, 20 Jun 2010 18:34:48 -0500, "rowan.bradley" <rowan(a)n_o_s_p_a_m.sylvester-bradley.org> wrote: > >I'm prepared to use an old PC with a "real" serial port, run MSDOS, Linux >or whatever other OS will do the job, use some sort of microprocessor to >capture the data (preferably one I'm familiar with, such as 8051 family or >PIC) or anything else so long as it's quick and cheap. I just need to get >the job done, preferably tomorrow! You can get quite accurate time stamps by disabling the UART FIFO and assuming you are on a Pentium or newer processor with the RDTSC instruction, read the Time Stamp Counter in the Rx interrupt routine, first put the received byte in the software Rx queue, followed by 8 bytes from the TSC. On the user mode side, read 9 bytes at a time, the first being the actual byte received, the rest the time stamp. To convert the TSC to milliseconds, you have to know (or measure) the CPU clock frequency. With the UART FIFO disabled, the maximum baud rate depends on the interrupt latency of the system, e.g. for how long the interrupts are disabled. Also some peripherals (such as graphic cards, ethernet or IDE controllers) may effectively block interrupts for a long time, however, the situation has improved a lot since the 1990's. |