# \[win10\] parallel port D010 no write from psychopy (but does w/ Eprime and Presentation)

**URL:** <https://discourse.psychopy.org/t/win10-parallel-port-d010-no-write-from-psychopy-but-does-w-eprime-and-presentation/29605>\
**Category:** Coding\
**Tags:** hardware\
**Created:** [June 15, 2022, 2:18am UTC](https://discourse.psychopy.org/t/win10-parallel-port-d010-no-write-from-psychopy-but-does-w-eprime-and-presentation/29605 "2022-06-15T02:18:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillForan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/willforan/32/34443_2.png) [@WillForan](https://discourse.psychopy.org/u/WillForan)\
**Post date:** [June 15, 2022, 2:18am UTC](https://discourse.psychopy.org/t/win10-parallel-port-d010-no-write-from-psychopy-but-does-w-eprime-and-presentation/29605/1 "2022-06-15T02:18:31Z")

</div>

We had to reimage our old win8 stim computer. Hardware is all the same, but now we’re on a fresh win10 install. The parallel port address changed (`D010`). I updated the address in our EPrime task and triggers send. But it hasn’t been as easy for psychopy.

When `setData` didn’t just work, I followed along with [the tutorial](https://www.psychopy.org/hardware/parallelPortInstr.html). I grabbed the most recent `inpoutx64.dll` and tried putting it alongside a new psyexp file. No luck there, so I also dumped the dll in `c:/windows/system32`, restarted the computer just in case, and still had no luck.

Are there any other common issues/mistakes?

* * *

For what it’s worth, the md5sum of the dll is the same as what’s in `Program Files/PsychoPy`

```auto
$ md5sum /c/Windows/System32/inpoutx64.dll
ac0c3ae82ec0764c605fa59e7bf05614 */c/Windows/System32/inpoutx64.dll

$ md5sum /c/Program\ Files/PsychoPy/inpoutx64.dll
ac0c3ae82ec0764c605fa59e7bf05614 */c/Program Files/PsychoPy/inpoutx64.dll

```

I used the code below in the `Shell` window to test out the parallel port. `setData` does not seem to actually change the parallel port bits (as observed by our recording software). But it is maybe odd that `readData` reports `16` – seems to do something strange when the port doesn’t exist (?)

```auto
>>> from psychopy import parallel
>>> p = parallel.ParallelPort(address=0xD010)
>>> p.setData(128) # no change/indicator in ActiView
>>> p.setData(0) 
>>> p.readData()
16

>>> p = parallel.ParallelPort(address=0x001)
>>> p.readData()
1
>>> p = parallel.ParallelPort(address=0x375)
>>> p.readData()
117

```

I set the port address based on the Resource tab of the parallel port device settings properties.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/0/4/047cf80612d8ae6d3caf27c3c8b94ca93b557f8a.png)

As I did for Eprime (`&HD010` would be `0xD010` in python, working)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/0/e0c86afef96ec46f6dca076d8e26b8615f865748.png)

```auto
writeport &HD010, 1
sleep 100
writeport &HD010, 0

```

The task using NBS Presentation was already set to “LPT3” and didn’t need to be adjusted.

* * *

I tried all the addresses, just in case EPrime and pscyhopy could differ. But nothing triggered

```auto
for i in range(0,0xFFFF):
    p = parallel.ParallelPort(address=i)
    p.setData(128)

```

---

<div class="post-metadata">

**Author:** ![WillForan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/willforan/32/34443_2.png) [@WillForan](https://discourse.psychopy.org/u/WillForan)\
**Post date:** [June 15, 2022, 2:46am UTC](https://discourse.psychopy.org/t/win10-parallel-port-d010-no-write-from-psychopy-but-does-w-eprime-and-presentation/29605/2 "2022-06-15T02:46:04Z")

</div>

If I open psychopy coder w/ “run as administrator” ttl sends!

Once run with admin initially, the subsequent runs have write-access to the port without elevated permissions!

from [https://www.highrez.co.uk/Downloads/InpOut32/](https://www.highrez.co.uk/Downloads/InpOut32/)

> … but the first time it is run, it must be elevated on Vista and later (run as Administrator)

---

<div class="post-metadata">

**Author:** ![rdkirkden](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rdkirkden](https://discourse.psychopy.org/u/rdkirkden)\
**Post date:** [October 3, 2024, 4:22pm UTC](https://discourse.psychopy.org/t/win10-parallel-port-d010-no-write-from-psychopy-but-does-w-eprime-and-presentation/29605/3 "2024-10-03T16:22:40Z")

</div>

THANK YOU for posting this solution!!

First I thought the problem might be that Windows 10 was reporting the address of my PCIe parallel port card incorrectly, as Device Manager did not list an address and System Information ([https://www.sevenforums.com/hardware-devices/344035-i-o-address-parallel-lpt-port-missing-resource-tab.html](https://www.sevenforums.com/hardware-devices/344035-i-o-address-parallel-lpt-port-missing-resource-tab.html)) listed 3 addresses, none of which PsychoPy could communicate with. Then I tried using E-Prime and established that it was able to send signals out on one of the 3 addresses, but I cannot use E-Prime for anything more than testing because v2.0 Standard will not work on a monitor that has a maximum refresh rate \>201 Hz. Then I stumbled upon your post.

To the makers of PsychoPy: please can you add a note to the parallel port documentation ([Communicating via a Parallel Port — PsychoPy v2024.2.2](https://psychopy.org/hardware/parallelPortInstr.html)) that it is necessary to initially run Psychopy as administrator for this to work? As @WillForan has said, this requirement is stated in the documentation for the drivers, but I would not have thought of looking there.
