USB serial interface

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

USB serial interface

Rainer Stratmann
The best USB-serial Interfaces for Linux are the ones with FTDI Chip inside.
http://www.ftdichip.com/
http://www.ftdichip.com/Products/EvaluationKits/USB-Serial.htm
Rainer
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Marco van de Voort
> The best USB-serial Interfaces for Linux are the ones with FTDI Chip inside.
> http://www.ftdichip.com/
> http://www.ftdichip.com/Products/EvaluationKits/USB-Serial.htm

Do they have the same latency as a normal serial port? I've tried several
usb-serial ports, and they all have horrible latencies compared to an
onboard (or PCI card).


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Rainer Stratmann
Am Dienstag, 26. Dezember 2006 18:57 schrieb Marco van de Voort:
> > The best USB-serial Interfaces for Linux are the ones with FTDI Chip
> > inside. http://www.ftdichip.com/
> > http://www.ftdichip.com/Products/EvaluationKits/USB-Serial.htm
>
> Do they have the same latency as a normal serial port? I've tried several
> usb-serial ports, and they all have horrible latencies compared to an
> onboard (or PCI card).
>
For me the latency is not (very) important. I do not feel a lack of latency.
We tried USB converters with prolific chipset and it hangs up then, so FTDI
chips would be better. I read also somewhere a lack of latency. May be it is
also a question of the Kerneldriver and the driver will improve more in the
future.

Rainer

>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

John Coppens
On Tue, 26 Dec 2006 20:23:56 +0100
Rainer Stratmann <[hidden email]> wrote:

> We tried USB converters with prolific chipset and it hangs up then, so
> FTDI chips would be better. I read also somewhere a lack of latency.
> May be it is also a question of the Kerneldriver and the driver will
> improve more in the future.

I have two Prolific 2303 serial converters without problems. There is
native USB support in the kernel (2.6.17). I have run them at 38400. I am
interested in your problems - maybe I can prevent some future problem.

John
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Andreas Berger

>> We tried USB converters with prolific chipset and it hangs up then, so
>> FTDI chips would be better. I read also somewhere a lack of latency.
>> May be it is also a question of the Kerneldriver and the driver will
>> improve more in the future.
>>    
>
> I have two Prolific 2303 serial converters without problems. There is
> native USB support in the kernel (2.6.17). I have run them at 38400. I am
> interested in your problems - maybe I can prevent some future problem.
>
>  
Does anyone know about USB-to-Serial for DOS? I would be very
interrested (Even Ethernet-to-Serial).

Andreas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Marco van de Voort
In reply to this post by Rainer Stratmann
> Am Dienstag, 26. Dezember 2006 18:57 schrieb Marco van de Voort:
> > > The best USB-serial Interfaces for Linux are the ones with FTDI Chip
> > > inside. http://www.ftdichip.com/
> > > http://www.ftdichip.com/Products/EvaluationKits/USB-Serial.htm
> >
> > Do they have the same latency as a normal serial port? I've tried several
> > usb-serial ports, and they all have horrible latencies compared to an
> > onboard (or PCI card).
> >
> For me the latency is not (very) important. I do not feel a lack of latency.
> We tried USB converters with prolific chipset and it hangs up then, so FTDI
> chips would be better. I read also somewhere a lack of latency. May be it is
> also a question of the Kerneldriver and the driver will improve more in the
> future.

We mostly use a serial (either using a RS422 converter or straight) to
contact a PIC for the realtime part of our applications. The latency is also
there under Windows, and messes up the realtime aspect of signaling.
(actually, while I used the converters under Linux, I
haven't latency benchmarked them yet)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Klaus Hartnegg-2
In reply to this post by Rainer Stratmann
> Am Dienstag, 26. Dezember 2006 18:57 schrieb Marco van de Voort:
> > > The best USB-serial Interfaces for Linux are the ones with FTDI Chip
> > > inside. http://www.ftdichip.com/
> > > http://www.ftdichip.com/Products/EvaluationKits/USB-Serial.htm
> >
> > Do they have the same latency as a normal serial port? I've tried several
> > usb-serial ports, and they all have horrible latencies compared to an
> > onboard (or PCI card).
> >
> May be it is
> also a question of the Kerneldriver and the driver will improve more in the
> future.

It's more likely a general problem of USB.
A real serial port is always ready to receive and it triggers an

interrupt as soon as it has received a character, so the PC
immediately fetches the received data.

On USB the converter must buffer all incoming data until
the PC specifically asks it to do its next transfer.
On USB1 there is no guarantee that the PC can do
1000 transfers per second.
USB1 can transfer a lot more than 1000 bytes per second,
but not in 1000 transfers of only 1 byte each.
I don't know the exact number for USB2.
Also it depends on which other USB devides are connected
because they all share the bus.

Klaus
--
Klaus Hartnegg, Brain Research Group, University Freiburg,
Hansa-strasse 9, D-79104 Freiburg, Germany, [hidden email]
Please avoid sending me Word attachments (use txt, rtf, or pdf).
See http://www.fsf.org/philosophy/no-word-attachments.html

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Mark Morgan Lloyd-5
In reply to this post by Andreas Berger
Andreas Berger wrote:

> > I have two Prolific 2303 serial converters without problems. There is
> > native USB support in the kernel (2.6.17). I have run them at 38400. I am
> > interested in your problems - maybe I can prevent some future problem.
> >
> >
> Does anyone know about USB-to-Serial for DOS? I would be very
> interrested (Even Ethernet-to-Serial).

I've come across a website discussing connection of a USB CD-ROM drive to a DOS
system for booting purposes but I've not seen reference to serial devices. I
think the people to ask about this might be Parallax since they use
USB-connected serial ports for device programming, if anybody knows how to hook
them onto older machines they will.

My own feeling if you /have/ to have a DOS environment and don't mean something
like the '98 DOS box would be to see if you could run the code under either
DosEmu or Qemu, both of which allow guest session ports to be mapped to whatever
hardware is supported by the host. I've got one system here where DosEmu has
been set up to allow software direct access to an lpt port so it can control an
EPROM blaster, but obviously that sort of thing wouldn't work where the physical
device types differed.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Andreas Berger
Mark Morgan Lloyd wrote:
> I've come across a website discussing connection of a USB CD-ROM drive to a DOS
> system for booting purposes but I've not seen reference to serial devices. I
> think the people to ask about this might be Parallax since they use
> USB-connected serial ports for device programming, if anybody knows how to hook
> them onto older machines they will.
>  
Thanks for the tip.
> My own feeling if you /have/ to have a DOS environment and don't mean something
> like the '98 DOS box would be to see if you could run the code under either
> DosEmu or Qemu, both of which allow guest session ports to be mapped to whatever
> hardware is supported by the host. I've got one system here where DosEmu has
> been set up to allow software direct access to an lpt port so it can control an
> EPROM blaster, but obviously that sort of thing wouldn't work where the physical
> device types differed.
>  
Actually, I use DOS directly. I use cheap off-the-shelf motherboard for
an embedded system that our company uses. The motherboard talks the the
system (which may be spread over kilometers) via a single serial port at
9600 baud. My problem is that there are cheap motherboards appearing
that no longer have serial ports. I'm afraid that soon none will.
Therefore I am looking for alternatives.

Andreas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Marco van de Voort
> Mark Morgan Lloyd wrote:
> > EPROM blaster, but obviously that sort of thing wouldn't work where the physical
> > device types differed.
> >  
> Actually, I use DOS directly. I use cheap off-the-shelf motherboard for
> an embedded system that our company uses. The motherboard talks the the
> system (which may be spread over kilometers) via a single serial port at
> 9600 baud. My problem is that there are cheap motherboards appearing
> that no longer have serial ports. I'm afraid that soon none will.
> Therefore I am looking for alternatives.

We also had this problem, but in the end decided to stuff PCI serial cards
into it. (typically they cost Eur 18 or so).

One of the main reasons were the high latency of the usb-serial (or straight USB
to the PIC). The other option (go networked) is still on hold, since that
requires way more work PIC side. (we use 8-bitters still)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Mark Morgan Lloyd-5
In reply to this post by Andreas Berger
Andreas Berger wrote:

> > My own feeling if you /have/ to have a DOS environment and don't mean
> > something like the '98 DOS box would be to see if you could run the code
> > under either DosEmu or Qemu, both of which allow guest session ports to
> > be mapped to whatever hardware is supported by the host. I've got one
> > system here where DosEmu has been set up to allow software direct access
> > to an lpt port so it can control an EPROM blaster, but obviously that
> > sort of thing wouldn't work where the physical device types differed.
> >
> Actually, I use DOS directly. I use cheap off-the-shelf motherboard for
> an embedded system that our company uses. The motherboard talks the the
> system (which may be spread over kilometers) via a single serial port at
> 9600 baud. My problem is that there are cheap motherboards appearing
> that no longer have serial ports. I'm afraid that soon none will.
> Therefore I am looking for alternatives.

You might find it easier to design a serial expansion module, alternatively
migrate to something that supports the PC/104 interface which is likely to have
serial modules available for the forseeable future. If it's for embedded work
the last thing you want to do is add GOK how many thousands of gates and lines
of driver code to replace a simple piece of hardware; having said that I'm in
much the same position and have considered USB as well since it's significantly
cheaper than an 8-port card.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: USB serial interface

Rainer Stratmann
In reply to this post by Andreas Berger
Am Donnerstag, 28. Dezember 2006 14:03 schrieb Andreas Berger:
>  My problem is that there are cheap motherboards appearing
> that no longer have serial ports. I'm afraid that soon none will.
> Therefore I am looking for alternatives.

I'm running also a DOS Program and now it is ported to Linux.

Actually it runs on both platforms!

Graphical output is done with framebuffer mode and in Linux you can switch to
runlevel 2 (text mode only) and if you had set the correct graphical mode in
the bootloader you can switch into direct framebuffer mode from the console.
Using a Knoppix live Linux CD installed at the harddisk switching off the KDE
stuff.
It is not that hard that it may seems to port a DOS program to Linux I would
say now in a rewiev.
In Linux you have the advantage that you don't have to search for drivers and
so on...
I would like to add ISDN capability to the program. I don't now if it is that
easy in DOS... The same with Internet connectivity...
Also the Harddrive capabilities are not limited...
Also you can make a diskless-system easier...
Autostart you can also do and many things more...
When I switch to Linux I thought about if it is possible just to switch power
of without harddisc data corruption. With ext3 filesystem it is possible like
in DOS!

But there ARE actually embedded motherboards with 4 serial ports, but not that
cheap...

Rainer
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal