×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Parallel Port Programming (in C++)

Parallel Port Programming (in C++)

Parallel Port Programming (in C++)

(OP)
Hallo! I've got a problem with parallel port programming.
I have to write to the LPT1 and then I must read from it. Writing is no problem, but I can`t read
If I write for example int 64 to the port and manipulate the pins by forcing the active high of a pin to ground and read in the new value which should have changed now, it still remains 64. How can I solve this problem?

RE: Parallel Port Programming (in C++)

Make sure that 1) your parallel port is bi-directional, 2) you have configured it correctly (I think that there is a control register that you write to to set the data bus direction).

RE: Parallel Port Programming (in C++)

Hi,
melone is right, if markus3 is lucky to have a bidirectional parallel port (this is almost the case by the way), then he should activatd read mode by setting the SLCT IN (Pin 17) of parallel port, i.e bit 3 of Portadress + 2.

good luck!

RE: Parallel Port Programming (in C++)

(OP)
Thank you! The Select In Pin is a very good idea
Normally, it is off (read-mode) isn`t it? Meanwhile I
solved the problem by using the status register, especially Pin 15 (Error-Pin). That functions, too.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources