Viewport unable to connect to my boards
jhargus
Posts: 3
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!
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
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.
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.
I think He start Programs that NOT have ViewPort Header Lines added to it for functioning with it.
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.
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
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