Thread: problem interfacing in parallel port

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    9

    problem interfacing in parallel port

    Hello, i m Tariq & am new one here. i m working on interfacing parallel port through ' C ' (OS = Win XP) . I have already successfully lighted Leds within TurboC v3.0 enviroment, using "User Port" for access to parallel port. But when i tried to run the exe file only messages appeared as programmed, but the leds doesn't blink.. i have tried a lot, and also have started userport before executing the exe file of the program.. what should i do? plz help me

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    OK, this is a common mistake to assume that you can actually do what you're trying. Windows XP does not allow you to interface with ports in this manner without going through the proper OS way. Turbo C is actually not producing an executable that is natively run on Windows, in the traditional sense. Instead, Windows is emulating in this case, and doing who-knows-what when your code tries to do anything native.

    If you want to program for Windows, get a real Windows compiler, not Turbo C, and write real Windows code.

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    9
    Quote Originally Posted by MacGyver View Post
    OK, this is a common mistake to assume that you can actually do what you're trying. Windows XP does not allow you to interface with ports in this manner without going through the proper OS way. Turbo C is actually not producing an executable that is natively run on Windows, in the traditional sense. Instead, Windows is emulating in this case, and doing who-knows-what when your code tries to do anything native.

    If you want to program for Windows, get a real Windows compiler, not Turbo C, and write real Windows code.
    thanks for the tip.. but do u know if there is any way i can do it through c ? using any other compiler or anything like this ???

  4. #4
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    I am sure I have replied in the past (5 months before for sure) about parallel ports on Windows topics. I suggest you search the forum. You can use VS compiler or gcc for example as compilers. In a few words you would use, i believe, a specific library with specific functions in order to access the parallel port properly

  5. #5
    Registered User
    Join Date
    Jun 2009
    Posts
    9
    Quote Originally Posted by C_ntua View Post
    I am sure I have replied in the past (5 months before for sure) about parallel ports on Windows topics. I suggest you search the forum. You can use VS compiler or gcc for example as compilers. In a few words you would use, i believe, a specific library with specific functions in order to access the parallel port properly
    ohk..thnx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Usb Parallel port programming
    By neocruze in forum Linux Programming
    Replies: 0
    Last Post: 03-26-2008, 11:41 AM
  2. Replies: 3
    Last Post: 02-29-2008, 01:29 PM
  3. Parallel Port: Sending the signals as binary
    By h3ro in forum Tech Board
    Replies: 7
    Last Post: 08-25-2007, 12:22 PM
  4. Problem with string and serial port
    By collinm in forum C Programming
    Replies: 2
    Last Post: 03-23-2005, 10:19 AM
  5. receive signal from parallel port
    By happyspells in forum C Programming
    Replies: 1
    Last Post: 02-24-2004, 09:34 AM