Solved

how to interface PC with self designed electronics

Posted on 2000-04-30
3
185 Views
Last Modified: 2010-04-02
Hi all.Please let me know how  can i interface a self designed electronic units with the PC

i'm looking for commands and example to access pin of serial and parallel comm port pin by pin. Please let me know how its done in VC++ and VB. and which one do you recommend i use.
0
Comment
Question by:jaxon445
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
saurabh_dasgupta earned 25 total points
ID: 2765139
Win NT provides a suite of Win32 APIs for transferring data through the serial ports.

These APIs make serial port operations behave  like  file operations.

Example: You can acquire a handle to the COM1 port using the following:
CreateFile ("COM1" , ...)

You can transfer data out using WriteFile and read incoming data using ReadFile. You can make your architecture asynchronous also.

Microsoft also provides a ActiveX wrapper (MSComm32.ocx) over all the above communication APIs . That can be useful for you in the prototype stages.

These APIs are documented in Platform SDk --> Base Serivices --> Files and I/O -- > Communications.

There is also a full blown sample by the name TTY located in the Samples\SDK\Win32\TTY directory in the MSVC50 setup folder.

Hope this helps ...
0
 

Author Comment

by:jaxon445
ID: 2765151
thanks saurabh

i was looking for command and ways to get it done by VB or VC++. please do let me know if you know anything on it.

0
 
LVL 4

Expert Comment

by:saurabh_dasgupta
ID: 2765210
Do you have MSVC 50 or 60 compiler ?
If yes then you can take a look at the TTY sample.

This is a simple executable that lets you transfer and receive bytes across serial ports.

You will need a shielded cable with a 9 bit connector on either sides.

Get hold of two compuers which are loaded with Win NT and connect their respective COM1 ports using the shielded cable. Run the TTY.EXE sample on both the computers.

.....and there you are. You have the full source code also (TTY.C)

This is a demo of  PC to PC communications. For PC to external hardware communication, you will need to use specific chips ( not much idea about that)

Hope this helps
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question