Re: RS232 ports and new PC's

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

Quoted text here. Click to load it

Yes... and no. I found that doing serial comm. through one of those USB to
serial converters worked pretty well as long as I didn't get too close to
the real UART hardware. I used win2k and had good success talking with
some PICs.

--
- Mark ->
--

Re: RS232 ports and new PC's
I had the same experience : no significant issue using a USB to RS232 cable,
as long as :
- the software is able to use exotic COM ports (usually recognized as COM3
or even COM5 on my PC, depending on the USB connector used...)
- the peripheral don't try to grab current from the RS232 port. I had some
issues with a programmer that tried to get -12V from it... But it is similar
with issues found on laptops RS232 ports.

Cheers,

Robert Lacoste - ALCIOM : The mixed signals experts
http://www.alciom.com

Xns93C8AD88D7539lkj562ghjgk1k245lbvj@130.133.1.4...
Quoted text here. Click to load it



Re: RS232 ports and new PC's
binary.blueyonder.co.uk:

Quoted text here. Click to load it

Have used them, but not with DOS apps, so can't say for certain.

--
Richard

Re: RS232 ports and new PC's
Quoted text here. Click to load it
OK on a desktop, not much use on a laptop...
--
Tim Mitchell

Re: RS232 ports and new PC's
Quoted text here. Click to load it

Agreed, but you could use a pcmcia rs232 card, It wouldn't look plain
vanilla from a hardware point of view but perhaps still cleaner than
usb.

My laptops are old (P133) and have serial ports, but I guess a lot of
the latest kit doesn't...

Chris
 

--
Aerosystem Designs
------------------
We've slightly trimmed the long signature. Click to see the full one.
Re: RS232 ports and new PC's
Quoted text here. Click to load it

Quatech do PCMCIA serial and parallel IO cards that look like "native"
ports from a SW point of view.  I use the parallel port one in my laptop
for programming FPGAs.

http://www.quatech.com

My boss likes to joke about "the world's most expensive parallel port" -
it cost us about AUD$300 (approx US$200)....  which is a shocking amount
of money for essentially a bit of cable, a latch and a PCMCIA
controller, but anyway, it works perfectly, even with legacy bit-banging
software.

John


Re: RS232 ports and new PC's

Quoted text here. Click to load it

Colin,

The command prompt in Windows machine is not the same as a DOS
environment.  Also, a console app is not the same as a DOS app.

USB based adaptors will not work with DOS apps.  It is impossible.  If
you want to use your old DOS apps, then you have to use either PCMCIA,
PCI or ISA.

Elroy


Re: RS232 ports and new PC's
On Mon, 11 Aug 2003 09:21:03 +0200, "Meindert Sprang"

Quoted text here. Click to load it

DOH!  We are not talking about writing a Windows driver, we are
talking about accessing USB hardware on a machine that is running DOS.
It is quite impossible.  DOS doesn't even know what USB is!  DOS has
no USB stack!  DOS has no idea how to work with USB hardware.

We make these serial adapters here at work.  We know these things...

Elroy


Re: RS232 ports and new PC's
Quoted text here. Click to load it
perfectly
register

I was merely commenting on the "impossible" statement. DOS does not know
about USB, so doesn't windows without the appropriate drivers. You should
know these things......
Do a google search on "DOS" and "USB". you'll find software solutions that
make USB work in DOS.

Meindert



Re: RS232 ports and new PC's
"Form@C" <mickATmixtel.co.uk> wrote in message
Quoted text here. Click to load it

Sure you can. I have used public domain ulilities that capture access to the
hardware UART registers. The same mechanism can be used to capture serial
data from a DOS app, stuff it into a USB stack and pass it on to a
USB-serial converter. If you create a Virtual Machine, a DOS application has
no knowledge whether it is talking to real hardwar or to a I/O port in a
vitual machine.

Meindert



Re: RS232 ports and new PC's

Quoted text here. Click to load it

Doesn't that depend on the application though? I would have thought that
well-behaved proggies would use standard OS calls wheras naughty proggies
would access hardware directly, without notifying the OS. The former
would run in a virtual machine no problem but I'm not sure about the
latter case; surely the proggy would just attempt to look for non-
existant hardware? I've certainly come accross progs that wouldn't access
COM ports at non-standard addresses (or even anything else other than
COM1 and COM2) so they were definitely looking directly at hardware.

--
Mick
http://www.nascom.info for Nascom & Gemini info.
We've slightly trimmed the long signature. Click to see the full one.
Re: RS232 ports and new PC's
"Form@C" <mickATmixtel.co.uk> wrote in message
Quoted text here. Click to load it

Most DOS comm programs I know access the ports directly. At address 0:400
you can find a list of addresses (maximum of 4) of com ports found by the
BIOS during power-up.
In a virtual machine, an I/O access from an application results in an
exeption interrupt, which in turn is handled by the OS (add-on). The
interrupt handler will in turn transfer the data to/from the I/O port
address and returns eventually. The application knows nothing about this and
continues as if a normal I/O access has taken place. A google search on "I/O
privilege map" will turn up several links describing this.

Meindert



Re: RS232 ports and new PC's

Quoted text here. Click to load it

Thanks!

--
Mick
http://www.nascom.info for Nascom & Gemini info.
We've slightly trimmed the long signature. Click to see the full one.
Re: RS232 ports and new PC's

Quoted text here. Click to load it

The OP stated in part, " will some of my old DOS apps be
able to access one of these ports when running
from the command prompt of Win2K or XP Pro ?"

So he/she was not talking about running stand alone DOS, but
the dos emulator (under Win XP) for example. - RM



Re: RS232 ports and new PC's
On Mon, 11 Aug 2003 13:27:53 GMT, RickMerrill

Quoted text here. Click to load it

Correct, and my original reply was unclear.  For clarity, I should
have said:

"No.  Under Win2K or XP, your old DOS app will not be able to access
one of these ports when running from the command line prompt."

Elroy


Re: RS232 ports and new PC's
Quoted text here. Click to load it


Not entirely true.  A serial port will be visible to a DOS app if an
appropriate virtual device driver is supplied.  I've seen support for
both 9x and NT systems (which require quite different virtualization
code), although I can't vouch for its quality.

Re: RS232 ports and new PC's
On 12 Aug 2003 23:35:59 -0700, snipped-for-privacy@yahoo.com (Robert Wessel)

Quoted text here. Click to load it

1.  I am assuming that his DOS app accesses the hardware directly by
writing or reading from the UARTs located at base address 0x3F8 or
0x2F8, depending on how many UARTs are on the motherboard.

2.  If he tries that in Windows, the OS will not not let that
happen...and will be very mad at him.  It might even tell him to piss
up a rope.  ;-)  He would have to get a handle to COMx port and
perform WriteFile or ReadFile to the Virtual COMM layer which
eventually will pass the data to the serial driver via IOCNTRL
commands.

A DOS app, written to touch hardware directly, has no chance of
running in small or large Windows.

Elroy


Re: RS232 ports and new PC's
Quoted text here. Click to load it

It's quite possible to make that work by trapping the I/O
access and emulating a 16550 in the USB serial driver.

Quoted text here. Click to load it

Could be.  Virtualizing hardware like a 16550 UART has been a
well-known technique for 20+ years -- so it's entirely possible
that bit of high-tech hasn't seeped into the Windows world yet.

Quoted text here. Click to load it

That's a deficiency in the Windows DOS emulators, not a
fundamental problem.  DOS programs that touch hardware directly
work fine in Linux's "DOS box" because it emulates things like
UARTs.

--
Grant Edwards                   grante             Yow!  ... I want a COLOR
                                  at               T.V. and a VIBRATING BED!!!
We've slightly trimmed the long signature. Click to see the full one.
Re: RS232 ports and new PC's

Impaler wrote:
Quoted text here. Click to load it

If you are referring to "virtualizing hardware" as using VHDL or
Verilog to instantiate a UART in an FPGA, then I agree, but I don't
know how that applies here.

Perhaps a brief descriptor of how the USB/Serial adapter works under
Windoze will elucidate the discussion.  After installation (i.e. the
Plug and Play sequence) and enumeration, a COM port appears in the
device manager.  It is accessed like a normal COMx port via an app.
The data is passed to the Vitrual COMM layer (they are radically
different in large and small Windows), where a driver other than the
serial driver must intercept it because a real UART isn't there.  The
UART is hanging off the USB tree at an endpoint somewhere.  So the
data gets packetized, dropped on the USB stack destined for the
appropriate endpoint, and depacketized at the remote end (an embedded
processor with a USB stack and some firmware).  Of course, this
segmentation and reassembly protocol has to be able to handle flow
control command and escape sequences, and has to bubble those types of
commands back to the application so that the virtual COM port really
responds to the app like a built-in port.

In this case, the only place to "virtualize" the UART is between the
firmware and the physical hardware.

Quoted text here. Click to load it

Agreed, but from a reality standpoint, a problem in the Windows DOS
emulator IS a fundamental problem.  You and I aren't going to be able
to fix the problem, and neither is the original poster, who
undoubtedly has lost all interest in this arcane thread by now.  Thank
Mr. Gates.  =)

You could use Linux, but that isn't what the OP was asking...

Elroy


Re: RS232 ports and new PC's

Quoted text here. Click to load it

Nope.  I'm talking about trapping read/write operations to the
UART registers and invoking software that makes it appear that
a UART is, indeed, present at the I/O addresses being accessed.

We're instantiating the UART in software, which uses some
unrelated (to a 16550) method to actually do the serial I/O.

Quoted text here. Click to load it

We're aware of how a USB serial driver works.

What we're talking about is the ability of an OS to trap I/O
operations that happen in a virtual-8086 process and then make
it appear that hardware does in fact exist at those I/O
addresses.  The actual serial data could be going in/out via
USB, Ethernet, some oddball UART, whatever.  The process
running on the virtual 8086 thinks it's got hold of a 16550.

Quoted text here. Click to load it

He wanted to run a DOS program with a USB serial device.  I
told him one of doing it: use Linux.  Apparently it can't be
done under Windows.

--
Grant Edwards                   grante             Yow!  I LIKE Aisle 7a.
                                  at              
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline