Shop OBEX P1 Docs P2 Docs Learn Events
IDE only seems to use FTDI interface - why not standard coms ports? — Parallax Forums

IDE only seems to use FTDI interface - why not standard coms ports?

Peter JakackiPeter Jakacki Posts: 10,193
edited 2007-03-20 19:41 in Propeller 1
I've run into a problem with some prototypes where I am using Silabs CP2102 USB to serial chips then through an isolation barrier and onto the Propeller. It just occurred to me that the Propeller IDE expects the serial interface to be in the form of an FTDI device and not anything else. Now there isn't anything wrong with FTDI devices now that they are a lot simpler to use just like the Silabs parts but isn't it a bit restrictive to have only FTDI USB ports, what about standard PCI serial ports or other USB interfaces?

In other words I am asking if the IDE can be updated to handle coms ports in the standard Windows manner or am I missing something?

*Peter*

P.S. I been quiet for awhile but I should be back in the Propeller saddle again soon.
«1

Comments

  • Jim FouchJim Fouch Posts: 395
    edited 2007-02-15 15:10
    I've been using the IDE with 2 seperate real COM ports on my desktop PC w/o problems. It also works with the· Prop Plug. On my laptop I've tried using 3rd party USB->RS232 converters w/o reliable results. But the one Parallax sells works 100% correctly.

    Jim
  • John R.John R. Posts: 1,376
    edited 2007-02-15 15:16
    I've also used "std" COM ports and the FTDI stuff.

    Some other USB or other "Virtual" ports will probably also work.

    See threads in the Basic STAMP or SX forums for discussions on why some other USB/Virtual port drivers don't work. Basically, the IDE and the Chips (Prop/SX/Stamp) require a fairly thorough implementation in terms of I/O control, handshaking and timing. Not all port emulations are created equal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-15 16:12
    The IDE doesn't expect the COM ports to be FTDI or any other specific brand of VCP (virtual com port) or other serial port. The IDE does come with the FTDI drivers because Parallax sells FTDI-based adapters. As John R. mentioned, the IDE does expect a serial port that implements DTR (used for reset) and is careful about the timing of the serial stream since the IDE has fairly tight timing constraints on how the serial stream is delivered.

    I've used several different FTDI-based adapters and a Keyspan High Speed adapter without problems.

    SiLab's driver won't work with my computer (an Intel-based MacBook) under the MacOS.
  • Luis DigitalLuis Digital Posts: 371
    edited 2007-02-15 16:16
    Peter Jakacki said...
    I've run into a problem with some prototypes where I am using Silabs CP2102 USB to serial chips then through an isolation barrier and onto the Propeller. It just occurred to me that the Propeller IDE expects the serial interface to be in the form of an FTDI device and not anything else. Now there isn't anything wrong with FTDI devices now that they are a lot simpler to use just like the Silabs parts but isn't it a bit restrictive to have only FTDI USB ports, what about standard PCI serial ports or other USB interfaces?

    In other words I am asking if the IDE can be updated to handle coms ports in the standard Windows manner or am I missing something?

    *Peter*

    P.S. I been quiet for awhile but I should be back in the Propeller saddle again soon.
    I am interested in knowing if the problem is that its port was not detected or the Propeller.

    Try Project_Propeller.exe

    http://forums.parallax.com/forums/default.aspx?f=25&m=169705
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-02-15 21:55
    Peter,
    See attached
    www.parallax.com/dl/docs/prod/prop/PropStick-v1.2.pdf

    its a propstick - std serial connection to program...

    I have had a test circuit connected using a standard serial connection and a demoboard connection - when I decide to program (F10/F11) I just power up the circuit I want to program and the IDE finds it - no problems..


    also read the following thread..

    http://forums.parallax.com/showthread.php?p=631993

    Post Edited (QuattroRS4) : 2/15/2007 10:01:33 PM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-02-16 06:20
    Ok, it looks like it should work with the internal serial ports although the ide gets confused and locks up sometimes when a propeller isn't present which may be due to that virus program that Microslop sells. So the only problem I can see really is whether the IDE is able to work with the silabs parts. If it could then it would be nice otherwise I may look at a driver/loader myself or scrap these protos and redo them with ftdi chips.

    I've been using the silabs parts for ages in different production items without any problems and so it is a common part in our inventory. The footprint of the silab's part is very small and I am able to squeeze this in most designs easily. Looks like I might have to add the ftdi part to any Propeller designs at least.

    *Peter*
  • ForrestForrest Posts: 1,341
    edited 2007-02-16 09:29
    Well you don't have to incorporate the FTDI USB to serial part on your board at all. The Parallax Proto Board, the Propeller Education kit and the Propeller Robot Controller www.wulfden.org/PRC/index.shtml all are deisgned to use the FTDI based PropPlug programmers.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-02-16 13:53
    Forrest said...
    Well you don't have to incorporate the FTDI USB to serial part on your board at all.

    True, but these are commercial production designs where the usb port is part of the product but also required for programming the propeller. I think you would hate it if you bought a commercial product that needed a "special adapter" just to connect to the PC nono.gif

    Just to reiterate for the rest of you that haven't quite read the thread, I have some production protos that use Silab's CP2102s for the usb serial port (our standard part) and unfortunately the Propeller IDE won't recognize them, everything else will, but PropIDE, no. These are not toys to fiddle an interface with, I either get the PropIDE to function with these chips or I redesign with the ftdi chips. As these are early days it is not so bad, it just means more time and more money, but it has to be 100% before it goes to production.

    *Peter*
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-02-17 20:04
    Peter,
    Just to clarify - I have built multiple circuits to program the propeller using MAX232 drivers - similar to the layout of the propstick serial circuit - http://www.parallax.com/dl/docs/prod/prop/PropStick-v1.2.pdf

    I have programmed the Prop through various USB to serial adapters and from a P.C (real) serial port without any issue ... My only query here is that you mentioned an 'isolation barrier' - assuming you built the circuit as shown and omitted the isolation barrier - does it work then ?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-17 22:51
    Peter, are you using the DTR line of the Silab part correctly? Look at the published schematic for the Prop Plug: http://www.parallax.com/dl/docs/prod/prop/32200-32201-PropClipPlug-v1.3.pdf

    You'll note it's inverted and capacitively coupled.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-02-18 04:53
    Hi Paul, the problem seems to be that the ide does not recognize the CP2102 as a coms port even though it shows up in devmngt and works through TeraTerm. For the moment I have bridged P31,30 with an RS-232 port on the board and connected to this directly from the PC COM1. Even though I didn't hook up the DTR side as well I am still able to program the Prop by manually reseting at the same time I am downloading (Q&D).

    *Peter*
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-18 05:22
    To my knowledge the Tool treats it as a simple serial port, IOW no special device typing is done. The only thing I can think of is either the driver for the SiLab chip makes it somehow not look like a normal com port, or you have more than 2 COM ports, and you didn't implement the DTR correctly, so while it checks the COM line, it doesn't list it in it's dialog box (since it only will list a max of 2 COM ports even though all were checked).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-02-18 21:47
    Paul, I have disabled all ports except the internal COM1 and the CP2102 on COM5. Hitting F7 for a scan results in only COM1 being detected and not COM5. The IDE never detects any CP2102 coms ports even though these are functioning correctly as coms ports with TeraTerm.

    The fact that it is not even detected by the IDE despite different configurations indicates a bug of some sort in the IDE as many other coms programs work with the CP2102, not one of them failing to work. Also, this does not seem to be a timing/DTR problem as the other coms ports do not need to be connected for them to be detected and listed by the IDE.

    Does this mean that the only USB chips supported by the IDE are FTDI's?

    *Peter*
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-02-18 22:01
    Peter,
    It does not - I have had various USB to serial devices detected by the IDE ... and no issues programming

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-02-18 22:43
    Quattro, your engine's revving but you are still in neutral. roll.gif

    Which USB to serial devices? I have found the CP2102 to be a very reliable and capable usb-serial device that I have used in commercial devices. This is the first instance of software not even detecting it.

    As you might guess from the tone of my previous posts I am interested in the IDE working with the CP2102. There is an issue, it may not be your issue but it is an issue. The fault may be Silab's or it may be with the IDE and it needs to be recognized as an issue so that it can be addressed. If it turns out to be with the CP2102 driver then I can take it to Silab for their attention.

    BTW Quattro, in English (at least) the question "Does this mean ..." is not an immediate question but a challenge for a solution, such as is employed in teaching. Answering "of course not" would lead to the next question "well, what about this then" and so on.


    *Peter*
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-02-18 22:56
    Prolific - USB-to-Serial Com Port
    Keyspan USB to Serial
    and a Belkin version
    as well as the FTDI

    with reference to your English tutorial -

    I don't believe I said 'Of course not'. I stated a fact.

    you asked:
    'Does this mean that the only USB chips supported by the IDE are FTDI's?'

    I answered:
    It does not - I have had various USB to serial devices detected by the IDE ... and no issues programming.

    - now supported with examples

    I have now selected a gear !! (lol)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'
  • Jeff MartinJeff Martin Posts: 755
    edited 2007-03-05 22:26
    Hi,

    I've been away for awhile and was just alerted to this thread.

    For those that have read the thread above, you already know this, but just for an "official" word on the matter:· The Propeller Tool asks Windows for a list of COM ports before it downloads.· It doesn't care what the COM port is based on (FTDI, Standard, or not), it treats it like a serial port.

    Some USB to Serial devices will not function with the Propeller, however, because some don't faithfully implement all the standard serial port features, namely: BREAK conditions... that seems to be a problem with some devices, but most are okay.

    If the USB to Serial device is not seen by the Propeller Tool as an existing port, that is another problem.· I've heard of this happenening before, with a particular kind of USB to Serial device from Radio Shack, but upon purchasing that part and trying it out, it worked fine on my machine so I was not able to diagnose the issue.

    Peter, perhaps you and I·can coordinate offline to find the source of your problem.· If a solution is found, we will update this thread.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • koftkoft Posts: 4
    edited 2007-03-06 05:52
    I'm using a Sipex sp3232ECP on my propeller setup ( did mine with the 40 pin dip on a bread board ) connected to COM1 on my pc and propeller tool works fine. If your stuff isn't working, it's probably because you are not handling DTR properly.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-03-06 06:07
    CP2102 is a USB to serial chip, not an RS-232 driver.

    BTW, DTR doesn't even have to be handled as the Propeller tool is only looking for coms ports and then an appropriate boot response from the Propeller. It tickles the DTR and if you have the DTR detection circuit hooked-up it will reset the CPU. I have manually hit the reset on the Propeller at the same time as the Prop tool is connecting which shows you can do it without DTR. On Remy Blank's Loader.py I have added RTS as a reset control in addition to DTR as some of my USB2SER cables only use RTS/CTS and not DTR.


    *Peter*
  • koftkoft Posts: 4
    edited 2007-03-06 07:27
    That clears up some design questions I've been wondering about. Thanks for the tips Peter.
  • cocokiwicocokiwi Posts: 75
    edited 2007-03-06 07:53
    Peter Jakacki said...
    I've run into a problem with some prototypes where I am using Silabs CP2102 USB to serial chips then through an isolation barrier and onto the Propeller. It just occurred to me that the Propeller IDE expects the serial interface to be in the form of an FTDI device and not anything else. Now there isn't anything wrong with FTDI devices now that they are a lot simpler to use just like the Silabs parts but isn't it a bit restrictive to have only FTDI USB ports, what about standard PCI serial ports or other USB interfaces?

    In other words I am asking if the IDE can be updated to handle coms ports in the standard Windows manner or am I missing something?

    *Peter*

    P.S. I been quiet for awhile but I should be back in the Propeller saddle again soon.
    ········· I have the Same problem! i have a couple of CP2102 devices, mini USB connection! Both work fine with their driver,but when one tries to use it with either

    ······· the basic stamp or the Prop IDE they will NOT see the port given!· WHY!


    ·· Dennis

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://people.delphiforums.com/cocokiwi/Image/picture.jpg
  • Remy BlankRemy Blank Posts: 42
    edited 2007-03-06 07:55
    Peter Jakacki said...
    On Remy Blank's Loader.py I have added RTS as a reset control in addition to DTR as some of my USB2SER cables only use RTS/CTS and not DTR.
    Configurable on the command-line? Would you mind sending a patch? smile.gif

    -- Remy
  • Desy2820Desy2820 Posts: 138
    edited 2007-03-06 08:08
    Peter,

    I'm a Stamp user, not quite ready for the Propeller, but I was wondering, is it an absolute requirement for your project to be able to program through the Silabs implemented serial port?· Or does your project just require USB serial communications (which already seem to work)?·

    Since serial comms don't require the DTR lines and·seem to work no matter what chipset or adapter, I use a Parallax adapter to program on one computer and a second adapter (and computer) for my project's interface.· This way I can see what my project's output is, while adjusting the program in real-time.· Using the two serial ports has saved me a lot of aggrevation!

    I hope this helps!
  • cocokiwicocokiwi Posts: 75
    edited 2007-03-06 08:09
    Jeff Martin (Parallax) said...

    Hi,

    I've been away for awhile and was just alerted to this thread.

    For those that have read the thread above, you already know this, but just for an "official" word on the matter:· The Propeller Tool asks Windows for a list of COM ports before it downloads.· It doesn't care what the COM port is based on (FTDI, Standard, or not), it treats it like a serial port.

    Some USB to Serial devices will not function with the Propeller, however, because some don't faithfully implement all the standard serial port features, namely: BREAK conditions... that seems to be a problem with some devices, but most are okay.

    If the USB to Serial device is not seen by the Propeller Tool as an existing port, that is another problem.· I've heard of this happenening before, with a particular kind of USB to Serial device from Radio Shack, but upon purchasing that part and trying it out, it worked fine on my machine so I was not able to diagnose the issue.

    Peter, perhaps you and I·can coordinate offline to find the source of your problem.· If a solution is found, we will update this thread.

    Jeff,
    I have a couple of the small mini USB to serial which I have found do NOT work with the Basic stamp or the IDE program they are seen with the MTTY program
    But when hooked to the stamp or IDE the COM port is NOT seen at all even though it is listed in windows,they skip the com port as if it does not exist but works fine if a FTDI chip version is used.
    Cheers Dennis

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://people.delphiforums.com/cocokiwi/Image/picture.jpg
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-03-06 08:33
    Remy Blank said...
    Peter Jakacki said...
    On Remy Blank's Loader.py I have added RTS as a reset control in addition to DTR as some of my USB2SER cables only use RTS/CTS and not DTR.
    Configurable on the command-line? Would you mind sending a patch? smile.gif

    -- Remy

    I actually used the serial.setRTS() method next to the serial.setDTR() method in you Loader.py. I suppose I could add the extra parser.add.option for it to read the option from the command line. I'm not a Python programmer but it looks very easy to work with.

    *Peter*
  • Jeff MartinJeff Martin Posts: 755
    edited 2007-03-08 02:24
    Hi Peter,

    Attached is a zip file containing two "test" programs for displaying what COM ports are available.· Please run them both and tell me if they respond differently.· The first one (EnumerateCOMPorts_v1.1.exe) contains the API calls that are currently in the Propeller Tool and the Stamp Editor for enumerating the available COM ports.· The second one (EnumerateCOMPorts_v1.2.exe) contains a slight enhancement to the same API calls which may rectify this situation.

    IE:· The first one may not list the desired USB-to-Serial port when you click the "Get COM Ports" button, but hopefully the second one does.

    Also, please indicate if there are any other issues you note (like ports listing that you don't actually have, or items that are not really COM ports, etc).· BTW: The change I made goes against Microsoft's example of how to do this, which tells me that some USB-to-Serial port driver·manufacturers are not following the standard way of doing things... but perhaps we can safely work around that.

    If the others that reported the same problem with other USB-to-Serial devices could try the same tests and report your results here (screenshots appreciated), I would be very thankful.

    Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-03-08 02:39
    Hi Jeff,

    The first version listed everything except the CP2102 port whereas the second ran successfully as is shown below.

    Communications Port (COM1)
    Communications Port (COM2)
    USB Serial Port (COM8)
    PCI Serial Port (COM3)
    PCI Serial Port (COM4)
    CP210x USB to UART Bridge Controller (COM6)
    



    So I think you are on the right track with this as the Propeller tool does not detect the CP2102 coms ports at all at present.

    *Peter*
  • Jeff MartinJeff Martin Posts: 755
    edited 2007-03-08 05:19
    Hi Peter,

    That's great news!

    Anyone else have a chance to try it out?

    If it doesn't look like it has bad side effects, I'll wrap it into the Propeller Tool and the Stamp Editor and release a new version immediately.

    Thanks, Peter, for taking the time to test it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-03-08 05:25
    I don't have the CP210x for programming the propeller, but I do have one as a USB interface for an XBee, and I can confirm Peter's findings in that the 1.1 version shows only com 1 and 1.2 shows COM 1 and CP210x USB to UART Bridge Controller (COM14).

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    StampPlot - GUI and Plotting, and XBee Wireless Adapters
    Southern Illinois University Carbondale, Electronic Systems Technologies
  • KlossKloss Posts: 43
    edited 2007-03-08 10:45
    Tried this with 2 different USB2RS232 converters connected to my PC.
    A cheap none name product, don't know what sort of chip they use and
    a development board from silicon labs, containing the CP2101.

    The first program shows:
    Prolific USB-to-Serial Comm Port (COM19)

    The second one shows:
    Communications Port (COM1)
    Prolific USB-to-Serial Comm Port (COM19)
    CP210x USB to UART Bridge Controller (COM16)

    Seems that the first one does not even detect the integrated COM port of
    my DELL Latitude D800 notebook.

    -Karl
Sign In or Register to comment.