From: Paul Keinanen on
On Sun, 20 Jun 2010 18:34:48 -0500, "rowan.bradley"
<rowan(a)n_o_s_p_a_m.sylvester-bradley.org> wrote:

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

Typically the UART requires a clock that is 16x the baud rate, thus,
for 62.5 kBaud, the crystal frequency would have to be multiple of 1
MHz.

Take some ISA/PCI UART board and replace the crystal (oscillator) with
one that oscillates on some exact MHz close to the original frequency
and adjust the divisor accordingly.


From: Anders on
On 10-06-20 16:34, 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

This little widget has proven *very* valuable to me:
http://www.saleae.com

I do a lot of communications development/debugging, and this thing is
FANTASTIC (no, I'm not affiliated with Saleae - just a happy customer ;)

</A>
From: Rowan Sylvester-Bradley on
Thanks for all the helpful replies. I'm coming to the following conclusions:
- Windows can't do what I want, or at least not without a huge amount of
work trying to get the most accurate timestamps possible, and even then it
would be only barely good enough.
- I could possibly do it on a PC with MSDOS, but I would effectively be
programming it as a microprocessor.
- The standard ISA or motherboard serial port can't do 62,500 baud.
- I'm therefore best to use a simple free standing PCB with a
microprocessor with a RTC and two serial ports capable of flexible baud
rates. One runs at 62,500 baud and receives the characters from the RS485
bus. The other runs at 115,200 baud or higher and sends to the PC. The
receive interrupt handler receives the bytes, timestamps them and writes
them into a buffer. The main program reformats the bytes and timestamps in a
form suitable for the PC and writes them into an output buffer. The send
interrupt handler sends them to the PC.

So long as the PC can keep up, either because the baud rate is high enough
or because there are sufficient gaps in the incoming data for the buffers to
empty (in practice the data comes in short bursts with gaps between so with
decent sized buffers this won't be a problem).

One other thing I learned - the Saleae logic analyser looks a really
interesting device for a very good price - I think I may get one of those...

Thanks again for a valuable discussion - Rowan


From: Peter Greuter on
Hello

Le Tue, 22 Jun 2010 10:33:29 +0100, "Rowan Sylvester-Bradley"
<rowan(a)sylvester-bradley.org> a �crit :

.....

> - The standard ISA or motherboard serial port can't do 62,500 baud.

I am surprised that nobody reacted to this statement : as always it
depends a lot on the programs involved ! But for instance under
MS-DOS it is possible to reprogram the baudrate divider of a
typical 16X50 UART by sending just two bytes to two output port
registers after the initialisation sequence to get more than the
standard baudrates. The {COMMO} communication program by Fred P.
Brucker included this possibility in the later version in the setup
part.

Kind regards from France

Peter Greuter
--
my oldies at http://www.teaser.fr/u/pgreuter/albumel.htm
From: Tauno Voipio on
On 22.6.10 1:35 , Peter Greuter wrote:
> Hello
>
> Le Tue, 22 Jun 2010 10:33:29 +0100, "Rowan Sylvester-Bradley"
> <rowan(a)sylvester-bradley.org> a �crit :
>
> ....
>
>> - The standard ISA or motherboard serial port can't do 62,500 baud.
>
> I am surprised that nobody reacted to this statement : as always it
> depends a lot on the programs involved ! But for instance under
> MS-DOS it is possible to reprogram the baudrate divider of a
> typical 16X50 UART by sending just two bytes to two output port
> registers after the initialisation sequence to get more than the
> standard baudrates. The {COMMO} communication program by Fred P.
> Brucker included this possibility in the later version in the setup
> part.


Forget the PC.

62500 bit/s needs a raw clock of 1.000 MHz, which is not available
by any integer divider from 18.432 MHz (even less from the old
1.8432 MHz crystal).

MS-DOS in no solution, either. It uses BIOS for I/O, and the BIOS
contains so long interrupt disables that the required timing
resolution is not reliably available.

--

Tauno Voipio
tauno voipio (at) iki fi