Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 14 of 14

Thread: Port number for a Cedrus device?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Posts
    11
    Hi,

    I got a connection with the 'hyperterminal' (com port 3), but I have a problem to get the address (section 6). I tried to set in the I/O Test program the value = 1000(dec) , but it didn't work.

    Some firend told me that for USB device there isn't a port value, is that true ?

    Can you please help with this,
    Regards,
    Tali

  2. #2
    Join Date
    Nov 2005
    Posts
    294
    You're probably correct. The port address refers to a physical location on the computer's motherboard. Since the USB port is *emulating* a serial port, there isn't a physical address.

    I didn't realize that Cedrus's USB implementation was just serial-over-USB.

    Anyway, were you able to see characters on the screen in Hyperterm?

    If so, you can just edit the comport.txt file to include the proper COM number (1,2,3 etc) and baudrate. Then, just set MediaLab to accept the proper character for each keypress.

    Do post back and let us know if you were sucessful.

    John
    Last edited by JEC; 06-19-2006 at 10:46 AM.

  3. #3
    Join Date
    May 2006
    Posts
    11
    I can't find the comport.txt file.
    Please assist.

  4. #4
    Join Date
    May 2006
    Posts
    11
    Another question...

    Why do you use port 888 for sending a ttl, while port 889 for recieving a signal? Why isn't it the same port number for both sending and recieving a signal?

    Thank you,
    Tali

  5. #5
    Join Date
    Nov 2005
    Posts
    3,328
    I think I see where the confusion is coming from here. The comport.txt file is an advanced way of getting input from a serial port--it is typically used when lots of continuous data are coming in--as opposed to single button presses. We CAN use this method for your Cedrus box, but let's see if we can do it with TTL first.

    The IOTest program is for setting up and testing the simpler TTL functionality--which is used most often for single button presses. For that, you do need an address, and I'm guessing that Windows assigns one to the pretend com port that it creates via the USB driver. Try this:

    Go to the Windows Device Manager and head to the COM3 listing for the Cedrus device. Double click that and then click on the resources tab. What do you see? You should see the address that has been assigned to the simulated port. It will be a hexidecimal value.

    And in answer to your question regarding 888 and 889, that is because different addresses are assigned to the parallel port--888 is for output and 889 is for input. That is why you often see a range of values in the "resources" tab for a port. Some will be for input and some for output. Although 888 and 889 aren't used for every machine, the input and output addresses will often be sequential like that.

    -Blair

  6. #6
    Join Date
    May 2006
    Posts
    11
    Hello Blair,

    The port for the Cedrus Response Pad is COM3. At that port properties there isn't a Resource tab. You can look at the posted question #5 and answer #6 of John to get a clearer picture.

    We did succeed to communicate with the response pad by using the Hyper Terminal.
    The problem is how to confige the DirectRT with a USB device without an address. Since there is no address for USB device, as you can see from Jhon's answer #6.

    Thank you,
    Tali

  7. #7
    Join Date
    Nov 2005
    Posts
    294
    Quote Originally Posted by barilan
    Another question...

    Why do you use port 888 for sending a ttl, while port 889 for recieving a signal? Why isn't it the same port number for both sending and recieving a signal?

    Thank you,
    Tali
    Again, these ports are related to the internal hardware on your motherboard. There's a good overview of parallel port interfacing at http://www.beyondlogic.org/
    .

    The parallel port contains 25 discrete pins. Some are transmit-only and some are receive-only.

    Basically, data you are trying to send OUT of the computer goes to the base address (in many cases, 888) while data being received by the computer from an outside system is read by the computer at address + 1 (or sometimes, address +2. Hence 888 and 889.

    In the case of a serial port, data is sent and received through the same port address.

    Hope that helps.

  8. #8
    Join Date
    Nov 2005
    Posts
    294
    Quote Originally Posted by barilan
    I can't find the comport.txt file.
    Please assist.
    From Page 18 in the MediaLab manual:
    Code:
    Input via Serial Port 
    You can now receive input from external devices such as response boxes via the serial 
    port.  To do so you just need to create a file called “comport.txt” in your experiment 
    folder and copy the following text into it: 
    comPort, baudRate, parity, dataBit,stopBit 
    1,19200,n,8,1 
    inputcode (1-255),responsevalue(1-12) 
    1,1 
    2,2 
    3,3 
    4,4 
    5,5 
    6,6 
    You shouldn’t modify the first or third line.  The second line represents the values of the 
    variables listed on the first line.  You can change any of these as necessary.  The 
    remaining lines tell MediaLab how to map incoming signals to response keys.  On each 
    line you can list a pair where the first value is the signal sent to the serial port (i.e., 1- 
    255) and the second value is the response it should map on to (i.e., 1 to 12).  In the 
    example above, if MediaLab detects a “1” coming through the serial port, it will react as 
    though the 1 or F1 key had just been pressed.  This is an easy way to have subjects 
    respond to scale items through an external button box such as those made by 
    www.response-box.com
    In other words, it's just a regular text file. Create it in NotePad or WordPad or similar, and save it with the .txt specification.

    I've attached a sample 'comport.txt' file for future reference.
    Last edited by JEC; 07-11-2006 at 10:51 AM.

  9. #9
    Join Date
    Nov 2005
    Posts
    294

    Sample comport.txt file

    I've attached a sample 'comport.txt' file for future reference.
    Attached Files Attached Files
    Last edited by jarvis24; 09-17-2006 at 04:56 PM.

  10. #10
    Join Date
    Nov 2005
    Posts
    294
    Quote Originally Posted by barilan
    Hi,

    I got a connection with the 'hyperterminal' (com port 3), but I have a problem to get the address (section 6). I tried to set in the I/O Test program the value = 1000(dec) , but it didn't work.

    Some firend told me that for USB device there isn't a port value, is that true ?

    Can you please help with this,
    Regards,
    Tali
    Which characters appeared on the HyperTerminal screen when you pressed the buttons?

Similar Threads

  1. Authorization code does not work--and the number changes
    By jarvis24 in forum MediaLab Older Versions: Troubleshooting
    Replies: 8
    Last Post: 10-19-2009, 11:20 AM

Posting Permissions

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