0
\$\begingroup\$

I'm using an onboard parallel port on an otherwise disused laptop to try and sample the MIDI output of a very old keyboard. MIDI is a serial link at fixed 32 kbit/s, and so far i've managed to connect the output of the keyboard to the SELECT pin of the parallel port; however, i can't make sense of the data i get (it doesn't appear to conform to the MIDI spec), and i suspect that's because the signal is getting distorted somewhere along the way, or perhaps the parallel port isn't fast enough and is therefore missing some bits...

So what i'd like to ask is: Have i made a bad choice of input pin? Should i use some status line other than SELECT, or is it indifferent?

I've written a custom program in assembly which runs standalone, so there is no other task or OS to muck up the timings... The port itself is one of the later ones, supporting EPP/ECP, though i'm not sure whether i'm making use of those advanced modes... I'm simply sampling the status byte of the port in a tight loop.

Any advice?

P.S.: As per the comments below, i'll try to refine and clarify my query. I realise that connecting a MIDI Out port to a parallel port involves the use of an optocoupler; i'm using one of those cables that connect MIDI to a soundcard's gameport, and i believe it contains an optocoupler built-in already (since multimeter readings don't show direct connections between any of the pins on both ends). I know the cable works because i used it back in the era of soundcards (so, a long while ago).

So what i'd like to know, specifically, is whether a parallel port is fast enough to accurately read a 32 kbps bitstream on one of its status pins. I chose the SELECT pin, only because i assumed any input pin would do equally well. Should i have used another?

The parallel port in question is one of the later ones, right before laptops stopped coming with them altogether, and i can devote the full resources of the PC to the task (no other programs, not even an OS).

\$\endgroup\$
10
  • 1
    \$\begingroup\$ you have provided zero information about what you are doing ... maybe you should be a politician ... just kidding about the politician ... anyway, please explain what this means i've managed to connect the output of the keyboard to the SELECT pin of the parallel port \$\endgroup\$
    – jsotola
    Commented Jan 13, 2020 at 23:35
  • \$\begingroup\$ I'm not sure what your doubt is: The SELECT pin is the name of one of the input (into the PC) pins of the parallel port; i've managed to receive data over this line from the MIDI keyboard, using one of those MIDI cables that came with soundcards of old and that were supposed to connect to a game port. Since i don't have any gameport (nor soundcard), i thought of using the parallel port instead. Anyway, i get data over the connection whenever the keyboard generates events (keys pressed, MIDI Active Sense, etc); however the specific bit patterns don't make any sense, so i'm left wondering why... \$\endgroup\$
    – chocapic
    Commented Jan 13, 2020 at 23:52
  • \$\begingroup\$ Sorry, but we have no idea do you have a MIDI spec conforming optocoupled receiver which creates the common logic level data signal for UART. In addition we do not know do you have proper serial data communication software which emulates UART receiver by observing what's in the SEL input. Please, give more information. \$\endgroup\$
    – user136077
    Commented Jan 14, 2020 at 0:24
  • \$\begingroup\$ I do have the optocoupled receiver; it's supposed to be built-in to the cable that connects the MIDI Out of the keyboard to the gameport on the soundcard (the cable came with the soundcard). And i have confirmed, with a multimeter, that there is no direct electrical connection between the MIDI pins and the game port pins on the cable, so i assume the optocoupler is there. As for the software part, there's no need to emulate a UART receiver since there is no link negotiation in MIDI; observing the SELECT pin directly, i can capture the start bit, but the data bits following make no sense. \$\endgroup\$
    – chocapic
    Commented Jan 14, 2020 at 1:40
  • \$\begingroup\$ @chocapic, you say I'm not sure what your doubt is ... think about what you said in your post ... does it say anything about a cable? \$\endgroup\$
    – jsotola
    Commented Jan 14, 2020 at 2:46

1 Answer 1

-2
\$\begingroup\$

Yeah, so i managed to find the answer all by myself, thank you very much. It had to do with very specific electrical details of the parallel port itself, which i now figured how to compensate for. The solution was both simple and elegant, and now all is working beautifully. However, since no one cared to address my specific question, instead preferring to focus on irrelevant details which i had already explained at length (but apparently no one bothered to read), i won't go to the trouble of posting the details here.

I guess the real take-home lesson is that dealing with this whole site is a massive waste of time.

\$\endgroup\$
1
  • \$\begingroup\$ It looks like it was a waste of time for those that gave of their time to try to help you too. \$\endgroup\$
    – Transistor
    Commented Jan 14, 2020 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.