PDA

View Full Version : code won't execute until I disconnect serial cable. Is this right?



Ezra243
05-01-2006, 03:33 AM
Newbie + 1 day here. I am just starting through the StampWorks experiments. I have my first bit of code typed in and the syntax checks OK. I connect to the Professional Development Board with the serial cable that came with the kit. I click run and all looks good, but the program doesn't run. I fussed with the code for a while. Then I called it quits. I shutdown my PC. Then the program started running. What's up with that?
I checked it out again today. I click run and the program loads to the board. If I disconnect the serial cable, it starts running. If I reconnect the cable, the program stops. Is this normal??
I tried the USB cable. It worked on day one, but on day two I got an error when I tried using it.



PS: Thanks go to Bruce Bates for responding to my last question.

Jon Williams
05-01-2006, 03:44 AM
What kind of computer do you have? Some PC serial ports are funky and can have this odd effect on the BASIC Stamp. If you have a free USB port, install the FTDI drivers and use it; that will be the best thing for your PC.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax

Ezra243
05-01-2006, 10:44 AM
I am using a Compaq Evo N610c laptop. I used the USB cable first, but ended up getting communication errors. I tried the USB again today and it worked most of the time. Not all of the time.

Ken Gracey
05-01-2006, 12:08 PM
Ezra-

Check the latency timer in the USB-COM port and set it to "1". This should fix your problem.

Ken Gracey

Ezra243
05-03-2006, 10:32 AM
To all who follow this post in the future:
The reply by Ken Gracey above seems to have fixed the USB problem I was having with communication failures when loading code to the BS2 stamp. If you want to try the fix on your PC, here is where I found the latency timer.
Launch Regedit and do a find on the word LatencyTimer. You will find several keys that belong to the USB FTDI drivers.
Change the value to 1. They were at a value of 10 HEX for me.
Thanks go to Ken Gracey.

Jon Williams
05-03-2006, 11:11 AM
You can also get there through the Device Manager -- this is probably a better route for those without RegEdit experience.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax

Ryan Clarke
05-03-2006, 10:14 PM
This is also documented here:


www.parallax.com/dl/docs/prod/ftdi/USB-VCP-Install-WinXP-v1.1.pdf (http://www.parallax.com/dl/docs/prod/ftdi/USB-VCP-Install-WinXP-v1.1.pdf )

Ryan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support

RClarke@Parallax.com (mailto:RClarke@Parallax.com)

Ezra243
05-06-2006, 08:05 PM
Many thanks to all who responded to this post. The documentation above is right on target. The problem I had with changing the latency timer was that I could not see the USB Com port in device manager. Turns out it does not show up there when the cable is not attached to the PC and dev board. After I attached the USB cable and fired up the dev board, I could see the port in device manager.

Thanks again.