Shop OBEX P1 Docs P2 Docs Learn Events
Progamming methods for QS board — Parallax Forums

Progamming methods for QS board

I know we have the standard way of programming the QS board, plug a USB cable into the board, and the other end into the computer. What I am trying to do is use a USB-TTL cable, where the TTL end would insert into the QS header. I tried plugging the four leads into the corresponding locations on the QS header, but I am not getting what I need, all I get is the QS board flashing its LEDs.

When I move the TTL Rx/Tx leads from 31/30 to some other pins and then power it up, then I get a viable COM number for the USB-TTL connection. In my experiment I would like to use the USB-TTL cable because I can make the cable longer with very little effort. And I would only have to deal with one cable between the QS board and the computer. I am looking at, at least six feet of distance between the QS board and the computer.

I am looking into a Dell Micro desktop, which I would like to run headless. Using the Remote Desktop feature, on my Win 10 desktop, I would like to be able to program the QS board remotely via the Dell Micro box.

So far I have found the Dell Micro desktop to be the cheapest for the purpose that I have in mind. It is being sold with Windows 8.1 and an upgrade to Windows 10 availability. Any ideas about the TTL problem?

Ray

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2015-08-18 20:33
    Look on the last page of the QuickStart schematic for a signal called /USB_PWR_EN which is available on the connector as you can see on the first page of the schematic. You have to ground this pin to use USB power for the Propeller. If it's left unconnected, USB power is used only for the USB serial interface.

    If you use an external USB-TTL (must be 3.3V!) cable, you have to disconnect the existing USB to serial interface on pins 31/30. The ROM boot routines expect to see a serial connection to the PC on these pins only. You can use other I/O pins for data, but not for programming. There are some other ways to load programs into a Propeller, but they don't work as easily. It's really easier to use the existing built-in USB to serial interface and ground /USB_PWR_EN so the QS will use the power from USB.
  • Thanks Mike, I did the suggested hook up and the QS board gets steady power, but the computer is not showing a new COM activity. I purchased the USB-TTL cable from Adafruit which contains the PL-2303HX chip, I am not very happy with the Prolific chips. I get the feeling that the chip has given up the smoke, but I am not sure.

    If that is the case, this will be the second cable that has gone bad, these Prolific chips are way to fragile for the kind of applications that I do. After double checking the Adafruit site, I noticed that they are no longer selling a cable with the PL-2303HX chip. Now I wonder if the new cable and chip, from Adafruit, would be any better, or do I go with a new method for connecting up?

    Ray
  • I'm still a little confused about why you're using an external USB-TTL cable when the QS has a perfectly good USB-serial adapter. The main reason for not using it is the automatic reset when DTR is toggled. How about using an FTDI USB-TTL (3.3V) cable? You can buy them directly from FTDI's website. They use the same chip that Parallax uses.
  • The last time that I was looking for some USB A to Mini B cables, they were all very short ones. As I mentioned in my first post, I will need a cable that had to be at least six foot. After doing another search for cables, I noticed that Amazon.com is selling cables in lengths of six and eight foot.

    I will probably go with an eight foot cable, and use the perfectly good USB-serial adapter on the QS board. Now, since my intention is to have the QS board powered via the USB, and the Dell Micro box, is there a way of doing software reset of the QS board. I know my program will be on the EEPROM, but will I have to do a manual board reset or have the computer do a restart just to start the QS board from EEPROM? I will be using SimpleIDE, because the program will be written in C.

    Ray
  • All you have to do is to toggle DTR on the Dell box. That will force a hardware reset on the QS. Check the serial library calls for whatever language you're using on the Dell and you'll find a call that sets the control lines like DTR.

    Allow enough time for the program to load from EEPROM and initialize itself. Usually I have the program on the QS send some kind of "hi, I'm here" message that the PC program waits for.
  • I am considering writing a serial terminal program in Python, toggling the DTR in pyserial should be an interesting piece of code. To bad the SimpleIDE program does not have something like that, could be like an automatic feature after you program the EEPROM, it would just toggle the DTR. I guess than we would have to call SimpleIDE ComplexIDE.

    Some of the pieces are coming together, now I have to setup a prototype contraption using a QS board and one of my other Windows desktops to see if this all works out the way I want it to.

    Ray
  • AribaAriba Posts: 2,690
    For sure the programm in the EEPROM also starts on power up, you don't need a DTR reset.

    If you connect another USB to serial converter at PIN 31,30 and RESn, then you need the R-C-Transistor circuit to form a reset pulse from DTR. And you must not power the QS board via the USB connector, only from Vin (~5V).
    If there is power on the USB connector the internal FTDI chip is connected to P31 and connecting also an external TX signal at the same pin will produce a short, or better two outputs drive concurrently the same input. This can destroy one of the USB-Serial chips.

    Andy
  • Thanks Ariba, my plan is to do remote programming, so I want to get away from doing a manual reset, that I think defeats the whole purpose of remote programming.

    I did a test run on my previously mentioned prototype setup, ran into a problem. When I do a Run in SimpleIDE, and then try to access the QS board with the serial terminal program, I get no response. My terminal program shows that I have made a connection to the COM port, but no response from the QS board. If SimpleIDE still had control over the COM port, then my terminal program would not have made a connection.

    What I had to do is program the EEPROM, manually pull the USB cable on the QS board, and then plug it back in. Once that was done then I could start the terminal program and the QS board would be active. Not sure what is going on here?

    I know that when I was experimenting with the command line setup, propload version, as soon as that was done, I could fire up the terminal program and I would have access to the Propeller. Why does it work in this setup, as expected?

    I will probably do some of the DTR suggestions, in the terminal program, to see if that takes care of the problem, but I am not so sure. I would rather stick with SimpleIDE than go back to the command line setup. Things can get messy, use SimpleIDE as the editor, and then use the command line to program the Propeller.

    Ray
Sign In or Register to comment.