Advertisement

01.27.2004 at 09:17AM PST, ID: 20864441
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

Using EPP Parallel Port Mode via VB6 either thru parport.sys or inpout32.dll

Asked by cosbit in Visual Basic Programming

Tags: ,

I've got custom hardware attached to the parallel port.  The firmware is being developed to Tx/Rx data using EPP.

I'm familiar with the protocol and have read "Parallel Port Complete" and beyondlogic.com, etc.

I currently am trying inpout32.dll (logix4u.cjb.net) under WinXP to write a byte to the device using EPP: Here's my code:

       'Initialize Control Register
        Call Out(Control, 4)
       
        'Make sure port is "ready"
        RxB = Inp(Status)
        If RxB And &H80 = &H80 Then Debug.Print "Port Ready"
       

        'Clear_EPP_Timeout
        Call Out(Status, 0)
        Call Out(Status, 1)
        RxB = Inp(Status)

    'Set to EPP Mode
    'Set the highest 3 bits to match the selected mode.
    ecpMode = 4
     ecrdata = (ecrdata And &H1F) + ecpMode * &H20
    'Write the result back to the ECR.
    Call Out(ECR, ecrdata)

        'Setup Port - Set to OUTPUT
        RxB = Inp(Control)
        RxB = RxB And &HDF
        Call Out(Control, RxB)

        'Send Byte
        Call Out(EPPAddress, &H88)    'Send byte to parport
        RxB = Inp(EPPAddress)
       
        'Check for timeout
        RxB = Inp(Status)
        RxB = RxB And 1
        If RxB = 1 Then Debug.Print "Timeout"


The problem is that After writing the byte to the EPPAddress register, "DataStrobe" (Pin14) never goes low.  As I understand it, the parport hardware should handle all the handshaking and should bring DataStrobe low to start the xfer.  The device on the port initializes by keeping "Wait" Pin 11 low.

As an alternative solution, how can I call the standard Windows device driver (parport.sys?) to send a byte over the parallel port via EPP under VB6.  I understand it requires some CreateFile() and DeviceIOCtl() calls but code would be helpful.

Thanks in advance!Start Free Trial
 
Loading Advertisement...
 
[+][-]01.27.2004 at 01:54PM PST, ID: 10213599

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.27.2004 at 02:11PM PST, ID: 10213733

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.27.2004 at 03:06PM PST, ID: 10214113

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.27.2004 at 03:34PM PST, ID: 10214306

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.27.2004 at 03:54PM PST, ID: 10214497

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.28.2004 at 12:15AM PST, ID: 10216397

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Tags: vb6, epp
Sign Up Now!
Solution Provided By: mop_se
Participating Experts: 1
Solution Grade: A
 
 
[+][-]01.30.2004 at 10:54AM PST, ID: 10237494

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.30.2004 at 04:21PM PST, ID: 10239910

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2004 at 07:43PM PST, ID: 10245285

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32