Thread: Programming a Com port

  1. #1
    Registered User
    Join Date
    Sep 2007
    Location
    Md
    Posts
    7

    Unhappy Programming a Com port

    I am trying to re-create an old BASIC program in 'C' to send data to a COM port.
    The old program used the open statement ie "OPEN "COM1:4800,N,8,1" AS #1"
    and then used PRINT#1,CHR$(0);CHR$(0);CHR$(0);CHR$(0);M$ to send the commands to a Yaesu 757 radio. M$ commands are from ASCII Chr 1 to 9 which are shown on a simple menu selection. Ive been able to recreate the simple menu program in 'C' but I have not been able to find out how to write it in 'C'. The old basic program works with Windows XP, 98, 95 ets without any problems. Any help is appreciated.....

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Googling brought this:

    http://forums.devshed.com/c-programm...2t-162565.html

    Use C the file functions like fopen(), or the C++ fstream stuff, and you're good to go.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FTP program
    By jakemott in forum Linux Programming
    Replies: 14
    Last Post: 10-06-2008, 01:58 PM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Segmentation Fault - Trying to access parallel port
    By tvsinesperanto in forum C Programming
    Replies: 3
    Last Post: 05-24-2006, 03:28 AM
  4. Basic port scanner code .. pls help ???
    By intruder in forum C Programming
    Replies: 18
    Last Post: 03-13-2003, 08:47 AM
  5. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM