Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Q]about serial communication

0 views
Skip to first unread message

jcjung

unread,
Jan 13, 2000, 3:00:00 AM1/13/00
to
Hi~

First of all, thank you for the reading this post.

Now I'm changing serial comunication program for dos
into for windows using MFC.

But I have faced the deadlock while I'm writing program.

The problem that I faced is that I have to access UART registers
directly .

I would like to know this is possible or Do I need vxd programming?

I hope I can access registers using only MFC.

If there is way to solve this problem, How can I do?

have a nice day!!!


Dea

unread,
Jan 13, 2000, 3:00:00 AM1/13/00
to
If you need access to registers, you will need to write a driver. There are
tools that are available to generate driver skeleton code so that you do not
have to deal with the details of developing a driver scratch.

These are some companies that have tools of this nature:

Tetradyne
KrfTech
BlueWaterSystems

I have used Tetradyne's tool. It works well and is very easy to use.
Tetradyne, and BlueWater Systems also have tools that allow you to access
the registers from a Win32 program as well alleviating the need to write a
driver. Of course, you take a little performance hit.

Good luck!
Demir Ateser
Intermec Technologies Corp.
demir....@intermec.com


jcjung <jcj...@jjsystem.com> wrote in message
news:387D8D34...@jjsystem.com...

eds

unread,
Jan 15, 2000, 3:00:00 AM1/15/00
to
Depending on the type of communication program you have in mind, CSocket
may help you. Also see Tapi.

Charles Josh

unread,
Jan 16, 2000, 3:00:00 AM1/16/00
to
Windows is quite different from DOS when it comes to serial communications.
If you need that much control, you will need to write a device driver for NT
since NT does not allow you to directly access the UART registers. However,
NT does provide functions that allow you to read and/or modify most of the
UART registers.

Charles Josh

unread,
Jan 18, 2000, 3:00:00 AM1/18/00
to
Which Windows function can a programmer use to access the IIR or the
IER? Without writing a driver, these UART registers are not accessable.

eds wrote:

> As I understand jcjung is trying to port a communication program from
> DOS to Windows. He perfectly understand that is a huge difference
> between the two environments. The question seems to be how to proceed
> and take advantage of MFC. His reference to VXD and port access only
> shows his DOS background and not necessarily a wish to continue doing
> the same things under Windows. Said that, I still insist that CSocket
> is his best bet to create a communication program using MFC. It is a
> thin encapsulation of the BSD Sockets and keeps most of those names
> like connect, send, receive, etc. By the other side, Tapi can give him
> access to the communication port and open the door to the use of
> Windows Communication API. A third option, not cited on my previous
> post, is the Win32 function CreateFile(). Compatible with NT and Win95
> CreateFile() returns a handle that can be used to access almost
> anything, including communications resources. After the port is open,
> he can use Read() and Write() to access the object.
>


Thomas Lutz

unread,
Jan 25, 2000, 3:00:00 AM1/25/00
to
It is extremely rare that you would have to access serial port
registers directly under Windows. The Windows COMM driver provides
enough functionality that you should be able to do pretty much
everything that you should need to do without accessing the UART
registers directly.
There is an excellent C++ source code example of a terminal program
available on the Microsoft Developer Network CD ROM and I believe that
there is also some sample code on the microsoft website in the MSDN
section. http://msdn.microsoft.com/developer
Log in and do a search of their entire site for "SERIAL I/O" or
"Terminal" or "RS232".

If you absolutely must access registers directly, you may want to use
a third party DLL that provides direct access to I/O ports. There is a
freeware DLL out there called WIN95IO (for Windows 95/98) and
another program called TINYPORT for Windows NT that I believe is
shareware that allow you to access hardware ports directly.
You should be able to find both programs at your favorite shareware
web site.

For more serial I/O solutions visit www.taltech.com

0 new messages