Shop OBEX P1 Docs P2 Docs Learn Events
Viewport unable to connect to my boards — Parallax Forums

Viewport unable to connect to my boards

jhargusjhargus Posts: 3
edited 2014-06-26 03:26 in Propeller 1
hey everyone,

I'm very new to the firmware side of programming, being that I'm a windows/iphone programmer I wanted a way to debug what I'm coding in a more traditional manner. I downloaded the viewport demo but am unable to connect my boards (I have a demo board and one of our comm boards). The error I get on both boards is:

Verify that your device:
* has a good power supply
* is connected with a good USB cable
* is programmed with the right clock settings
* uses the conduit.share function
Make sure the port and baud settings are correct


Reset Reset:Propeller v1 on COM3
Reset Reset:Propeller v1 on COM3
Wrote 561 bytes!
Waiting for reply
Received reply of 254 after 5,1
Opening connection to COM3 at 1000000
Operation timed out.
Received 0 configuration bytes


I tried different power sources, different cables, some of the sample firmware, etc and I can't get it to connect to my board. I also tried various baud rates from 115.2k up to 2mbps. I get the same error regardless of what I'm doing. One caveat I should mention is that I'm running Viewport on a virtual machine on my Mac. I can connect to either board and push firmware to them when I use the Spin tool, so the problem seems isolated to viewport. I'd really appreciate any help I can get.

Thanks!

Comments

  • PublisonPublison Posts: 12,366
    edited 2011-03-07 14:08
    I would stat with the Demo Board since it has the native FTDI USB interface.

    Make sure you have the latest USB drivers for FTDI:

    http://www.parallax.com/tabid/530/Default.aspx

    You have to uninstall any old FTDI drivers you have. Install the software FIRST before
    inserting the hardware.


    EDIT: Just reread and see your using VM on MAC. Not sure now. Maybe Prof. Hanno can answer this.

    jhargus wrote: »
    hey everyone,

    I'm very new to the firmware side of programming, being that I'm a windows/iphone programmer I wanted a way to debug what I'm coding in a more traditional manner. I downloaded the viewport demo but am unable to connect my boards (I have a demo board and one of our comm boards). The error I get on both boards is:

    Verify that your device:
    * has a good power supply
    * is connected with a good USB cable
    * is programmed with the right clock settings
    * uses the conduit.share function
    Make sure the port and baud settings are correct


    Reset Reset:Propeller v1 on COM3
    Reset Reset:Propeller v1 on COM3
    Wrote 561 bytes!
    Waiting for reply
    Received reply of 254 after 5,1
    Opening connection to COM3 at 1000000
    Operation timed out.
    Received 0 configuration bytes


    I tried different power sources, different cables, some of the sample firmware, etc and I can't get it to connect to my board. I also tried various baud rates from 115.2k up to 2mbps. I get the same error regardless of what I'm doing. One caveat I should mention is that I'm running Viewport on a virtual machine on my Mac. I can connect to either board and push firmware to them when I use the Spin tool, so the problem seems isolated to viewport. I'd really appreciate any help I can get.

    Thanks!
  • jhargusjhargus Posts: 3
    edited 2011-03-07 15:42
    An update:

    I thought maybe it had something to do with my virtual machine so I loaded the spin tool and viewport onto my windows partition after booting directly into Windows 7. Same issue. Loaded it on my MacBook Pro and had the same issue running it in Windows. Since it's two different computers and 3 different OS's kicking me the same error on two different boards I'm starting to think I'm doing something wrong.
  • jhargusjhargus Posts: 3
    edited 2011-03-07 15:50
    I got it running now on both machines and in my Virtual Machine. If I run the Debug.spin file in my tutorials folder it runs. I'm guessing there's a file I have to include to use viewport, or at least the vp object.
  • HShankoHShanko Posts: 402
    edited 2011-03-07 17:54
    I too am running a virtual machine, Parallels, on an iMac. But also have times when I cannot get connected. I think that problem usually is because I made a change to the source, but forget to save the file before going to ViewPort and trying to connect. Also I think one needs to have all your files, source and OBJ, in the same folder. I've just been putting all my files into the Tutorial folder; however, that creates a problem when one does an update to ViewPort.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-03-07 20:45
    I don't run ViewPort very often, but it works for me when I do run it. I have a 2 GHz MacBook with 2GB of RAM running MacOS 10.6.6, run Parallels Desktop on that with Windows XP Home. I have the FTDI drivers installed on the MacOS side and the Windows side since I normally use BST on the Mac side.
  • SapiehaSapieha Posts: 2,964
    edited 2011-03-07 21:15
    Hi Mike Green.

    I think He start Programs that NOT have ViewPort Header Lines added to it for functioning with it.

    Mike Green wrote: »
    I don't run ViewPort very often, but it works for me when I do run it. I have a 2 GHz MacBook with 2GB of RAM running MacOS 10.6.6, run Parallels Desktop on that with Windows XP Home. I have the FTDI drivers installed on the MacOS side and the Windows side since I normally use BST on the Mac side.
  • archer1424archer1424 Posts: 7
    edited 2011-04-06 10:28
    I can't get mine to connect either, Does it have to do with the type of usb cable we are using? I have one with a ferrite choke. Will this make it unusable with view-port?
  • PublisonPublison Posts: 12,366
    edited 2011-04-06 11:31
    The main issue is to have the correct FTDI drivers installed.
    I have used a few different USB cables but the thin retractable ones do not work well. The cable are pretty inexpensive, even for the good ones. Why not try another.
  • HannoHanno Posts: 1,130
    edited 2011-04-06 16:09
    Howdy,
    Professor Hanno here, class is now in session.

    To debug programs and monitor/change variables, the ViewPort application running on your pc needs to "talk" to the program running on the Propeller. Sadly, getting two things to communicate requires a lot of things:
    HARDWARE
    - you need a decent cable. Parallax's flimsy retractable USB cord breaks down very quickly- please replace it with a standard USB cable. This single issue has caused LOTS of problems. I don't know if they're still shipping these?
    - your FTDI drivers need to be up to date- haven't seen too many problems here
    - you shouldn't have broken USB devices on the same PC- some people have had problems with failing USB devices that saturated the bus
    - ideally try running on a decent Windows pc- anything from Win2000 on up. A lot of people are successful on Mac/Linux under emulation, but it may take some doing
    - the Propeller's clock constants have to match the hardware! Lots of people have issues when running a spin program with clock constants set to 5MHz on a Propeller clocked by a 6MHz crystal. If they don't match up, communication won't work.

    Software
    - I know no-one like reading the manual or trying sample tutorials- but they're there for a reason! Try them, try them, you will like them!
    - You do need to include at least the ViewPort "Conduit" object and start it by calling "vp.share". If you don't the ViewPort app won't have anything to connect to.
    - Cog's are mostly independent. There are two sources of conflicts- writing over memory and using the TX/RX pins. If your code goes completely haywire and overwrites critical locations in global memory, then ViewPort won't be able to connect. Also, if your program toggle the TX/RX pins (typically 30,31), then ViewPort won't connect.

    I'm very sad that this list is so long. Unfortunately I can't think of ways to improve the software so that it detects these issues. Good luck!
    Hanno
  • JChrisJChris Posts: 58
    edited 2014-06-25 17:26
    Hanno wrote: »
    Howdy,
    Professor Hanno here, class is now in session.

    To debug programs and monitor/change variables, the ViewPort application running on your pc needs to "talk" to the program running on the Propeller. Sadly, getting two things to communicate requires a lot of things:
    HARDWARE
    - you need a decent cable. Parallax's flimsy retractable USB cord breaks down very quickly- please replace it with a standard USB cable. This single issue has caused LOTS of problems. I don't know if they're still shipping these?
    - your FTDI drivers need to be up to date- haven't seen too many problems here
    - you shouldn't have broken USB devices on the same PC- some people have had problems with failing USB devices that saturated the bus
    - ideally try running on a decent Windows pc- anything from Win2000 on up. A lot of people are successful on Mac/Linux under emulation, but it may take some doing
    - the Propeller's clock constants have to match the hardware! Lots of people have issues when running a spin program with clock constants set to 5MHz on a Propeller clocked by a 6MHz crystal. If they don't match up, communication won't work.

    Software
    - I know no-one like reading the manual or trying sample tutorials- but they're there for a reason! Try them, try them, you will like them!
    - You do need to include at least the ViewPort "Conduit" object and start it by calling "vp.share". If you don't the ViewPort app won't have anything to connect to.
    - Cog's are mostly independent. There are two sources of conflicts- writing over memory and using the TX/RX pins. If your code goes completely haywire and overwrites critical locations in global memory, then ViewPort won't be able to connect. Also, if your program toggle the TX/RX pins (typically 30,31), then ViewPort won't connect.

    I'm very sad that this list is so long. Unfortunately I can't think of ways to improve the software so that it detects these issues. Good luck!
    Hanno


    Hi Hanno
    This information is quite usefull and I understand, now, why I am experiencing some difficulties with using Viewport.
    Actually my program expects some inputs on pin 30 and 31 and there is a conflict with viewport that also uses thoses pins to communicate on the serial port.

    Is there a way to avoid the problem and to both use the serial port to communicate with the PST and Viewport/Conduit?

    Although I can use an LCD to display information instead of using the Terminal (PST), I don't see how I can get a keyboard input to feed my Quickstart board without conflicting with Viewport / Conduit.

    Any hints would be appreciated
    Jean-Christophe
  • HannoHanno Posts: 1,130
    edited 2014-06-25 18:50
    Hi Jean-Christophe,
    ViewPort allows you to send/receive terminal data while at the same time doing "ViewPort" things (debugging, viewing/editing variables, streaming video, etc).
    However, it can't share it's two IO pins with other code like PST. To use ViewPort and other Terminals at the same time you need to allocate two pins to each- for example, 28,29 for PST and 30,31 for ViewPort. This would require two serial connections to the PC.
    Hanno
  • JChrisJChris Posts: 58
    edited 2014-06-26 03:26
    Hanno wrote: »
    Hi Jean-Christophe,
    ViewPort allows you to send/receive terminal data while at the same time doing "ViewPort" things (debugging, viewing/editing variables, streaming video, etc).
    However, it can't share it's two IO pins with other code like PST. To use ViewPort and other Terminals at the same time you need to allocate two pins to each- for example, 28,29 for PST and 30,31 for ViewPort. This would require two serial connections to the PC.
    Hanno

    Hi Hanno
    Thanks for this quick reply. This confirms what I understood after viewing the "Conduit" method code. So I will have to mobilize 2 USB ports, one for PST and one for Viewport/Conduit.
    I guess I will have to use another FTDI board connected to the Pins used with PST.
    Jean-Christophe
Sign In or Register to comment.