CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2002
    Posts
    5

    Question Using RS-232 Standard

    i want to implement a communication b/w two pc's via null modem using serial ports. I really dont know how to do this. Help in terms of assembly code is also acceptable.Plz help me !

  2. #2
    Join Date
    Sep 2002
    Posts
    5
    i have learned abt the rs-232 pin structure and thier working too , the problem is the communication with the hardware and the flow control ( hardware method preferred ) .. looking forward for ur help

  3. #3
    Join Date
    Nov 2001
    Location
    Mississauga, Ontario, Canada
    Posts
    2
    If your systems are using Windows, then a good description can be found by searching MSDN Help for the following article:
    "Serial Communications in Win32"

    It is from 1995, but discusses all sorts of RS-232 communications issues, and provides a sample VC++ project.

  4. #4
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    You didn't mention what OS/compiler you are using. Comms on Unix/DOS/Windows/QNX/VxWorks/RMX is very different.
    Succinct is verbose for terse

  5. #5
    Join Date
    Sep 2002
    Posts
    5
    yes ,its Windows 98 using simple c/c++ compiler like Borlandc

    Thanks for ur replies,
    omerash,.

  6. #6
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    Even if it is Borland C, Serial Communications in Win32 still applies. The alternative is to do it in the old DOS way using the old BIOS calls but they may not be available from your compiler.

    With flow control, all you need to do is set it up and the hardware will take care of the rest for you.
    Succinct is verbose for terse

  7. #7
    Join Date
    Sep 2002
    Posts
    5
    i have gone through that Article, even im not having any idea of WIn32 programming but all the stuff is windows based programming , i wanna know communication thats dos based. The command line argument will tell which terminal's programme is going to be Server...

    omerash..

  8. #8
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    Which version of Borland C do you have? Is it Turbo C (TC) or Borland C++ builder (BCB)? Serial comms in BCB is the same as microsoft. See Serial Communications with Borland C++ Builder. Almost everything in there is mentioned in the Microsoft article. This is console based. Not quite the same as 16-bit DOS but it will work on 32-bit DOS. It includes windows.h for the prototypes but it is a console based program. It fools a lot of people: a windows header appearing in a console based program.

    TC, on the other hand, is something else. You can get some examples in Programmer's Heaven.
    Last edited by cup; September 16th, 2002 at 06:31 PM.
    Succinct is verbose for terse

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured