Motherboard Forums


Reply
Thread Tools Display Modes

Re: Monitor RS232 comms with millisecond resolution

 
 
Jon Kirwan
Guest
Posts: n/a
 
      06-21-2010, 07:55 AM
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
 
Reply With Quote
 
 
 
 
Fred
Guest
Posts: n/a
 
      06-25-2010, 04:27 AM
Last time on comp.arch.embedded, Jon Kirwan <(E-Mail Removed)>
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...
 
Reply With Quote
 
 
 
 
Jon Kirwan
Guest
Posts: n/a
 
      06-25-2010, 11:02 AM
On Thu, 24 Jun 2010 21:27:15 -0700, Fred <(E-Mail Removed)>
wrote:

>Last time on comp.arch.embedded, Jon Kirwan <(E-Mail Removed)>
>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
 
Reply With Quote
 
Fred
Guest
Posts: n/a
 
      06-26-2010, 05:15 AM
Last time on comp.arch.embedded, Jon Kirwan <(E-Mail Removed)>
said:

>On Thu, 24 Jun 2010 21:27:15 -0700, Fred <(E-Mail Removed)>
>wrote:
>
>>Last time on comp.arch.embedded, Jon Kirwan <(E-Mail Removed)>
>>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.
 
Reply With Quote
 
Jon Kirwan
Guest
Posts: n/a
 
      06-26-2010, 08:01 AM
On Fri, 25 Jun 2010 22:15:39 -0700, Fred <(E-Mail Removed)>
wrote:

>Last time on comp.arch.embedded, Jon Kirwan <(E-Mail Removed)>
>said:
>
>>On Thu, 24 Jun 2010 21:27:15 -0700, Fred <(E-Mail Removed)>
>>wrote:
>>
>>>Last time on comp.arch.embedded, Jon Kirwan <(E-Mail Removed)>
>>>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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Monitor RS232 comms with millisecond resolution Stefan Brröring Embedded 9 07-06-2010 04:16 PM
Re: Monitor RS232 comms with millisecond resolution Rowan Sylvester-Bradley Embedded 38 06-24-2010 11:32 PM
Re: Monitor RS232 comms with millisecond resolution Oliver Betz Embedded 1 06-21-2010 11:12 AM
Graphic Card Resolution vs. Monitor Resolution Reader Nvidia 6 10-25-2007 04:02 AM
Hercules AIW 9000 Pro 64 - Monitor resolution and software resolution don't match tremend0us ATI 3 03-05-2004 04:39 PM


All times are GMT. The time now is 06:12 PM.


Welcome!
Welcome to Motherboard Point
 

Advertisment