Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 14 of 14

Thread: Port number for a Cedrus device?

  1. #1
    Join Date
    Nov 2005
    Posts
    3,328

    Port number for a Cedrus device?

    [edited from support email]

    How do we find the port number for a response pad ("Cedrus" company) device? We tried to do as it says in the manual but there wasn't a "Resources" tag at the "Device Manager" of the keypad device. Can you give us another way to find it?

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    What is the exact model of the Cedrus device? If you can send that to us along with a link to the product on the web, that may help John our engineer to offer a suggestion on finding the port.

  3. #3
    Join Date
    May 2006
    Posts
    11
    Quote Originally Posted by jarvis24
    What is the exact model of the Cedrus device? If you can send that to us along with a link to the product on the web, that may help John our engineer to offer a suggestion on finding the port.

    Response Pad Model RB-834. In the ports tab of the Device Manager, it shows as 'RB-x30 Response Pad (COM3)

  4. #4
    Join Date
    Nov 2005
    Posts
    294
    Okay. We've spoken with Cedrus in the past, and they're very reluctant to share the communications protocol that their button boxes use. And unforunately, we don't have any of their equipment here in the shop to test for ourselves.

    So here are a few suggestions.

    1. Check your operating manual and see what baud rate the box is probably communicating at. I'd expect that you'd see either '9,600 or 19,200' as choices.

    2. If the box has a setting for 'simple' communications, rather than a continuous stream of data, pick the simple mode.

    3. Then, open a program called 'hyperterminal' on your computer, and plug in the box and power it up. Create a new connection in hyperterm which matches the settings your box needs to communicate.

    4. Press some buttons on the box and watch to see if you see any characters appear on the terminal screen. If you do, great.

    4.5 Disconnect the button box from your computer, but keep hyperterm running.

    5. Then, open a tool called 'IOTest.' It comes free with every copy of MediaLab or DirectRT. It's buried in the tools folder.

    6. In the 'port name' field, enter the decimal value of the com port you're using. COM1 is generally found at 1016 (3F8 hex). COM2 is 2F8, COM3 is 3E8. 2F8 converts to decimal 760. 3E8 is 1000.

    *** Note that if you're using an external USB - Serial converter dongle, all bets are off. The addresses listed above refer to physical circuitry inside your computer. Since the USB device emulates a serial port, you won't be able to find an address this way. ***

    7. Take a look at the port value box of IOTest. It will list a value, perhaps zero, for when the port is at rest.

    8. Plug in the button box, press some buttons, and see if the port value changes. If it does, you're in luck. All you need to do is write your MediaLab script to accept *that particular value* as a valid answer. Check your manual for more details on how to do this.

    * * * What we've been trying to do thus far is coax the button box to emit a single byte of data when a button is pressed. If we can get a single byte of data, we can work with it in DirectRT or MediaLab.

    If you have access to an oscilloscope, this entire process can be vastly simplified, just by monitoring the box's serial transmissions to your computer. Serial port pins 2 and 3 would be especially interesting to probe, with reference to ground.

    If, on the other hand, the box is emitting a constant stream of data which changes in a complex way for each button press, MediaLab and DirectRT likely won't be able to understand it.

    Hope this helps.

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

  5. #5
    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

  6. #6
    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.

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

  8. #8
    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

  9. #9
    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.

  10. #10
    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

  11. #11
    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.

  12. #12
    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?

  13. #13
    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.

  14. #14
    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

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
  •