Solved

still reading from the printer

Posted on 1998-02-09
2
235 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to gracefully close the c++ 11 thread? 3 106
Unable to start eclipse ? 17 152
draw a Christmas tree by using a nested loop? 26 75
Precision Problem in C++ 7 43
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

790 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