Thread: working with com port..

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    5

    working with com port..

    Hi Friends,

    i am a new guy to c language..
    for my project i need to receive the value from com port throeugh rs232 cable from microp..

    after recerive i need to send back again..

    so if anybody sourcecode for this please pass to em..

    or you have any function receivebyte functiion(receive byte from microp) and sendbyte function (to microp)...please forward me.

    i can use that function then i can communicate ..

    i am really expecting your help in this..

    waiting for your valuable reply...

    with regards,
    karhti..

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    And what OS is it?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Nothing a bit of research wouldn't cure either.

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    136
    I can give you a idea about, but i dont have any code for this.

    See everytime data transfer occurs it happens through a file. Means, u write on a file and device connected from com port reads data from that file. same happens vice versa when u hav to read some thing from com port.

    Some basic steps are initialize all ports of COM. then set some flags and then start reading and writing.

    i hope this much can help you out.
    S_ccess is waiting for u. Go Ahead, put u there.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My TCP Port Scanner in C
    By billy786 in forum Networking/Device Communication
    Replies: 5
    Last Post: 06-28-2008, 07:12 PM
  2. Can't Read From Serial Port
    By HalNineThousand in forum Linux Programming
    Replies: 14
    Last Post: 03-20-2008, 05:56 PM
  3. Replies: 8
    Last Post: 01-18-2008, 04:06 AM
  4. Replies: 4
    Last Post: 01-13-2008, 02:14 AM
  5. Serial port read..can someone tell me..
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 06-27-2002, 08:21 AM