[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

still reading from the printer

Posted on 1998-02-09
2
Medium Priority
?
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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…
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.
Suggested Courses

649 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