Progamming methods for QS board
Rsadeika
Posts: 3,837
in Propeller 1
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
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
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.
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 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
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.
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
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
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