Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 9 of 9

Thread: ttl test program not working (case 10436)

  1. #1
    Join Date
    Apr 2008
    Posts
    15

    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
    Join Date
    Nov 2005
    Posts
    294
    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
    Join Date
    Apr 2008
    Posts
    15

    case 10436

    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.
    Last edited by ARLUser; 09-26-2013 at 04:16 PM. Reason: omission

  4. #4
    Join Date
    Nov 2005
    Posts
    294
    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
    Join Date
    Apr 2008
    Posts
    15

    case 10436

    The computer has a parallel port. Your suggestion is?

  6. #6
    Join Date
    Nov 2005
    Posts
    294
    Quote Originally Posted by ARLUser View Post
    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.
    Last edited by JEC; 09-26-2013 at 07:24 PM.

  7. #7
    Join Date
    Apr 2008
    Posts
    15

    case 10436

    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
    Join Date
    Apr 2008
    Posts
    15

    10436

    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.
    Last edited by ARLUser; 09-27-2013 at 09:14 AM. Reason: ommission

  9. #9
    Join Date
    Apr 2008
    Posts
    15

    10436

    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.
    Last edited by ARLUser; 09-27-2013 at 09:35 AM. Reason: typo

Similar Threads

  1. Program with TTL signals closing prematurely (case 2833)
    By rimma in forum DirectRT Older Versions: Troubleshooting
    Replies: 6
    Last Post: 01-23-2015, 04:15 PM
  2. 'Medialab program has stopped working' error (case 8118)
    By Beaudrylab in forum MediaLab v2018: Troubleshooting
    Replies: 5
    Last Post: 02-14-2014, 04:21 PM
  3. Having Problem with TTL, Parallel Port, I/O test
    By habrookshirej in forum MediaLab Older Versions: General Questions
    Replies: 2
    Last Post: 12-13-2010, 02:48 PM
  4. TTL suddenly not sending - I/O test not working
    By melc in forum Hardware: Troubleshooting
    Replies: 1
    Last Post: 10-08-2010, 12:57 PM
  5. TTL problems: I/O Test
    By Roelie in forum Hardware: Troubleshooting
    Replies: 6
    Last Post: 11-12-2008, 12:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •