ParallelPortOutput
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



ParallelPortOutput Expand / Collapse
Author
Message
Posted 1/28/2008 8:38:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 1/29/2008 3:52:07 AM
Posts: 2, Visits: 13
Hello,

I need to send a +5V pulse to the pin 2 of my parallel port, for about 1 sec, just at the end of the presentation of a 4-sec duration picture.

I added an Inline after the Image Display, and wrote:

WritePort &H378, 0

WritePort &H378, 1 (I also tried with 255)

However, I did not record any output signal.

What can be the problem?

How to set the duration of the pulse?

Thank to help me.

Stéphanie

Post #1164
Posted 1/31/2008 8:56:10 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Yesterday @ 9:26:59 AM
Posts: 576, Visits: 1,254
Nearly all current parallel adapters on machines today are ECP/EPP parallel ports and permit the ability to configure the DATA port for input or output access.  If your parallel port is not in the proper mode, then it will need configured.  Since applications can change this mode at any time coupled with the difficulties to force an input/ouput mode in the system BIOS, we typically recommend including the routines found in the ParallelPortConfigure sample and then calling ConfigurePortForOutput or ConfigurePortForInput.

Assuming your parallel port is configured for output, then pins 2-9 will represent the byte sent via the WritePort method, provided that you have also connected a ground to one of the pins 19-25.  So a loop as follows would create a 1 second 50% duty cycle square wave.


Dim x As Long
For x = 1 To 10
 WritePort &H378, 1
 Sleep 500
 WritePort &H378, 0
 Sleep 500
Next 'x

References...
Sample: Parallel Port Configure
KB1316 - INFO: How do I send a signal to an external device?
KB1318 - INFO: How do I notify external equipment at the exact time that an event occurs in E-Prime?
KB1320 - INFO: General Parallel Port Information

-Brandon

Post #1178
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 4:14am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.062. 12 queries. Compression Disabled.