Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

parallel port

  • 20-02-2009 7:47am
    #1
    Registered Users, Registered Users 2 Posts: 382 ✭✭


    does anyone know the turbo c code to make a frequency generator using turbo c and a parallel port?


Comments

  • Registered Users, Registered Users 2 Posts: 5,401 ✭✭✭DublinDilbert


    What OS are you using??

    If your using most modern versions of windows (> NT4.0), which i assume you are, you'll need to control the parallel port via a kernel mode driver, which has access to the hardware...

    A quick google of "direct parallel port control" comes up with:-
    http://www.lvr.com/parport.htm


  • Registered Users, Registered Users 2 Posts: 382 ✭✭DiarmaidGNR


    windows XP


  • Registered Users, Registered Users 2 Posts: 5,401 ✭✭✭DublinDilbert


    Ok, you'll need a kernal mode driver, which you can hook into. I saw your other post too....

    if you follow the link i posted above you'll find http://logix4u.net/ which appears to be a driver that will do the job.

    You would be better off using Microsoft Visual C++ or bloodshead DevC++ for your development. Are you going to program a GUI? if so i would use Microsoft visual C++.

    Driving steppers from a parallel port is something i have experience of.

    Which driver board are you using??

    I'm not sure what hardware you are using, but typically you'll be setting the "Direction" output bit, then toggling the "step bit", if there is an up-down counter in the decoder. If there isn't a counter in the decoder, typically you'll have to use 4 bits and switch them in the correct sequence..


    You don't have to control the frequency you toggle the step bit at, as such, as your not trying to control the speed. Your trying to control the displacement, ie the number of steps...


  • Registered Users, Registered Users 2 Posts: 1,823 ✭✭✭EvilMonkey


    Google NTPort it will let you access the parallel port. You should be able to find some sample code, I don't know if it work with turbo c though.


  • Registered Users, Registered Users 2 Posts: 382 ✭✭DiarmaidGNR


    Ok, you'll need a kernal mode driver, which you can hook into. I saw your other post too....

    if you follow the link i posted above you'll find http://logix4u.net/ which appears to be a driver that will do the job.

    You would be better off using Microsoft Visual C++ or bloodshead DevC++ for your development. Are you going to program a GUI? if so i would use Microsoft visual C++.

    Driving steppers from a parallel port is something i have experience of.

    Which driver board are you using??

    I'm not sure what hardware you are using, but typically you'll be setting the "Direction" output bit, then toggling the "step bit", if there is an up-down counter in the decoder. If there isn't a counter in the decoder, typically you'll have to use 4 bits and switch them in the correct sequence..


    You don't have to control the frequency you toggle the step bit at, as such, as your not trying to control the speed. Your trying to control the displacement, ie the number of steps...

    The driver board has the decoder etc, all it requires is the input step bit, and a direction bit.
    I need to be able to count and record the step bits aswell.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 5,401 ✭✭✭DublinDilbert


    The driver board has the decoder etc, all it requires is the input step bit, and a direction bit.
    I need to be able to count and record the step bits aswell.

    Yep well all you need in your program is a variable that gets incremented/decremented based on when you toggle the step and direction bits...

    If this is a college project, I wouldn't use turbo-c for this, as its not really used any more.... I'd write a small GUI in visual C++, using Microsoft foundation classes. So as part of your poject you'll be learning something new also.


  • Registered Users, Registered Users 2 Posts: 382 ✭✭DiarmaidGNR


    Cheers!


Advertisement