Need help defining frequency

Discussion in 'C' started by muhahah, May 14, 2007.

  1. muhahah

    muhahah New Member

    Joined:
    May 14, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Last time I used C/C++ was several years ago, so I forgot most of what I knew then... What I need is hopefully very simple: a program that reads input (or writes) from LPT n times per second, where n is frequency (4-22 Khz, but this is less relevant). I have problems finding solutions for this problem on the internet, but I believe this is simply because I do not know how to ask google properly :)
    I suppose I should use the int_inp() function to read data and int_outp() to write, which is fairly simple (if there is a better solution, please let me know), so the only problem would be timing the executing of the function properly.

    Thanks to everybody in advance!
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    Communicating with LPT is implementation dependent. So is the ability to exercise precise time control at 22 Khz. If it's critical, you're going to have to, at least, get down to driver level. For a modern desktop multi-processing system, you might even need some hardware support.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice