1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Re: Monitor RS232 comms with millisecond resolution

Discussion in 'Embedded' started by Jon Kirwan, Jun 21, 2010.

  1. Jon Kirwan

    Jon Kirwan Guest

    On Sun, 20 Jun 2010 18:34:48 -0500, "rowan.bradley"
    <rowan@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!
    >
    >If possible I'd like it to run at a non-standard baud rate (62,500 baud).


    I'm not sure an IBM PC uart can run at that rate. I think
    57600 is doable, though. Something that bothers me about
    your request is this 1ms resolution. At 62500 bps, one stop
    and one start, this is 6250 cps. That works out to 160us per
    character. Yet you don't seem to __require__ better than 1ms
    resolution? (I do read you saying that you'd like better.)

    Okay. None of that really helps. The IBM PC is everywhere,
    so I understand that desire. But I don't think you can nail
    the rate at 62500. If you can use 57600, I think that works
    on the PC. There is a 16-bit timer on the PC. It doesn't
    interrupt fast enough for you, but you can read it when the
    characters arrive. So if you use DOS, write in assembly
    code, can accept the 57600 bps rate, then it's doable. I
    keep new boxes of DOS 5.0 laying about and 80386 and 80486
    machines here with nice ISA buses, just for doing stuff like
    this. But you may not have them. And new PCs seem to be
    avoiding RS-232 ports more and more.

    USB would barely get you by (one of those USB to RS-232
    things), as I believe the max 'pace' is 1ms there. (I don't
    know USB that well, but I disagree with Paul on this subject
    unless you dig _really_ deep into the USB VxD level of
    stuff.) In general, I don't know how closely you can track
    it through through the HID driver and all of the Windows
    layers. I'd probably avoid it, imagining the work there to
    be way too much to bite off for too little potential.

    Which gets to either someone's device you can buy -- you've
    already looked -- or else something you pony up. I'd wire
    something up from crap I have around here. Some don't have
    the level shifters, but you are only looking to receive, not
    send, so you can easily use a BJT and a few resistors there
    (cheap and easy.) Software is extra, of course.

    If you did have one of those USB-RS232 units and could wire
    up to it (I got one included in the $24 MSP430 Chronos kit I
    bought, for example), you might choose a micro with two UARTS
    and wire one of them to the USB-RS232 connector and send
    serial data in that direction that includes the received
    characters and their time stamps for logging onto the PC and
    wire the other one to monitor your 62500 bps line. Add time
    stamps and send to the USB side. Not too much software that
    way and you have a huge data logger, then. (You didn't
    mention how much data must be logged, which is yet another
    potential problem.)

    Jon
     
    1. Advertising

  2. Fred

    Fred Guest

    Last time on comp.arch.embedded, Jon Kirwan <>
    said:

    >>If possible I'd like it to run at a non-standard baud rate (62,500 baud).

    >
    >I'm not sure an IBM PC uart can run at that rate.


    It could if you're willing to change the crystal on the UART card...
     
    1. Advertising

  3. Jon Kirwan

    Jon Kirwan Guest

    On Thu, 24 Jun 2010 21:27:15 -0700, Fred <>
    wrote:

    >Last time on comp.arch.embedded, Jon Kirwan <>
    >said:
    >
    >>>If possible I'd like it to run at a non-standard baud rate (62,500 baud).

    >>
    >>I'm not sure an IBM PC uart can run at that rate.

    >
    >It could if you're willing to change the crystal on the UART card...


    Yeah. I think that has been mentioned in this thread
    about... 20 times already?

    And have you actually done this on a modern PC?

    In any case, I haven't looked recently, but few PCs these
    days seem to sport RS-232 or RS-485 ports. For those that
    may, high integration on the board may not make it it so
    easy. I believe the ones old enough to actually have a south
    bridge probably use a super I/O chip or have it integrated
    into the south bridge along with the APIC and perhaps have
    some divider used to get the "pc standard" rates created. It
    all has to look like an ISA dohicky or old software won't
    work right. PCI boards also exist and they have drivers that
    are probably Windows-standard, too, but then that is a whole
    other thing to worry about and I'm not sure how the WinOldAp
    or NTVDM emulates the old chips into the DOS boxes.

    It's been a long time since I looked, but unless I heard
    directly from someone who has achieved this with a new PC
    system, I'd be skeptical of a claim about it being easy to
    do.

    Maybe someone has and can fill us in about it.

    Jon
     
  4. Fred

    Fred Guest

    Last time on comp.arch.embedded, Jon Kirwan <>
    said:

    >On Thu, 24 Jun 2010 21:27:15 -0700, Fred <>
    >wrote:
    >
    >>Last time on comp.arch.embedded, Jon Kirwan <>
    >>said:
    >>
    >>>>If possible I'd like it to run at a non-standard baud rate (62,500 baud).
    >>>
    >>>I'm not sure an IBM PC uart can run at that rate.

    >>
    >>It could if you're willing to change the crystal on the UART card...

    >
    >Yeah. I think that has been mentioned in this thread
    >about... 20 times already?


    I only saw one other mention; somehow I missed the other 19.

    >And have you actually done this on a modern PC?


    Not on a PC motherboard, but I have done it on an expansion card.

    >In any case, I haven't looked recently, but few PCs these
    >days seem to sport RS-232 or RS-485 ports.


    Just the other day I bought a 2-port RS-232 PCI expansion card. Cost
    me $17 at a local retail store, but you can get the same card online
    for ~$12.

    >It's been a long time since I looked, but unless I heard
    >directly from someone who has achieved this with a new PC
    >system, I'd be skeptical of a claim about it being easy to
    >do.
    >
    >Maybe someone has and can fill us in about it.


    The card I just bought has a normal-looking, through-hole-mounted
    crystal on it. Even a software guy like me could swap it out.
     
  5. Jon Kirwan

    Jon Kirwan Guest

    On Fri, 25 Jun 2010 22:15:39 -0700, Fred <>
    wrote:

    >Last time on comp.arch.embedded, Jon Kirwan <>
    >said:
    >
    >>On Thu, 24 Jun 2010 21:27:15 -0700, Fred <>
    >>wrote:
    >>
    >>>Last time on comp.arch.embedded, Jon Kirwan <>
    >>>said:
    >>>
    >>>>>If possible I'd like it to run at a non-standard baud rate (62,500 baud).
    >>>>
    >>>>I'm not sure an IBM PC uart can run at that rate.
    >>>
    >>>It could if you're willing to change the crystal on the UART card...

    >>
    >>Yeah. I think that has been mentioned in this thread
    >>about... 20 times already?

    >
    >I only saw one other mention; somehow I missed the other 19.


    I believe I saw several different people mention the
    possibility and more still accepting the point and referring
    to it.

    >>And have you actually done this on a modern PC?

    >
    >Not on a PC motherboard, but I have done it on an expansion card.


    The comment of mine that you quoted was "I'm not sure an IBM
    PC uart can run at that rate." Note that I wasn't discussing
    expansion cards.

    >>In any case, I haven't looked recently, but few PCs these
    >>days seem to sport RS-232 or RS-485 ports.

    >
    >Just the other day I bought a 2-port RS-232 PCI expansion card. Cost
    >me $17 at a local retail store, but you can get the same card online
    >for ~$12.


    I wasn't discussing expansion cards.

    >>It's been a long time since I looked, but unless I heard
    >>directly from someone who has achieved this with a new PC
    >>system, I'd be skeptical of a claim about it being easy to
    >>do.
    >>
    >>Maybe someone has and can fill us in about it.

    >
    >The card I just bought has a normal-looking, through-hole-mounted
    >crystal on it. Even a software guy like me could swap it out.


    I wasn't discussing expansion cards.

    Jon
     
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tremend0us
    Replies:
    3
    Views:
    387
    Asestar
    Mar 5, 2004
  2. Reader
    Replies:
    6
    Views:
    403
    Victek
    Oct 25, 2007
  3. Oliver Betz
    Replies:
    1
    Views:
    244
  4. Stefan Brröring
    Replies:
    9
    Views:
    226
    Stefan Brröring
    Jul 6, 2010
  5. Rowan Sylvester-Bradley

    Re: Monitor RS232 comms with millisecond resolution

    Rowan Sylvester-Bradley, Jun 22, 2010, in forum: Embedded
    Replies:
    38
    Views:
    914
    Jon Kirwan
    Jun 25, 2010
Loading...

Share This Page