Solved

still reading from the printer

Posted on 1998-02-09
2
215 Views
Last Modified: 2010-04-10
I asked a question earlier about how to axcess the parrallel port of the computer when programing in Visual C++.  The answer I got back was to use it as I would a normal data file.  The problem I am having is that I am not sure how to treat the data I will be getting from the parallel port.  I am going to be connecting an encoder to the port.  This is going to give me either a high or low signal on the pins of the parallel port.  When I try to read this in how is it going to be represented?  Cam I axcess this information bit by bit from the port?  Would each bit be corrisponding to a particular pin?  Can I read off of some of the pins and write to others?  I am having a hard time understanding the big picture here so any help with a general overview would be helpful, but a detailed answer with examples would be perfered.
0
Comment
Question by:jcoleman012698
2 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1181622
I believe

If you acces the port as a file, you can read bytes (characters) from the file.  Each character represents the 8 data lines put together.  You cannot access the control lines in this way.

If there is no data to read, the read operation indicates that you've reached the end of file.
0
 
LVL 3

Accepted Solution

by:
q2guo earned 100 total points
ID: 1181623
Go to my homepage at http://www.csclub.uwaterloo.ca/u/q2guo/parallel.txt
for a mini faq on accessing the parallel port.  The faq helped
me a lot.  It contains some C source codes.


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX enumerated colours 2 84
Dynamically allocate memory 9 56
How to split this in C++ 4 94
show out valin of json for debugging in visaul c++ 1 15
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now