Thread: output to serial port

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    4

    output to serial port

    i am writing a program that will accept keyboard input (easy) then send a signal to the serial port (hard). i have heard that you can send a signal to a certain pin. is this true? how? sample code? thanks. i plan to use the signal to pin to be a trigger current for a larger circuit im building.

  2. #2
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    I don't think you can send signal to *every* pin, but activating some of them might work.

    I did direct serial port programming (made a serial chat-program in ASM a few years ago), but I only sent commands and sent/received data - normal communication with the RS232.

    Good HW info (including serial port) can be found here (you probably heard of Ralph Brown's famous interrupt list):

    http://www.cs.cmu.edu/afs/cs.cmu.edu...ralf-home.html

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> send a signal to the serial port (hard).

    Not hard. Use the CreateFile() API function to get a handle to the port then use the handle based I/O functions to send/receive. Look up CreateFile() in the help and pay particular attention to the section called "Communication Resources". If you follow the links, you will find the structures necessary for lower level control of the hardware protocol "pins" on the serial port.

    *** EDIT ***

    ... and cross posting really ........es me off.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    4
    sorry about cross posting. second post on my first thread said to direct it to a platform. so i moved it to the windows thread but didnt know how to delete the old one. thanks for the info, ill keep working at it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Serial Port Issues (again!)
    By HalNineThousand in forum Linux Programming
    Replies: 6
    Last Post: 04-09-2008, 08:26 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. Reading and writing to a serial port
    By SwarfEye in forum C Programming
    Replies: 2
    Last Post: 08-18-2006, 12:28 AM
  4. serial port data transmission
    By djarian in forum C Programming
    Replies: 2
    Last Post: 10-04-2003, 02:22 PM
  5. Serial port read..can someone tell me..
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 06-27-2002, 08:21 AM