![]() |
|
|||||||
| Programmer's Corner Discussion forum for all aspects of programming and software engineering. Any software programming language welcome: C, C++, C#, Fortran, Java, Matlab, etc. |
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'm just a beginner in VB.
I need to know how to control the parallel port through the USB to parallel converter. Anyone able to advise me? OS - Windows 7 VB - Visual Basic 2008 Express In my device manager, it show the converter as 'USB printing support'. Is it the driver problem? I have downloaded DllPort.dll and placed it in 'System32' folder. Module Module1 Public Declare Sub Out Lib "DllPort.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer) End Module Public Class Form1 Dim PortData Const AddressLPT1 = &H378 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call Out(AddressLPT1, &H0) End Sub End Class Last edited by lkwah86; 03-17-2010 at 03:23 PM. Reason: Test Result |
|
#2
|
|||
|
|||
|
I test the coding. No error. but still can't output the data.
The parallel port's pin1-13 have voltage around 4.7V and pin 14-25 are 0V. |
|
#3
|
||||
|
||||
|
Does Windows 7 support direct control of I/O ports? I think that DLL is for an older operating system like XP. A VB programmers forum might offer more insight. Legacy ports are disappearing fast from computers.
|
|
#4
|
||||
|
||||
|
I agree, why don't you post on http://www.vbforums.com/ ? it's the most popular programming forum I know...
|
|
#5
|
|||
|
|||
|
Thanks for helping... I had tried on XP too... but seem like doesn't work also... = =
I think is the USB to parallel converter problem, it can't access by the laptop |
|
#6
|
|||
|
|||
|
Is the USB to parallel adapter just an assumed parallel port?
If need to interface between the computer and hardware, it should use a real parallel port? |
|
#7
|
||||
|
||||
|
Yes, you should use a real parallel port. The parallel port can source less current than a usb port. so if you build something to use a parallel port, and someone uses it on a REAL parallel port, you can break their PC. (At least the port)
The usb can source 500mA where a parallel port can usually source/sink about 9-20mA [ed] Here is some useful info on the subject: http://www.beyondlogic.org/spp/parallel.htm [/ed]
__________________
-rm- Last edited by retched; 03-18-2010 at 03:57 PM. Reason: ed |
|
#8
|
|||
|
|||
|
Ive had problems with this as well using the parallel port with the dll as specified on xp what i found is that the port is constantly interrogated by the OS which gives you false results I don't really know what Microsoft have done here but I can only get this to work in a fashion without having to write parallel port drivers for the hardware My guess is they have done this deliberately, which ,well sounds like typical Bill Gates this ruined peoples ordinary fun The way round this is to dual boot either into dos in which case you can use ordinary C or else its back to Linux
I don't know what other people have found but they were my findings Not very nice still there you go typical this |
|
| Bookmarks |
| Tags |
| 2008, basic, express, parallel, port, programming, visual |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| General Electricity Questions and Controlling LEDs with Parallel Port | kaashif | The Projects Forum | 3 | 09-19-2009 07:46 PM |
| Parallel port programming | parjanyaroy | Programmer's Corner | 7 | 08-16-2009 02:33 PM |
| Using visual basic to connect with the serial port of 232M1A0CT | weiix05 | Programmer's Corner | 2 | 04-02-2009 07:47 AM |
| Help! Visual Basic 2005 Express Edition Keyboard event | ashura517 | Programmer's Corner | 2 | 06-04-2008 07:09 AM |
| Sending Data Through Serial Port (Visual Basic) - Need Help | bearboss_85 | Programmer's Corner | 0 | 09-15-2007 07:05 AM |