Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

ttl test program not working (case 10436)

  1. #1

    ttl test program not working (case 10436)

    I want to attach an led across 2 pins of a 9 pin serial connector and have that led light when a command is sent to that connector (com1)
    If I attach an led across those pins and from a DOS command prompt enter:\
    echo jelly > com1 the led will turn on and then immediately off. This tells me that com1 is functioning OUTSIDE of DirectRT.
    When I attempt to run the TTL I/O test from the tools drop down nothing happens. I choose port number 1016 (com1), I click READ and it reads the port and assigns a byte value of 255. When I click send byte now, nothing changes.
    Certainly, someone out there has tried to wire a light to the serial port and activated it. help, help

  2. #2
    Hi -

    Just curious... You know that the 'on/off' you're seeing is probably a very high speed flickering of the actual bits being transmitted, yes? Is there a current limiting resistor in place? It's easy to flip pins back and forth using a parallel port, but not quite so straightforward on the serial side.

    More shortly.

  3. #3
    I have a serial cable plugged into the 9 pin serial port of the computer. I have attached an led across pin 5 signal ground and pin 4 DTR. The led is off. Now at a dos command prompt I type echo sssssssssssss... > com1 and hit enter my led will stay lit for the duration of the string. My goal is to have RT send an echo pulse to the com port with variable time duration that is triggered by a stimulus tone being presented to the subject. By the way the led is direct connect to the serial port - no limiting resistors.

  4. #4
    Thanks for the clarification. I'll check with tech support right now, but I *think* that DirectRT doesn't have access to DTR/RTS/the other flow control pins.

    I don't suppose your machine has a parallel port, or that you could add one with an expansion card? They're about $10 these days.

    Be careful skipping those resistors. Though RS232 is supposed to be short-tolerant, it'd be embarrassing to trash an output stage for want of an $0.01 part. :)

  5. #5
    The computer has a parallel port. Your suggestion is?

  6. #6
    The computer has a parallel port. Your suggestion is?


    COM1 should be found at address (dec) 888. Databit D0 is found on DB25 pin #2, and ground is any of pins 18-25.

    You need a resistor in this case, as the parallel port can't source more than a couple mA of current safely. You'll break it if you try to drive only a raw LED. Connect the anode to pin 2 and the cathode to one leg of a 470 ohm resistor, and the end of the resistor to pin 18.

    Or just use a high impedance 'scope probe or multimeter to see that the voltage on pin 2 swings high (either to +3.3 or 5.0 volts) when the pin is triggered.

    Here's a diagram with more information:
    http://kartikmohta.com/tech/parallelport/

    That said, try the IOTest utility, with a port 888, value 255 (that'd be all 8 data pins high, just for testing). Or value '1' will drive just pin 2. DirectRT and MediaLab will both let you set the duration of the output pulse, from 1 to many tens or hundreds of mS.

  7. #7
    Actually Com 1 is port 1016.
    I think you meant Lpt 1 is port 888.

    I will test your suggestion in the morning.
    Thank You
    Sam

    Confident this will work and we can set the pulse duration to whatever we want, how will the program be scripted to turn that data bit on at the exact time a tone is being sent to the subject?

  8. #8
    I have constructed the circuit. Positive of the led to pin 2, negative of the led to the resistor 250 to 470 ohm range, resistor to pin 19 on the connector.
    When I plug in the connector to lpt1, the led is already lit. All data pins are 3.3v changing the bios for epp or ecp makes no difference. Once the machine boots all data lines are high. Verified this on a second computer.

  9. #9
    I just attached my test device to the computer that will be used for data collection. The led is lit as soon as the device is plugged into the parallel port.
    I run the ttl i/o test and enter 888 as the port, set byte value to 0 and send byte now. It turns the led off. So monitor port 888 = 0. I enter 1 for the byte value and 500ms for duration, send byte now, and the led turns on then off. a value of 255 for byte also works. now the question is hoe to program the lpt port to turn on at the same time a stimulus tone is being output.