Shop OBEX P1 Docs P2 Docs Learn Events
"Comms Lost" — Parallax Forums

"Comms Lost"

John BoardJohn Board Posts: 371
edited 2012-06-11 21:06 in Propeller 1
G'day,

I've been programming the prop recently with an older laptop - Windows XP SP2 (possibly SP3), and when I try to download larger file/project, it comes up with a message saying "Propeller Lost on COMXX" just after/while verifying the RAM, I'm pretty sure (98%) that I'm using v1.3. Any ideas/suggestions? It doesn't happen all the time - Just at all the arquard moments :P

Thanks again!

-John

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 19:03
    Using the Control Panel, check the latency setting for your serial port. It's probably set to 16. Change it to 1.

    -Phil
  • John BoardJohn Board Posts: 371
    edited 2012-06-07 19:16
    Thanks again Mr. Pilgrim! I'll do this!

    -John
  • John BoardJohn Board Posts: 371
    edited 2012-06-07 19:31
    G'day,

    Not quite sure what you mean, Control Panel as in the Windows CP? Or in Prop Tool? Also, where to go from Windows CP? I've gone to:

    The Device Manager -> Ports (COM & LPT) -> COMXX -> Port Settings -> Advanced

    Do I drag the two silders down to '1'? Or am I completely wrong?

    -John
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 19:40
    Windows CP. Drag the slider for Latency Timer (msec) down to 1.

    -Phil
  • John BoardJohn Board Posts: 371
    edited 2012-06-07 22:52
    Tried that - And it failed... Still gets up to either loading RAM or verifying it, then it conks out.

    Thanks again!

    -John
  • turbosupraturbosupra Posts: 1,088
    edited 2012-06-08 06:21
    Try going to edit --> preferences and chaning the Post-reset Delay to a larger value. I think the default is 50, so set it to 100 and 150 and see if that helps.

    Is this a quickstart board?
  • John BoardJohn Board Posts: 371
    edited 2012-06-09 03:34
    G'day,

    Thanks for the response turbosupra. No, it isn't a quickstart board, its one of the old "Gadget Gangster Propeller USB Platform Boards". GG no longer stocks them (same with Parallax), so I have supplied a link to mouser's website where they still have a page

    http://au.mouser.com/gadgetgangsterpropeller/

    Thanks for your hemp,

    John
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-06-09 05:08
    Just for grins, have you tried a different USB cable? Different USB port?

    I've my PP-USB boards a lot and haven't seen this but then all the Windows I have now are Win7.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-06-09 05:52
    That looks like the ft232 chip - normally those don't give problems http://www.gadgetgangster.com/find-a-project/56?projectnum=257

    There are some cheap USB to serial plugs that do not work with the propeller. They work fine as a serial port once the propeller is programmed but not when programming.

    I just tested both the latency and the delay as suggested in two posts above and neither work with these modules.

    There was an old version of the proptool from 5 years ago that worked with many devices that now do not work. Without the source code it is hard to be certain, but the evidence suggests this is a software rather than a hardware problem.

    If you can find a different ft232 driver that might help.

    Another option that I tested just now was to use BST (Brad's Spin Tool). This does seem to cope better with different hardware. The catch with BST is there are not those little arrows in the spin program that form a rather essential part of the spin syntax.

    No solution is perfect but one that does seem to work is to write software using the proptool but download it with BST.
  • Heater.Heater. Posts: 21,230
    edited 2012-06-09 06:40
    If you need the indentation level markers try out PZST. Works on many platforms and uses the compiler and loader from BST.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-06-09 18:23
    @heater, pzst looks interesting. I'll check it out when I get home from work and see how it goes with my eclectic collection of USB to serial devices. If it uses the BST engine it should work fine.

    One thing I noticed in the manual that is *very* interesting is using the spin language in a more "object oriented" way:
    3.3.5 Autocomplete
    Autocomplete speeds up code editing by predicting the word that the user wants to type
    in without the user actually typing it in completely. In PZST, autocomplete works for
    methods, constants, objects and assembly labels.
    To activate the autocomplete, press Ctrl+.. For example, if current file declares methods
    start, stop and str, typing s and pressing Ctrl+. displays a list with these methods. After
    selecting a method using arrow keys, and pressing Enter, input is completed with the
    method selected.
    Figure 3.3: Autocomplete
    3.3. Editing files 11
    PZST. User Manual, Version 1.0
    Autocomplete list depends on current context. For example, when completing a method
    name from an included object, only PUB methods are available.
    Autocomplete list can appear not only when pressing Ctrl+., but also automatically
    when typing . or #. For example, after typing serial., a list of PUB methods from
    serial object is displayed.
  • turbosupraturbosupra Posts: 1,088
    edited 2012-06-10 10:25
    There is a spin/pasm compiler with autocomplete/intellisense? What?

    Who wrote it, I can't wait to try it? Any hiccups in switching to that from the prop tool?
  • Heater.Heater. Posts: 21,230
    edited 2012-06-10 13:48
    Have a google for "propeller PZST".
    It's written by Andre Demenev (probably spelt wrong).
    Worked very well for me when I tried it out.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-06-10 17:21
    @heater, I downloaded pzst. The intellisense and dropdown menus for object methods are fantastic. The objects PUBs are even in alphabetical order which makes finding things even easier. I'm really keen to move over to pzst as I think it will work with even the $2 cheap USB serial adaptors (which indirectly solves our OPs problem because you can always get a cheapie adaptor off ebay). One minor problem though - it can't find any com ports, not even my real hardware one. I'm sure it is just a minor thing given it is using BST behind the scenes and that works fine. Did you have any problems like that?
  • Heater.Heater. Posts: 21,230
    edited 2012-06-11 02:43
    No problems, downloads and runs the Prop just fine. I have only ever used PZST on Linux though.

    Note:
    1) The Compile->Detect Propeller menu option (or F7) does not scan all ports for a Prop. You have to configure the port manually.
    2) To specify the port go to Edit->Preferences-Compiler->options and there you will see port edit box, your port should appear in the drop down list.
    3) To see indentation markers switch on Edit->Preferences->Editor ->Visible Tabs

    Down side is that there is no nice terminal window like BST

    Now if we could only get Andrey to use Parallax's new open source Spin compiler instead of BST we could use PZST on ARM boards as well.
  • turbosupraturbosupra Posts: 1,088
    edited 2012-06-11 07:57
    How do you get a hold of Andrey? I wrote code (windows) that uses the prop dll or it could use .net native code to scan the ports for the propeller. I'd be happy to dig up the code and give it to him if he wants it.
  • Heater.Heater. Posts: 21,230
    edited 2012-06-11 08:10
    The PZST thread is here: http://forums.parallax.com/showthread.php?129362-PZST-an-open-source-Propeller-IDE-in-development-Version-1.0.1-released!
    F
    rom there you can get to Andrey's profile and sens a private forum message. No idea if he has an email address with PZST in the google code site.

    I always wonder about scanning for devices. It carries the possibility of disturbing other serial connected devices.
  • turbosupraturbosupra Posts: 1,088
    edited 2012-06-11 08:32
    The way that my native .net code and I believe the way the prop dll does it, is that it lists all of the ports in use and only queries the ports that aren't already open by another object. I don't know what the windows OS code is doing behind the scenes, but I've never seen it cause a disturbance?

    Thanks, I will message him although he did say that this was intentional.
    Compiler/loader:

    serial port to use is specified explicitly (I do not like the loader to open all ports available and sending data - I may have whatever connected there)
    reliable operation with CP2102 USB/UART converter under Linux
    use of any character encoding for string constants, not only Latin-1
  • Heater.Heater. Posts: 21,230
    edited 2012-06-11 09:25
    Yes but, what if I have some serial device connected and there is no application currently running to talk to it, then whatever probing goes on may cause it to do something odd. Unlikely I know but I worry about such things.
  • turbosupraturbosupra Posts: 1,088
    edited 2012-06-11 13:39
    I guess you've seen that happen? Since your scenario is valid, it seems to me that a better solution would be implement the probe feature with the ability to manually exclude specific ports as (from a workload comparison) the majority of time the auto probe feature is going to save a ton of configuration time and only rarely will there be times it could interrupt another serial device unintended. Basically a majority rules perspective, but with intelligence and the ability to allow special configurations for special situations.



    Heater. wrote: »
    Yes but, what if I have some serial device connected and there is no application currently running to talk to it, then whatever probing goes on may cause it to do something odd. Unlikely I know but I worry about such things.
  • Heater.Heater. Posts: 21,230
    edited 2012-06-11 14:08
    Well no, or maybe.
    In the old days we had serial ports. It was clear what was attached to what port. It was static and that was that.
    Now we have this stupid USB and "plug-n-play" where you can never tell what port your device ends up as.
    Your solution is a fix to that problem that should not be in the first place.
    Bah, I don't know.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-06-11 16:12
    @heater
    Note:
    1) The Compile->Detect Propeller menu option (or F7) does not scan all ports for a Prop. You have to configure the port manually.
    2) To specify the port go to Edit->Preferences-Compiler->options and there you will see port edit box, your port should appear in the drop down list.
    3) To see indentation markers switch on Edit->Preferences->Editor ->Visible Tabs

    Fantastic! That all works now. In that editor screen you can also have it as a white background, or the colors like in the proptool.

    Two problems solved there - now can use cheapie USB to serial plugs, and also can start using objects they way they were meant to be used!

    I'm a happy camper!
  • turbosupraturbosupra Posts: 1,088
    edited 2012-06-11 21:06
    Agreed, it'd be awesome if there was a universal standard on how to query a usb device and determine what it is ... but alas there is not. I will say that if the driver is written this way intentionally, windows will identify it in the device manager what the usb device is based on the information in the driver. For example, my device manager says "PropScope (COM3)" and even that information could be used programmatically.

    In HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\FTDIBUS\VID_13E2+PID_0080+A6007aHNA\0000\FriendlyName it has "PropScope (COM3)" stored as the value.

    Is there a need for a usb management helper tool? With device name reader/display? You can change them to whatever you want, check it out ;)

    heaterusbports1.jpg



    Heater. wrote: »
    Well no, or maybe.
    In the old days we had serial ports. It was clear what was attached to what port. It was static and that was that.
    Now we have this stupid USB and "plug-n-play" where you can never tell what port your device ends up as.
    Your solution is a fix to that problem that should not be in the first place.
    Bah, I don't know.
Sign In or Register to comment.