Shop OBEX P1 Docs P2 Docs Learn Events
SERIN/SEROUT, USB and COM port questions — Parallax Forums

SERIN/SEROUT, USB and COM port questions

davejamesdavejames Posts: 4,047
edited 2008-11-15 13:55 in BASIC Stamp
Hi All,

OK - so I've decided to play around with SERIN/SEROUT in an attempt to set up a user interface on the PC via HyperTerm so I might input data to the BS2 with which it will use when running the program.

I've read through the manual pages on SERIN/SEROUT and even found an old Nuts & Volts column deciphering what's in the manual.· I've read through some web pages that describe what goes on with USB.

My hardware in use is a BS2 on a 'Board of Education' that is connected to my PC through a serial/USB adapter that came with the BOE.

All that said - here's my question...HyperTerm (built into Windows XP) requires the selection of a serial COM port.· USB connections apparently don't use COM ports.· So, how then, can I correctly setup HyperTerm to communicate with the BS2?

Am I going down the wrong path?

Does the FDTI chip on the serial/USB create a 'virtual COM port'?· If so, how do I know which COM port is being used?· Does the FDTI chip always default to a particular port?

Do the SERIN/SEROUT commands support COM port selection (I didn't see it in the manual)?


Much thanks,

DJ

·

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-14 00:46
    The USB is making a virtual serial port (if that's the right lingo).· You can see what's active using --

    control panel
    · system
    ··· harware tab
    ····· device manager button
    ······· ports comm&lpt

    ·
    ** "...PC through a serial/USB adapter"····
  • davejamesdavejames Posts: 4,047
    edited 2008-11-14 15:07
    Mr. Allen,

    OK - thank you, understood.

    I visited the FDTI website (the company that makes the serial/USB chip on the Parallax adapter) and it does mention this 'virtual com port' (VCP).· Makes sense.· A lingering question is if the FDTI chip defaults to the same com port number?· I guess this would be a question for the Parallax folks, but I'll go post same over on the FDTI site.

    I'm trying to relieve the user from having to do too much when starting HyperTerm as I can create the configuration file (<title>.ht) with all the protocols set and then just have them load it prior to starting up the terminal window.

    Later,

    DJ

    Edit - just checked the path you provided and turns out that the Serial/USB adapter is on COM4.· If anyone reading this has the time and this adapater, could you also check and let me know which COM port is being used?· Thanks much.


    Post Edited (davejames) : 11/14/2008 3:16:04 PM GMT
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-14 15:23
    Sorry - no such luck. It's going to depend on your system. When I plug the adapter in, I get a Virtual Serial Port at Com6:
  • davejamesdavejames Posts: 4,047
    edited 2008-11-14 16:25
    Sylvie,

    RATS!!· Ok, thanks for your time.

    Now I have to go rethink the whole user interface.

    DJ
  • davejamesdavejames Posts: 4,047
    edited 2008-11-14 17:12
    OK - found the following on the FTDI site:

    http://www.ftdichip.com/Support/Knowledgebase/index.html and read the note:

    AN232B-05 Configuring FTDI's VCP Drivers to use Location IDs section:

    How to Configure VCP to use a Specific COM port


    Looks like I may be back in business!

    DJ

    BTW - I went ahead and grabbed this note piece-meal, stuck it into a Word doc and attached it if anyone's interested. This info isn't provided as a down load from the site.
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-14 17:39
    Interesting, and I'll bet that a few other people with the same question get sent to this thread in the future.

    I did just notice that when I plug in my Prop Plug (which is, if I understand this, also an FTDI Virtual Com Port), it appears as COM8 (while my Parallax Serial/USB converter appears as COM6). I think that's the kind of issue that the beginning part of your attachment refers to - unique devices get unique COM ports associated with them.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-11-14 17:49
    Yes, but it depends on which you install first. It may even depend on which USB connection you actually plug it into. Once it's set up, the PC tries to keep assigning the SAME COMn number to the same device. But if you moved it to a different PC, you might not (probably would not) get the same COM port number.
  • davejamesdavejames Posts: 4,047
    edited 2008-11-14 21:29
    ARRGH!

    Just read in the support section of the Hilgreave site for the HyperTerm app which comes installed in XP:

    "HyperTerminal and HyperTerminal Private Edition do not support any direct connections beyond COM4. If you need to access ports 5+, you will need to use an alternative software program, such as our HyperACCESS. HyperACCESS does not limit the port selection to the standard ports, COM1 through COM4."

    And, of course, the other mentioned apps are not free.

    So much for going the cheap route. I guess the best way from here would be to write up my own terminal window via VisualBASIC or VisualC++.

    Has anyone reading this thread written their own terminal window interface?

    DJ
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-11-14 22:35
    Hi Dave, if you don't mind using the VB Express version there is a write up for an application in the following thread called "A Simple Debug App" , it's used in conjuction with the main threads application called "VB Express to Stamp Template". Here is the link to the thread http://forums.parallax.com/showthread.php?p=671804

    It would probably take 30 minutes to an hour depending on experience to get this up and running (it takes longer to download and install VB Express).

    In fact I think I would like to take the Debug App and make it look a little better, if you go this route let me know and we can exchange thoughts.

    Jeff T.
  • davejamesdavejames Posts: 4,047
    edited 2008-11-15 06:03
    Jeff,

    Thanks for the info and link. I'll definitely check it out.

    BTW - I asked one of the software guys at work if they've ever created their own interface and the answer was 'yes', and he even spent about an hour showing me the rudementary aspects of using Visual C++ and the Dialog "wizard". Pretty amazing stuff. I would expect that the VB approach would be similar and probably simpler.

    I'll let you know how things progress.

    DJ
  • Lab RatLab Rat Posts: 289
    edited 2008-11-15 13:55
    here you go i have a serial to usb that allows my serial stamp to talk to my computer
    mine is set for com 4 but it depends on whch usb port it is pluged into
    i would suggest to pick a port and use only that one from now on and then just go through the list and stop at each com port on the list until you get one that works
    um i just dowloaded PLX-DAQ from parallax last night and it allows the stamp to send serial ouput to an excell document try it out and see if that helps
    i just like you have to use an adaptor my reason is my laptop has no serial portsand i got things working ok
    good luck

    p.s. each usb port has its own virtual serial so if you get it working on a particular port and you then plug into a different port you must change the designated com port

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax posesses power beyond belief.

    Believe in it.
Sign In or Register to comment.