From: LittleAlex on
On Dec 10, 3:28 pm, David Brown
<david.br...(a)hesbynett.removethisbit.no> wrote:
> Jujitsu Lizard wrote:
> > Hi,
>
> > I develop embedded software for a living. We need to instrument the
> > bidirectional serial interface between our product and a daughterboard
> > (containing its own microprocessor) so that we can have another piece of
> > software (which we write to run under XP or Vista) examine the serial
> > communication and look for logical errors.
>
> > It would seem most convenient for us to use two of those cheap
> > USB->Serial adapters and just wire them up so that only the receive
> > portion is used. One of the adapters would monitor the communication
> > from our product to the daughterboard, and the second adapter would
> > monitor communication going in the other direction.
>
> > Questions:
>
> > a)Is there a better approach (especially recognizing that we want
> > maximum portability and that very few laptops these days ship with one
> > let alone two serial ports)?
>
> > b)Will Windows keep up with 2 streams at 19,200 baud?
>
> > c)Are there any web pages that you've found especially helpful? I did
> > find this one:
>
> >http://msdn.microsoft.com/en-us/library/ms810467.aspx
>
> > Is this the correct API to use?
>
> > d)Are there any books or additional resources on this topic that you'd
> > recommend?
>
> > e)Our boards work at 3V, but I think serial communication is 12V by
> > specification. If anyone is aware of a commercial level-shifter so that
> > we don't need to build one ...
>
> > Thanks sincerely for the help,
> > The Lizard
>
> Try the FTDI FT2232D - it's a dual serial-to-usb converter, so you only
> need one device. You can buy a ready-made DLP-2232M-G module with the
> device, USB connector, and supporting components in a DIP package.
>
> <http://realterm.sourceforge.net/> RealTerm is a terminal emulator which
> supports two serial ports at once (input is shown in two different
> colours), which is useful for this sort of thing.
>
> Be aware that buffering, especially with USB, will give you
> unpredictable latencies so the timing of inputs from the two channels
> will not be reliable (but it will probably be good enough if you are
> using a half-duplex protocol).
>
> Of course, if the protocol is half-duplex, it's possible to cheat with a
> couple of diodes and a resistor, and only one serial port.

Beware the FTDI software. Evil.
From: Jujitsu Lizard on
"David Brown" <david.brown(a)hesbynett.removethisbit.no> wrote in message
news:i6ednXDCbf80393UnZ2dnUVZ8oKdnZ2d(a)lyse.net...
>
> Of course, if the protocol is half-duplex, it's possible to cheat with a
> couple of diodes and a resistor, and only one serial port.

Nah, full duplex.

But good thought ...

From: David Brown on
LittleAlex wrote:
<snip>
> Beware the FTDI software. Evil.

I've heard that a number of times, but never had problems with the FTDI
drivers myself.

Their example software, such as the Delphi wrapper for their DLLs, leave
a lot to be desired (a single global variable for the device handle is
not exactly good software design, especially when you want to use a
two-channel device like the FT2232) - treat it as an example, and write
your own.
From: MK on

"Jujitsu Lizard" <jujitsu.lizard(a)gmail.com> wrote in message
news:erWdnXcaXdtMaKLUnZ2dnUVZ_r6dnZ2d(a)giganews.com...
> Hi,
>
> I develop embedded software for a living. We need to instrument the
> bidirectional serial interface between our product and a daughterboard
> (containing its own microprocessor) so that we can have another piece of
> software (which we write to run under XP or Vista) examine the serial
> communication and look for logical errors.
>
> It would seem most convenient for us to use two of those cheap USB->Serial
> adapters and just wire them up so that only the receive portion is used.
> One of the adapters would monitor the communication from our product to
> the daughterboard, and the second adapter would monitor communication
> going in the other direction.
>
> Questions:
>
> a)Is there a better approach (especially recognizing that we want maximum
> portability and that very few laptops these days ship with one let alone
> two serial ports)?
>
> b)Will Windows keep up with 2 streams at 19,200 baud?
>
> c)Are there any web pages that you've found especially helpful? I did
> find this one:
>
> http://msdn.microsoft.com/en-us/library/ms810467.aspx
>
> Is this the correct API to use?
>
> d)Are there any books or additional resources on this topic that you'd
> recommend?
>
> e)Our boards work at 3V, but I think serial communication is 12V by
> specification. If anyone is aware of a commercial level-shifter so that
> we don't need to build one ...
>
> Thanks sincerely for the help,
> The Lizard

Try an upmarket USB interface with as many serial ports as you need.
I have used MOXA PCI and PCIe boards with good results so I suggest a MOXA
Uport.

If you can use the plug in cards then MOXA's own library for access works
much better than Windows comport stuff.

I'm not sure if they support the USB adapters with the same library.

Another good way to go is to use a PCMCIA card serial porta dapter - these
are real comports in hardware.


Michael Kellett


From: Oliver Betz on
"Jujitsu Lizard" wrote:

>I develop embedded software for a living. We need to instrument the

why do you hide your identity?

[...]

>a)Is there a better approach (especially recognizing that we want maximum
>portability and that very few laptops these days ship with one let alone two
>serial ports)?

other poster already pointed out that you don't get precise timing
information if you use two Windows comm ports.

>b)Will Windows keep up with 2 streams at 19,200 baud?

Remember the computing power we needed to handle the speed of 56K
modems and ISDN adapters.

>c)Are there any web pages that you've found especially helpful? I did find
>this one:
>
>http://msdn.microsoft.com/en-us/library/ms810467.aspx
>
>Is this the correct API to use?

Yes. And there are some pitfalls to avoid, e.g. handling of
communication errors and break conditions and FIFO issues
(ReadIntervalTimeout + FIFO = Fun).

>d)Are there any books or additional resources on this topic that you'd
>recommend?

You might have a look at http://sourceforge.net/projects/serialapi/
for an application example or easier access to the comm port.

Oliver
--
Oliver Betz, Munich
despammed.com might be broken, use Reply-To: